summaryrefslogtreecommitdiff
path: root/regress/usr.bin
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2014-01-26 10:49:18 +0000
committerDamien Miller <djm@cvs.openbsd.org>2014-01-26 10:49:18 +0000
commita332e44ff000fb53590721c553741a0848e0f137 (patch)
tree5d6356bd821b37c0b8553df70d35732d91ad24c3 /regress/usr.bin
parent4ee29f8d32994a6eeb6eb15aad4bc3f5781dd2a7 (diff)
make sure $SCP is tested on the remote end rather than whichever one
happens to be in $PATH; from portable
Diffstat (limited to 'regress/usr.bin')
-rw-r--r--regress/usr.bin/ssh/scp-ssh-wrapper.sh8
-rw-r--r--regress/usr.bin/ssh/scp.sh3
2 files changed, 7 insertions, 4 deletions
diff --git a/regress/usr.bin/ssh/scp-ssh-wrapper.sh b/regress/usr.bin/ssh/scp-ssh-wrapper.sh
index d1005a995a1..59f1ff63e6d 100644
--- a/regress/usr.bin/ssh/scp-ssh-wrapper.sh
+++ b/regress/usr.bin/ssh/scp-ssh-wrapper.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# $OpenBSD: scp-ssh-wrapper.sh,v 1.2 2005/12/14 04:36:39 dtucker Exp $
+# $OpenBSD: scp-ssh-wrapper.sh,v 1.3 2014/01/26 10:49:17 djm Exp $
# Placed in the Public Domain.
printname () {
@@ -17,7 +17,7 @@ printname () {
}
# Discard all but last argument. We use arg later.
-while test "$1" != ""; do
+while test "x$1" != "x"; do
arg="$1"
shift
done
@@ -52,6 +52,8 @@ badserver_4)
echo "X"
;;
*)
- exec $arg
+ set -- $arg
+ shift
+ exec $SCP "$@"
;;
esac
diff --git a/regress/usr.bin/ssh/scp.sh b/regress/usr.bin/ssh/scp.sh
index 59d5d5e2e9c..e0d4053f5c2 100644
--- a/regress/usr.bin/ssh/scp.sh
+++ b/regress/usr.bin/ssh/scp.sh
@@ -1,4 +1,4 @@
-# $OpenBSD: scp.sh,v 1.9 2013/05/17 10:35:43 dtucker Exp $
+# $OpenBSD: scp.sh,v 1.10 2014/01/26 10:49:17 djm Exp $
# Placed in the Public Domain.
tid="scp"
@@ -13,6 +13,7 @@ SRC=`dirname ${SCRIPT}`
cp ${SRC}/scp-ssh-wrapper.sh ${OBJ}/scp-ssh-wrapper.scp
chmod 755 ${OBJ}/scp-ssh-wrapper.scp
scpopts="-q -S ${OBJ}/scp-ssh-wrapper.scp"
+export SCP # used in scp-ssh-wrapper.scp
scpclean() {
rm -rf ${COPY} ${COPY2} ${DIR} ${DIR2}