From 17e9d1874187135db94551ba8f4b039eec4dae9f Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Fri, 11 Sep 2015 04:55:02 +0000 Subject: skip if running as root; many systems (inc OpenBSD) allow root to ptrace arbitrary processes --- regress/usr.bin/ssh/agent-ptrace.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'regress/usr.bin/ssh') 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=$? -- cgit v1.2.3