[openssh-commits] [openssh] 01/03: upstream: Log output of ssh-agent and ssh-add
git+noreply at mindrot.org
git+noreply at mindrot.org
Fri Dec 2 11:56:21 AEDT 2022
This is an automated email from the git hooks/post-receive script.
dtucker pushed a commit to branch master
in repository openssh.
commit 7a8b40cf6a5eda80173140cc6750a6db8412fa87
Author: dtucker at openbsd.org <dtucker at openbsd.org>
Date: Thu Dec 1 02:19:29 2022 +0000
upstream: Log output of ssh-agent and ssh-add
This should make debugging easier.
OpenBSD-Regress-ID: 5974b02651f428d7e1079b41304c498ca7e306c8
---
regress/agent-getpeereid.sh | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/regress/agent-getpeereid.sh b/regress/agent-getpeereid.sh
index b84471a7..79e9c7d9 100644
--- a/regress/agent-getpeereid.sh
+++ b/regress/agent-getpeereid.sh
@@ -6,6 +6,8 @@ tid="disallow agent attach from other uid"
UNPRIV=nobody
ASOCK=${OBJ}/agent
SSH_AUTH_SOCK=/nonexistent
+>$OBJ/ssh-agent.log
+>$OBJ/ssh-add.log
if config_defined HAVE_GETPEEREID HAVE_GETPEERUCRED HAVE_SO_PEERCRED ; then
:
@@ -25,14 +27,14 @@ case "x$SUDO" in
esac
trace "start agent"
-eval `${SSHAGENT} ${EXTRA_AGENT_ARGS} -s -a ${ASOCK}` > /dev/null
+eval `${SSHAGENT} ${EXTRA_AGENT_ARGS} -s -a ${ASOCK}` >$OBJ/ssh-agent.log 2>&1
r=$?
if [ $r -ne 0 ]; then
fail "could not start ssh-agent: exit code $r"
else
chmod 644 ${SSH_AUTH_SOCK}
- ${SSHADD} -l > /dev/null 2>&1
+ ${SSHADD} -vvv -l >>$OBJ/ssh-add.log 2>&1
r=$?
if [ $r -ne 1 ]; then
fail "ssh-add failed with $r != 1"
@@ -42,15 +44,16 @@ else
${SUDO} -n -u ${UNPRIV} ${SSHADD} -l 2>/dev/null
else
# sudo
- < /dev/null ${SUDO} -S -u ${UNPRIV} ${SSHADD} -l 2>/dev/null
+ < /dev/null ${SUDO} -S -u ${UNPRIV} ${SSHADD} -vvv -l >>$OBJ/ssh-add.log 2>&1
fi
r=$?
if [ $r -lt 2 ]; then
fail "ssh-add did not fail for ${UNPRIV}: $r < 2"
+ cat $OBJ/ssh-add.log
fi
trace "kill agent"
- ${SSHAGENT} -k > /dev/null
+ ${SSHAGENT} -vvv -k >>$OBJ/ssh-agent.log 2>&1
fi
rm -f ${OBJ}/agent
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list