[openssh-commits] [openssh] 01/02: upstream: Add percent_expand test for 'Match Exec'.

git+noreply at mindrot.org git+noreply at mindrot.org
Fri Apr 3 15:46:21 AEDT 2020


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

djm pushed a commit to branch master
in repository openssh.

commit 92115ea7c3a834374720c350841fc729e7d5c8b2
Author: dtucker at openbsd.org <dtucker at openbsd.org>
Date:   Fri Apr 3 03:14:03 2020 +0000

    upstream: Add percent_expand test for 'Match Exec'.
    
    OpenBSD-Regress-ID: a41c14fd6a0b54d66aa1e9eebfb9ec962b41232f
---
 regress/percent.sh | 21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

diff --git a/regress/percent.sh b/regress/percent.sh
index 84999fd0..7e19abe8 100644
--- a/regress/percent.sh
+++ b/regress/percent.sh
@@ -1,4 +1,4 @@
-#	$OpenBSD: percent.sh,v 1.1 2020/04/03 02:33:31 dtucker Exp $
+#	$OpenBSD: percent.sh,v 1.2 2020/04/03 03:14:03 dtucker Exp $
 #	Placed in the Public Domain.
 
 tid="percent expansions"
@@ -19,14 +19,24 @@ trial()
 	opt="$1"; arg="$2"; expect="$3"
 
 	trace "test $opt=$arg $expect"
-	if [ "$opt" = "localcommand" ]; then
+	rm -f $OBJ/actual
+	case "$opt" in
+	localcommand)
 		${SSH} -F $OBJ/ssh_proxy -o $opt="echo '$arg' >$OBJ/actual" \
 		    somehost true
 		got=`cat $OBJ/actual`
-	else
+		;;
+	matchexec)
+		(cat $OBJ/ssh_proxy && \
+		 echo "Match Exec \"echo '$arg' >$OBJ/actual\"") \
+		    >$OBJ/ssh_proxy_match
+		${SSH} -F $OBJ/ssh_proxy_match remuser at somehost true || true
+		got=`cat $OBJ/actual`
+		;;
+	*)
 		got=`${SSH} -F $OBJ/ssh_proxy -o $opt="$arg" -G \
 		    remuser at somehost | awk '$1=="'$opt'"{print $2}'`
-	fi
+	esac
 	if [ "$got" != "$expect" ]; then
 		fail "$opt=$arg expect $expect got $got"
 	else
@@ -34,7 +44,8 @@ trial()
 	fi
 }
 
-for i in localcommand remotecommand controlpath identityagent forwardagent; do
+for i in matchexec localcommand remotecommand controlpath identityagent \
+    forwardagent; do
 	if [ "$i" = "localcommand" ]; then
 		HASH=94237ca18fe6b187dccf57e5593c0bb0a29cc302
 		REMUSER=$USER

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


More information about the openssh-commits mailing list