1 # $OpenBSD: agent-ptrace.sh,v 1.1 2002/12/09 15:38:30 markus Exp $
2 # Placed in the Public Domain.
4 tid="disallow agent ptrace attach"
6 if have_prog uname ; then
8 Linux|HP-UX|SunOS|NetBSD|AIX|CYGWIN*)
9 echo "skipped (not supported on this platform)"
15 if have_prog gdb ; then
18 echo "skipped (gdb not found)"
23 eval `${SSHAGENT} -s` > /dev/null
26 fail "could not start ssh-agent: exit code $r"
28 # ls -l ${SSH_AUTH_SOCK}
29 gdb ${SSHAGENT} ${SSH_AGENT_PID} > ${OBJ}/gdb.out 2>&1 << EOF
33 fail "gdb failed: exit code $?"
35 grep 'ptrace: Operation not permitted.' >/dev/null ${OBJ}/gdb.out
39 fail "ptrace succeeded?: exit code $r"
43 ${SSHAGENT} -k > /dev/null