[openssh-commits] [openssh] branch master updated: upstream: regression test for Include variable expansion
git+noreply at mindrot.org
git+noreply at mindrot.org
Tue Sep 3 16:03:15 AEST 2024
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
The following commit(s) were added to refs/heads/master by this push:
new d19dea63 upstream: regression test for Include variable expansion
d19dea63 is described below
commit d19dea6330ecd4eb403fef2423bd7e127f4c9828
Author: djm at openbsd.org <djm at openbsd.org>
AuthorDate: Tue Sep 3 05:58:56 2024 +0000
upstream: regression test for Include variable expansion
OpenBSD-Regress-ID: 35477da3ba1abd9ca64bc49080c50a9c1350c6ca
---
regress/cfginclude.sh | 26 ++++++++++++++++++++++++--
1 file changed, 24 insertions(+), 2 deletions(-)
diff --git a/regress/cfginclude.sh b/regress/cfginclude.sh
index f5b492f1..d442cdd6 100644
--- a/regress/cfginclude.sh
+++ b/regress/cfginclude.sh
@@ -1,4 +1,4 @@
-# $OpenBSD: cfginclude.sh,v 1.3 2021/06/08 06:52:43 djm Exp $
+# $OpenBSD: cfginclude.sh,v 1.4 2024/09/03 05:58:56 djm Exp $
# Placed in the Public Domain.
tid="config include"
@@ -142,7 +142,7 @@ trial a aa
# cleanup
rm -f $OBJ/ssh_config.i $OBJ/ssh_config.i.* $OBJ/ssh_config.out
-# $OpenBSD: cfginclude.sh,v 1.3 2021/06/08 06:52:43 djm Exp $
+# $OpenBSD: cfginclude.sh,v 1.4 2024/09/03 05:58:56 djm Exp $
# Placed in the Public Domain.
tid="config include"
@@ -289,5 +289,27 @@ _EOF
${REAL_SSH} -F $OBJ/ssh_config.i -G a 2>/dev/null && \
fail "ssh include allowed infinite recursion?" # or hang...
+# Environment variable expansion
+cat > $OBJ/ssh_config.i << _EOF
+Include $OBJ/ssh_config.\${REAL_FILE}
+_EOF
+cat > $OBJ/ssh_config.i.x << _EOF
+Hostname xyzzy
+_EOF
+REAL_FILE=i.x
+export REAL_FILE
+trial a xyzzy
+
+# Environment variable expansion
+cat > $OBJ/ssh_config.i << _EOF
+Include $OBJ/ssh_config.i.%h%h
+_EOF
+cat > $OBJ/ssh_config.i.blahblah << _EOF
+Hostname mekmitastdigoat
+_EOF
+REAL_FILE=i.x
+export REAL_FILE
+trial blah mekmitastdigoat
+
# cleanup
rm -f $OBJ/ssh_config.i $OBJ/ssh_config.i.* $OBJ/ssh_config.out
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list