[openssh-commits] [openssh] 05/05: upstream: test remote/remote recursive transfers where the source

git+noreply at mindrot.org git+noreply at mindrot.org
Mon Oct 13 11:57:28 AEDT 2025


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit cd8c96f283dbad90991edc09ade962bcfd96adc9
Author: djm at openbsd.org <djm at openbsd.org>
AuthorDate: Mon Oct 13 00:56:15 2025 +0000

    upstream: test remote/remote recursive transfers where the source
    
    path ends in ".."
    
    OpenBSD-Regress-ID: 2f42078cfcee986d08b5d135968b8de6186c0003
---
 regress/scp3.sh | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/regress/scp3.sh b/regress/scp3.sh
index eeb7a9dde..ef316c099 100644
--- a/regress/scp3.sh
+++ b/regress/scp3.sh
@@ -1,4 +1,4 @@
-#	$OpenBSD: scp3.sh,v 1.5 2023/09/08 06:10:57 djm Exp $
+#	$OpenBSD: scp3.sh,v 1.6 2025/10/13 00:56:15 djm Exp $
 #	Placed in the Public Domain.
 
 tid="scp3"
@@ -6,6 +6,7 @@ tid="scp3"
 COPY2=${OBJ}/copy2
 DIR=${COPY}.dd
 DIR2=${COPY}.dd2
+DIFFOPT="-rN"
 
 maybe_add_scp_path_to_sshd
 
@@ -63,6 +64,15 @@ for mode in scp sftp ; do
 	echo b > ${COPY2}
 	$SCP $scpopts -3 hostA:${DATA} hostA:${COPY} hostB:${COPY2}
 	cmp ${COPY} ${COPY2} >/dev/null && fail "corrupt target"
+
+	# scp /blah/.. is only supported via the sftp protocol.
+	# Original protocol scp just refuses it.
+	test $mode != sftp && continue
+	verbose "$tag: recursive .."
+	forest
+	$SCP $scpopts -r hostA:${DIR}/subdir/.. hostB:${DIR2} || \
+		fail "copy failed"
+	diff ${DIFFOPT} ${DIR} ${DIR2} || fail "corrupted copy"
 done
 
 scpclean

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list