summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2006-01-31 22:06:41 +1100
committerDamien Miller <djm@mindrot.org>2006-01-31 22:06:41 +1100
commit50c6eedce395ad0b828067c5e65ce9eb9e1543af (patch)
tree08f558bd8875d37d035b3c42790fa9e80f2955e7
parent7410ad79f85a62361a6e40ac4ea11e6504408666 (diff)
- djm@cvs.openbsd.org 2006/01/31 10:36:33
[scp.sh] regress test for "scp a b c" where "c" is not a directory
-rw-r--r--ChangeLog5
-rw-r--r--regress/scp.sh9
2 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 1851eab9..901611fe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -66,6 +66,9 @@
- djm@cvs.openbsd.org 2006/01/31 10:23:23
[scp.sh]
regression test for CVE-2006-0225 written by dtucker@
+ - djm@cvs.openbsd.org 2006/01/31 10:36:33
+ [scp.sh]
+ regress test for "scp a b c" where "c" is not a directory
20060129
- (dtucker) [configure.ac opensshd.init.in] Bug #1144: Use /bin/sh for the
@@ -3791,4 +3794,4 @@
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
-$Id: ChangeLog,v 1.4110 2006/01/31 11:06:14 djm Exp $
+$Id: ChangeLog,v 1.4111 2006/01/31 11:06:41 djm Exp $
diff --git a/regress/scp.sh b/regress/scp.sh
index bfda670b..c5d412dd 100644
--- a/regress/scp.sh
+++ b/regress/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"
@@ -116,5 +116,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.scp