diff options
author | 2006-01-31 10:36:33 +0000 | |
---|---|---|
committer | 2006-01-31 10:36:33 +0000 | |
commit | 11813eefe28f82ade663f163fdfc055e9b9fd9c4 (patch) | |
tree | fb90c336b14f6c6f76ad1f9887ab244419d8de98 | |
parent | "scp a b c" shouldn't clobber "c" when it is not a directory, report and (diff) | |
download | wireguard-openbsd-11813eefe28f82ade663f163fdfc055e9b9fd9c4.tar.xz wireguard-openbsd-11813eefe28f82ade663f163fdfc055e9b9fd9c4.zip |
regress test for "scp a b c" where "c" is not a directory
-rw-r--r-- | regress/usr.bin/ssh/scp.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/regress/usr.bin/ssh/scp.sh b/regress/usr.bin/ssh/scp.sh index f82b988f475..5e653158452 100644 --- a/regress/usr.bin/ssh/scp.sh +++ b/regress/usr.bin/ssh/scp.sh @@ -1,4 +1,4 @@ -# $OpenBSD: scp.sh,v 1.6 2006/01/31 10:23:23 djm Exp $ +# $OpenBSD: scp.sh,v 1.7 2006/01/31 10:36:33 djm Exp $ # Placed in the Public Domain. tid="scp" @@ -109,5 +109,12 @@ for i in 0 1 2 3 4; do [ -d ${DIR}/dotpathdir ] && fail "allows dir creation outside of subdir" done +verbose "$tid: detect non-directory target" +scpclean +echo a > ${COPY} +echo b > ${COPY2} +$SCP $scpopts ${DATA} ${COPY} ${COPY2} +cmp ${COPY} ${COPY2} >/dev/null && fail "corrupt target" + scpclean rm -f ${OBJ}/scp-ssh-wrapper.exe |