summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgrunk <grunk@openbsd.org>2006-07-06 12:01:53 +0000
committergrunk <grunk@openbsd.org>2006-07-06 12:01:53 +0000
commit29bbb4399ff1da14aadd2580cf1b1fe7f40f3d26 (patch)
tree92655e33609a65fc9d23a552b80d833ee86372ad
parentget rid of the unused sgl types (and the XXX on the one we actually do (diff)
downloadwireguard-openbsd-29bbb4399ff1da14aadd2580cf1b1fe7f40f3d26.tar.xz
wireguard-openbsd-29bbb4399ff1da14aadd2580cf1b1fe7f40f3d26.zip
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@
-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=$?