]> andersk Git - gssapi-openssh.git/blobdiff - openssh/regress/agent-ptrace.sh
Import of OpenSSH 4.6p1
[gssapi-openssh.git] / openssh / regress / agent-ptrace.sh
index cd9c0023da1f84cb6eb8b892a5fca0fd2d1fc003..d5892ed03098f4b9279840107bc7cbbddc84bc42 100644 (file)
@@ -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*|OSF1)
                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.*Permission denied.|procfs:.*: Invalid argument.' >/dev/null ${OBJ}/gdb.out
        r=$?
        rm -f ${OBJ}/gdb.out
        if [ $r -ne 0 ]; then
This page took 0.103711 seconds and 4 git commands to generate.