summaryrefslogtreecommitdiff
path: root/regress/authinfo.sh
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2017-06-24 06:35:24 +0000
committerDamien Miller <djm@mindrot.org>2017-06-24 17:29:55 +1000
commitc9cdef35524bd59007e17d5bd2502dade69e2dfb (patch)
treeb38d6b81321f0a4df92745e3f02b3eac7be8b870 /regress/authinfo.sh
parentf17ee61cad25d210edab69d04ed447ad55fe80c1 (diff)
upstream commit
regress test for ExposeAuthInfo Upstream-Regress-ID: 190e5b6866376f4061c411ab157ca4d4e7ae86fd
Diffstat (limited to 'regress/authinfo.sh')
-rw-r--r--regress/authinfo.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/regress/authinfo.sh b/regress/authinfo.sh
new file mode 100644
index 00000000..e725296c
--- /dev/null
+++ b/regress/authinfo.sh
@@ -0,0 +1,17 @@
+# $OpenBSD: authinfo.sh,v 1.1 2017/06/24 06:35:24 djm Exp $
+# Placed in the Public Domain.
+
+tid="authinfo"
+
+# Ensure the environment variable doesn't leak when ExposeAuthInfo=no.
+verbose "ExposeAuthInfo=no"
+env SSH_USER_AUTH=blah ${SSH} -F $OBJ/ssh_proxy x \
+ 'test -z "$SSH_USER_AUTH"' || fail "SSH_USER_AUTH present"
+
+verbose "ExposeAuthInfo=yes"
+echo ExposeAuthInfo=yes >> $OBJ/sshd_proxy
+${SSH} -F $OBJ/ssh_proxy x \
+ 'grep ^publickey "$SSH_USER_AUTH" /dev/null >/dev/null' ||
+ fail "ssh with ExposeAuthInfo failed"
+
+# XXX test multiple auth and key contents