summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2015-09-11 04:55:02 +0000
committerDamien Miller <djm@cvs.openbsd.org>2015-09-11 04:55:02 +0000
commit17e9d1874187135db94551ba8f4b039eec4dae9f (patch)
tree1f6facc767d976487ef60cfe0d1110ccc3f3b695
parentc2e69103ecf053500af07488129944479f23b033 (diff)
skip if running as root; many systems (inc OpenBSD) allow
root to ptrace arbitrary processes
-rw-r--r--regress/usr.bin/ssh/agent-ptrace.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/regress/usr.bin/ssh/agent-ptrace.sh b/regress/usr.bin/ssh/agent-ptrace.sh
index 35a908b7c69..fbfe0ad933d 100644
--- a/regress/usr.bin/ssh/agent-ptrace.sh
+++ b/regress/usr.bin/ssh/agent-ptrace.sh
@@ -1,8 +1,13 @@
-# $OpenBSD: agent-ptrace.sh,v 1.2 2014/02/27 21:21:25 djm Exp $
+# $OpenBSD: agent-ptrace.sh,v 1.3 2015/09/11 04:55:01 djm Exp $
# Placed in the Public Domain.
tid="disallow agent ptrace attach"
+if [ "x$USER" = "xroot" ]; then
+ echo "Skipped: running as root"
+ exit 0
+fi
+
trace "start agent"
eval `${SSHAGENT} -s` > /dev/null
r=$?