File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 1- # $OpenBSD: scp3.sh,v 1.5 2023/09/08 06:10:57 djm Exp $
1+ # $OpenBSD: scp3.sh,v 1.6 2025/10/13 00:56:15 djm Exp $
22# Placed in the Public Domain.
33
44tid=" scp3"
55
66COPY2=${OBJ} /copy2
77DIR=${COPY} .dd
88DIR2=${COPY} .dd2
9+ DIFFOPT=" -rN"
910
1011maybe_add_scp_path_to_sshd
1112
@@ -63,6 +64,15 @@ for mode in scp sftp ; do
6364 echo b > ${COPY2}
6465 $SCP $scpopts -3 hostA:${DATA} hostA:${COPY} hostB:${COPY2}
6566 cmp ${COPY} ${COPY2} > /dev/null && fail " corrupt target"
67+
68+ # scp /blah/.. is only supported via the sftp protocol.
69+ # Original protocol scp just refuses it.
70+ test $mode ! = sftp && continue
71+ verbose " $tag : recursive .."
72+ forest
73+ $SCP $scpopts -r hostA:${DIR} /subdir/.. hostB:${DIR2} || \
74+ fail " copy failed"
75+ diff ${DIFFOPT} ${DIR} ${DIR2} || fail " corrupted copy"
6676done
6777
6878scpclean
You can’t perform that action at this time.
0 commit comments