[openssh-commits] [openssh] 03/05: upstream: test implicit destination path selection when source path
git+noreply at mindrot.org
git+noreply at mindrot.org
Mon Oct 13 11:57:26 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 36a98fccaacbbf07eaf67855a8057cba724c5e91
Author: djm at openbsd.org <djm at openbsd.org>
AuthorDate: Mon Oct 13 00:55:09 2025 +0000
upstream: test implicit destination path selection when source path
ends with ".."
OpenBSD-Regress-ID: 42a88e7cdceee8a83879f5730199084ee4a95902
---
regress/scp.sh | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/regress/scp.sh b/regress/scp.sh
index 640cf434f..98f45129b 100644
--- a/regress/scp.sh
+++ b/regress/scp.sh
@@ -1,4 +1,4 @@
-# $OpenBSD: scp.sh,v 1.19 2023/09/08 05:50:57 djm Exp $
+# $OpenBSD: scp.sh,v 1.20 2025/10/13 00:55:09 djm Exp $
# Placed in the Public Domain.
tid="scp"
@@ -199,6 +199,19 @@ for mode in scp sftp ; do
echo b > ${COPY2}
$SCP $scpopts ${DATA} ${COPY} ${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 local .. to remote dir"
+ forest
+ $SCP $scpopts -r ${DIR}/subdir/.. somehost:${DIR2} || fail "copy failed"
+ diff ${DIFFOPT} ${DIR} ${DIR2} || fail "corrupted copy"
+
+ verbose "$tag: recursive remote .. to local dir"
+ forest
+ $SCP $scpopts -r somehost:${DIR}/subdir/.. ${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