diff options
Diffstat (limited to 'regress')
-rw-r--r-- | regress/scp.sh | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/regress/scp.sh b/regress/scp.sh index 6b5664283..39e8af4c6 100644 --- a/regress/scp.sh +++ b/regress/scp.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: scp.sh,v 1.2 2004/06/16 13:15:09 dtucker Exp $ | 1 | # $OpenBSD: scp.sh,v 1.3 2004/07/08 12:59:35 dtucker Exp $ |
2 | # Placed in the Public Domain. | 2 | # Placed in the Public Domain. |
3 | 3 | ||
4 | tid="scp" | 4 | tid="scp" |
@@ -64,6 +64,19 @@ cp ${DATA} ${DIR}/copy | |||
64 | $SCP $scpopts -r somehost:${DIR} ${DIR2} || fail "copy failed" | 64 | $SCP $scpopts -r somehost:${DIR} ${DIR2} || fail "copy failed" |
65 | diff ${DIFFOPT} ${DIR} ${DIR2} || fail "corrupted copy" | 65 | diff ${DIFFOPT} ${DIR} ${DIR2} || fail "corrupted copy" |
66 | 66 | ||
67 | if [ ! -z "$SUDO" ]; then | ||
68 | verbose "$tid: skipped file after scp -p with failed chown+utimes" | ||
69 | scpclean | ||
70 | cp -p ${DATA} ${DIR}/copy | ||
71 | cp -p ${DATA} ${DIR}/copy2 | ||
72 | cp ${DATA} ${DIR2}/copy | ||
73 | chmod 660 ${DIR2}/copy | ||
74 | $SUDO chown root ${DIR2}/copy | ||
75 | $SCP -p $scpopts somehost:${DIR}/\* ${DIR2} >/dev/null 2>&1 | ||
76 | diff -rN ${DIR} ${DIR2} || fail "corrupted copy" | ||
77 | $SUDO rm ${DIR2}/copy | ||
78 | fi | ||
79 | |||
67 | for i in 0 1 2 3 4; do | 80 | for i in 0 1 2 3 4; do |
68 | verbose "$tid: disallow bad server #$i" | 81 | verbose "$tid: disallow bad server #$i" |
69 | SCPTESTMODE=badserver_$i | 82 | SCPTESTMODE=badserver_$i |