summaryrefslogtreecommitdiffstats
path: root/regress
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2006-01-31 12:06:14 +0100
committerDamien Miller <djm@mindrot.org>2006-01-31 12:06:14 +0100
commit7410ad79f85a62361a6e40ac4ea11e6504408666 (patch)
treee89ac045835872e0c574cf5e5ef22836ab8426ce /regress
parent - djm@cvs.openbsd.org 2006/01/27 06:49:21 (diff)
downloadopenssh-7410ad79f85a62361a6e40ac4ea11e6504408666.tar.xz
openssh-7410ad79f85a62361a6e40ac4ea11e6504408666.zip
- djm@cvs.openbsd.org 2006/01/31 10:23:23
[scp.sh] regression test for CVE-2006-0225 written by dtucker@
Diffstat (limited to 'regress')
-rw-r--r--regress/scp.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/regress/scp.sh b/regress/scp.sh
index 02f541011..bfda670bb 100644
--- a/regress/scp.sh
+++ b/regress/scp.sh
@@ -1,4 +1,4 @@
-# $OpenBSD: scp.sh,v 1.5 2006/01/27 06:49:21 djm Exp $
+# $OpenBSD: scp.sh,v 1.6 2006/01/31 10:23:23 djm Exp $
# Placed in the Public Domain.
tid="scp"
@@ -82,6 +82,13 @@ cp ${DATA} ${DIR}/copy
$SCP $scpopts -r somehost:${DIR} ${DIR2} || fail "copy failed"
diff ${DIFFOPT} ${DIR} ${DIR2} || fail "corrupted copy"
+verbose "$tid: shell metacharacters"
+scpclean
+(cd ${DIR} && \
+touch '`touch metachartest`' && \
+$SCP $scpopts *metachar* ${DIR2} 2>/dev/null; \
+[ ! -f metachartest ] ) || fail "shell metacharacters"
+
if [ ! -z "$SUDO" ]; then
verbose "$tid: skipped file after scp -p with failed chown+utimes"
scpclean