summaryrefslogtreecommitdiff
path: root/regress/agent-getpeereid.sh
diff options
context:
space:
mode:
Diffstat (limited to 'regress/agent-getpeereid.sh')
-rw-r--r--regress/agent-getpeereid.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/regress/agent-getpeereid.sh b/regress/agent-getpeereid.sh
index 91621a59c..34bced154 100644
--- a/regress/agent-getpeereid.sh
+++ b/regress/agent-getpeereid.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: agent-getpeereid.sh,v 1.7 2016/09/26 21:34:38 bluhm Exp $ 1# $OpenBSD: agent-getpeereid.sh,v 1.8 2017/01/06 02:51:16 djm Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="disallow agent attach from other uid" 4tid="disallow agent attach from other uid"
@@ -32,17 +32,17 @@ if [ $r -ne 0 ]; then
32else 32else
33 chmod 644 ${SSH_AUTH_SOCK} 33 chmod 644 ${SSH_AUTH_SOCK}
34 34
35 ssh-add -l > /dev/null 2>&1 35 ${SSHADD} -l > /dev/null 2>&1
36 r=$? 36 r=$?
37 if [ $r -ne 1 ]; then 37 if [ $r -ne 1 ]; then
38 fail "ssh-add failed with $r != 1" 38 fail "ssh-add failed with $r != 1"
39 fi 39 fi
40 if test -z "$sudo" ; then 40 if test -z "$sudo" ; then
41 # doas 41 # doas
42 ${SUDO} -n -u ${UNPRIV} ssh-add -l 2>/dev/null 42 ${SUDO} -n -u ${UNPRIV} ${SSHADD} -l 2>/dev/null
43 else 43 else
44 # sudo 44 # sudo
45 < /dev/null ${SUDO} -S -u ${UNPRIV} ssh-add -l 2>/dev/null 45 < /dev/null ${SUDO} -S -u ${UNPRIV} ${SSHADD} -l 2>/dev/null
46 fi 46 fi
47 r=$? 47 r=$?
48 if [ $r -lt 2 ]; then 48 if [ $r -lt 2 ]; then