Bugzilla – Attachment 670 Details for
Bug 863
SCP misses copying a file on error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Regression test for this problem (against OpenBSD).
openbsd-regress-scp-skip.patch (text/plain), 1.53 KB, created by
Darren Tucker
on 2004-06-28 19:42:02 AEST
(
hide
)
Description:
Regression test for this problem (against OpenBSD).
Filename:
MIME Type:
Creator:
Darren Tucker
Created:
2004-06-28 19:42:02 AEST
Size:
1.53 KB
patch
obsolete
>Additional regress test for the scp skip-after-error bug (bz #863). > >Because this needs to cause fchmod to fail, it needs $SUDO set in >order to run, so it uncomments "SUDO=" in test-exec.sh, although >that might not be wanted for the general case. > >Index: scp.sh >=================================================================== >RCS file: /cvs/src/regress/usr.bin/ssh/scp.sh,v >retrieving revision 1.2 >diff -u -p -r1.2 scp.sh >--- scp.sh 16 Jun 2004 13:15:09 -0000 1.2 >+++ scp.sh 28 Jun 2004 04:07:34 -0000 >@@ -57,6 +57,19 @@ cp ${DATA} ${DIR}/copy > $SCP $scpopts -r somehost:${DIR} ${DIR2} || fail "copy failed" > diff -rN ${DIR} ${DIR2} || fail "corrupted copy" > >+if [ ! -z "$SUDO" ]; then >+ verbose "$tid: skipped file after scp -p with failed chown+utimes" >+ scpclean >+ cp -p ${DATA} ${DIR}/copy >+ cp -p ${DATA} ${DIR}/copy2 >+ cp ${DATA} ${DIR2}/copy >+ chmod 660 ${DIR2}/copy >+ $SUDO chown root ${DIR2}/copy >+ $SCP -p $scpopts somehost:${DIR}/\* ${DIR2} >/dev/null 2>&1 >+ diff -rN ${DIR} ${DIR2} || fail "corrupted copy" >+ $SUDO rm ${DIR2}/copy >+fi >+ > for i in 0 1 2 3 4; do > verbose "$tid: disallow bad server #$i" > SCPTESTMODE=badserver_$i >Index: test-exec.sh >=================================================================== >RCS file: /cvs/src/regress/usr.bin/ssh/test-exec.sh,v >retrieving revision 1.23 >diff -u -p -r1.23 test-exec.sh >--- test-exec.sh 25 Jun 2004 01:25:12 -0000 1.23 >+++ test-exec.sh 28 Jun 2004 04:07:34 -0000 >@@ -2,7 +2,7 @@ > # Placed in the Public Domain. > > USER=`id -un` >-SUDO= >+#SUDO= > #SUDO=sudo > > if [ ! -z "$TEST_SSH_PORT" ]; then
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 863
:
664
|
669
| 670