X-Git-Url: http://andersk.mit.edu/gitweb/gssapi-openssh.git/blobdiff_plain/b86c3c30e252d7d65f3965b9e1c8e7ddc715c0ab..cdd66111973295c976f1a0bb57f571eba0513757:/openssh/regress/agent-ptrace.sh?ds=sidebyside diff --git a/openssh/regress/agent-ptrace.sh b/openssh/regress/agent-ptrace.sh index cd9c002..bd79d7c 100644 --- a/openssh/regress/agent-ptrace.sh +++ b/openssh/regress/agent-ptrace.sh @@ -5,7 +5,7 @@ tid="disallow agent ptrace attach" if have_prog uname ; then case `uname` in - Linux|HP-UX|SunOS|NetBSD|AIX|CYGWIN*) + AIX|CYGWIN*) echo "skipped (not supported on this platform)" exit 0 ;; @@ -19,6 +19,15 @@ else exit 0 fi +if test -z "$SUDO" ; then + echo "skipped (SUDO not set)" + exit 0 +else + $SUDO chown 0 ${SSHAGENT} + $SUDO chgrp 0 ${SSHAGENT} + $SUDO chmod 2755 ${SSHAGENT} +fi + trace "start agent" eval `${SSHAGENT} -s` > /dev/null r=$? @@ -32,7 +41,7 @@ EOF if [ $? -ne 0 ]; then fail "gdb failed: exit code $?" fi - grep 'ptrace: Operation not permitted.' >/dev/null ${OBJ}/gdb.out + egrep 'ptrace: Operation not permitted.|procfs:.*Permission denied.|ttrace attach: Permission denied.' >/dev/null ${OBJ}/gdb.out r=$? rm -f ${OBJ}/gdb.out if [ $r -ne 0 ]; then