summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--regress/agent-ptrace.sh5
-rw-r--r--regress/agent.sh30
3 files changed, 24 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 549db120b..74390565e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,9 @@
4 - (djm) [sshd.c] Use kill(0, ...) instead of killpg(0, ...); the 4 - (djm) [sshd.c] Use kill(0, ...) instead of killpg(0, ...); the
5 latter being specified to have undefined behaviour in SUSv3; 5 latter being specified to have undefined behaviour in SUSv3;
6 ok dtucker 6 ok dtucker
7 - (tim) [regress/agent.sh regress/agent-ptrace.sh] Assign $? to a variable
8 when used as an error message inside an if statement so we display the
9 correct into. agent.sh patch from Petr Lautrbach.
7 10
820140127 1120140127
9 - (dtucker) [Makefile.in] Remove trailing backslash which some make 12 - (dtucker) [Makefile.in] Remove trailing backslash which some make
diff --git a/regress/agent-ptrace.sh b/regress/agent-ptrace.sh
index 6824b8141..ae150641f 100644
--- a/regress/agent-ptrace.sh
+++ b/regress/agent-ptrace.sh
@@ -45,8 +45,9 @@ else
45 gdb ${SSHAGENT} ${SSH_AGENT_PID} > ${OBJ}/gdb.out 2>&1 << EOF 45 gdb ${SSHAGENT} ${SSH_AGENT_PID} > ${OBJ}/gdb.out 2>&1 << EOF
46 quit 46 quit
47EOF 47EOF
48 if [ $? -ne 0 ]; then 48 r=$?
49 fail "gdb failed: exit code $?" 49 if [ $r -ne 0 ]; then
50 fail "gdb failed: exit code $r"
50 fi 51 fi
51 egrep 'ptrace: Operation not permitted.|procfs:.*Permission denied.|ttrace.*Permission denied.|procfs:.*: Invalid argument.|Unable to access task ' >/dev/null ${OBJ}/gdb.out 52 egrep 'ptrace: Operation not permitted.|procfs:.*Permission denied.|ttrace.*Permission denied.|procfs:.*: Invalid argument.|Unable to access task ' >/dev/null ${OBJ}/gdb.out
52 r=$? 53 r=$?
diff --git a/regress/agent.sh b/regress/agent.sh
index 90bad15d4..cf1a45fe0 100644
--- a/regress/agent.sh
+++ b/regress/agent.sh
@@ -34,40 +34,46 @@ else
34 fi 34 fi
35 done 35 done
36 ${SSHADD} -l > /dev/null 2>&1 36 ${SSHADD} -l > /dev/null 2>&1
37 if [ $? -ne 0 ]; then 37 r=$?
38 fail "ssh-add -l failed: exit code $?" 38 if [ $r -ne 0 ]; then
39 fail "ssh-add -l failed: exit code $r"
39 fi 40 fi
40 # the same for full pubkey output 41 # the same for full pubkey output
41 ${SSHADD} -L > /dev/null 2>&1 42 ${SSHADD} -L > /dev/null 2>&1
42 if [ $? -ne 0 ]; then 43 r=$?
43 fail "ssh-add -L failed: exit code $?" 44 if [ $r -ne 0 ]; then
45 fail "ssh-add -L failed: exit code $r"
44 fi 46 fi
45 47
46 trace "simple connect via agent" 48 trace "simple connect via agent"
47 for p in 1 2; do 49 for p in 1 2; do
48 ${SSH} -$p -F $OBJ/ssh_proxy somehost exit 5$p 50 ${SSH} -$p -F $OBJ/ssh_proxy somehost exit 5$p
49 if [ $? -ne 5$p ]; then 51 r=$?
50 fail "ssh connect with protocol $p failed (exit code $?)" 52 if [ $r -ne 5$p ]; then
53 fail "ssh connect with protocol $p failed (exit code $r)"
51 fi 54 fi
52 done 55 done
53 56
54 trace "agent forwarding" 57 trace "agent forwarding"
55 for p in 1 2; do 58 for p in 1 2; do
56 ${SSH} -A -$p -F $OBJ/ssh_proxy somehost ${SSHADD} -l > /dev/null 2>&1 59 ${SSH} -A -$p -F $OBJ/ssh_proxy somehost ${SSHADD} -l > /dev/null 2>&1
57 if [ $? -ne 0 ]; then 60 r=$?
58 fail "ssh-add -l via agent fwd proto $p failed (exit code $?)" 61 if [ $r -ne 0 ]; then
62 fail "ssh-add -l via agent fwd proto $p failed (exit code $r)"
59 fi 63 fi
60 ${SSH} -A -$p -F $OBJ/ssh_proxy somehost \ 64 ${SSH} -A -$p -F $OBJ/ssh_proxy somehost \
61 "${SSH} -$p -F $OBJ/ssh_proxy somehost exit 5$p" 65 "${SSH} -$p -F $OBJ/ssh_proxy somehost exit 5$p"
62 if [ $? -ne 5$p ]; then 66 r=$?
63 fail "agent fwd proto $p failed (exit code $?)" 67 if [ $r -ne 5$p ]; then
68 fail "agent fwd proto $p failed (exit code $r)"
64 fi 69 fi
65 done 70 done
66 71
67 trace "delete all agent keys" 72 trace "delete all agent keys"
68 ${SSHADD} -D > /dev/null 2>&1 73 ${SSHADD} -D > /dev/null 2>&1
69 if [ $? -ne 0 ]; then 74 r=$?
70 fail "ssh-add -D failed: exit code $?" 75 if [ $r -ne 0 ]; then
76 fail "ssh-add -D failed: exit code $r"
71 fi 77 fi
72 78
73 trace "kill agent" 79 trace "kill agent"