]> andersk Git - openssh.git/blobdiff - regress/agent-ptrace.sh
- (tim) [buildpkg.sh.in openssh.xml.in] Allow more flexibility where smf(5)
[openssh.git] / regress / agent-ptrace.sh
index b9d86a29dbafb582841b749ee6908806cb8e1614..d5892ed03098f4b9279840107bc7cbbddc84bc42 100644 (file)
@@ -5,18 +5,29 @@ 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
                ;;
        esac
 fi
 
-if ! have_prog gdb ; then
+if have_prog gdb ; then
+       : ok
+else
        echo "skipped (gdb not found)"
        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=$?
@@ -30,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.039354 seconds and 4 git commands to generate.