djm@openbsd.org | 37e5f4a | 2018-04-10 00:13:27 +0000 | [diff] [blame] | 1 | # $OpenBSD: authinfo.sh,v 1.3 2018/04/10 00:13:27 djm Exp $ |
djm@openbsd.org | c9cdef3 | 2017-06-24 06:35:24 +0000 | [diff] [blame] | 2 | # Placed in the Public Domain. |
| 3 | |
| 4 | tid="authinfo" |
| 5 | |
| 6 | # Ensure the environment variable doesn't leak when ExposeAuthInfo=no. |
| 7 | verbose "ExposeAuthInfo=no" |
| 8 | env SSH_USER_AUTH=blah ${SSH} -F $OBJ/ssh_proxy x \ |
Damien Miller | 4b7d8ac | 2018-03-26 09:37:02 +1100 | [diff] [blame] | 9 | 'env | grep SSH_USER_AUTH >/dev/null' && fail "SSH_USER_AUTH present" |
djm@openbsd.org | c9cdef3 | 2017-06-24 06:35:24 +0000 | [diff] [blame] | 10 | |
| 11 | verbose "ExposeAuthInfo=yes" |
| 12 | echo ExposeAuthInfo=yes >> $OBJ/sshd_proxy |
| 13 | ${SSH} -F $OBJ/ssh_proxy x \ |
| 14 | 'grep ^publickey "$SSH_USER_AUTH" /dev/null >/dev/null' || |
| 15 | fail "ssh with ExposeAuthInfo failed" |
| 16 | |
| 17 | # XXX test multiple auth and key contents |