summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorAlexander von Gernler <grunk@cvs.openbsd.org>2006-07-06 12:01:54 +0000
committerAlexander von Gernler <grunk@cvs.openbsd.org>2006-07-06 12:01:54 +0000
commit737e3f589ea63478eb41f993ea0659fc68441d4c (patch)
tree33b086a9c53217aa7f99fa6c310fc9d2e5ac3c4d /regress
parentb8d20848fe1b10ead303308a909a169f6a4be7ab (diff)
in this test, $SUDO is not used to gain privileges but to switch to nobody.
thus, we need the SUDO variable to be set. if not set, the test would also pass ok, but only because exit status 2 and 127 looked the same to the test. ok markus@
Diffstat (limited to 'regress')
-rw-r--r--regress/usr.bin/ssh/agent-getpeereid.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/regress/usr.bin/ssh/agent-getpeereid.sh b/regress/usr.bin/ssh/agent-getpeereid.sh
index fac93c9a924..70e66be89ee 100644
--- a/regress/usr.bin/ssh/agent-getpeereid.sh
+++ b/regress/usr.bin/ssh/agent-getpeereid.sh
@@ -1,4 +1,4 @@
-# $OpenBSD: agent-getpeereid.sh,v 1.2 2005/11/14 21:25:56 grunk Exp $
+# $OpenBSD: agent-getpeereid.sh,v 1.3 2006/07/06 12:01:53 grunk Exp $
# Placed in the Public Domain.
tid="disallow agent attach from other uid"
@@ -7,6 +7,10 @@ UNPRIV=nobody
ASOCK=${OBJ}/agent
SSH_AUTH_SOCK=/nonexistant
+if [ -z "$SUDO" ]; then
+ fatal "need SUDO to switch to uid $UNPRIV, test won't work without"
+fi
+
trace "start agent"
eval `${SSHAGENT} -s -a ${ASOCK}` > /dev/null
r=$?