diff options
author | Darren Tucker <dtucker@zip.com.au> | 2004-12-06 23:03:27 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2004-12-06 23:03:27 +1100 |
commit | ccf077918587d9f881dd31577e2129d301572b13 (patch) | |
tree | 9c6c77180041102d9674e0d07345d3dd8102ed2d | |
parent | a372960fa9b7a6723910205bf8c05243076ff0ee (diff) |
- dtucker@cvs.openbsd.org 2004/07/08 12:59:35
[scp.sh]
Regress test for bz #863 (scp double-error), requires $SUDO. ok markus@
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | regress/scp.sh | 15 |
2 files changed, 18 insertions, 2 deletions
@@ -26,6 +26,9 @@ | |||
26 | [reexec.sh] | 26 | [reexec.sh] |
27 | don't change the name of the copied sshd for the reexec fallback test, | 27 | don't change the name of the copied sshd for the reexec fallback test, |
28 | makes life simpler for portable | 28 | makes life simpler for portable |
29 | - dtucker@cvs.openbsd.org 2004/07/08 12:59:35 | ||
30 | [scp.sh] | ||
31 | Regress test for bz #863 (scp double-error), requires $SUDO. ok markus@ | ||
29 | 32 | ||
30 | 20041203 | 33 | 20041203 |
31 | - (dtucker) OpenBSD CVS Sync | 34 | - (dtucker) OpenBSD CVS Sync |
@@ -1899,4 +1902,4 @@ | |||
1899 | - (djm) Trim deprecated options from INSTALL. Mention UsePAM | 1902 | - (djm) Trim deprecated options from INSTALL. Mention UsePAM |
1900 | - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu | 1903 | - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu |
1901 | 1904 | ||
1902 | $Id: ChangeLog,v 1.3591 2004/12/06 12:00:27 dtucker Exp $ | 1905 | $Id: ChangeLog,v 1.3592 2004/12/06 12:03:27 dtucker Exp $ |
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 |