upstream commit

use correct ssh-add program; bz#2654, from Colin Watson

Upstream-Regress-ID: 7042a36e1bdaec6562f6e57e9d047efe9c7a6030
This commit is contained in:
djm@openbsd.org 2017-01-06 02:51:16 +00:00 committed by Damien Miller
parent e5c7ec67cd
commit 01cfaa2b1c
1 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: agent-getpeereid.sh,v 1.7 2016/09/26 21:34:38 bluhm Exp $ # $OpenBSD: agent-getpeereid.sh,v 1.8 2017/01/06 02:51:16 djm Exp $
# Placed in the Public Domain. # Placed in the Public Domain.
tid="disallow agent attach from other uid" tid="disallow agent attach from other uid"
@ -32,17 +32,17 @@ if [ $r -ne 0 ]; then
else else
chmod 644 ${SSH_AUTH_SOCK} chmod 644 ${SSH_AUTH_SOCK}
ssh-add -l > /dev/null 2>&1 ${SSHADD} -l > /dev/null 2>&1
r=$? r=$?
if [ $r -ne 1 ]; then if [ $r -ne 1 ]; then
fail "ssh-add failed with $r != 1" fail "ssh-add failed with $r != 1"
fi fi
if test -z "$sudo" ; then if test -z "$sudo" ; then
# doas # doas
${SUDO} -n -u ${UNPRIV} ssh-add -l 2>/dev/null ${SUDO} -n -u ${UNPRIV} ${SSHADD} -l 2>/dev/null
else else
# sudo # sudo
< /dev/null ${SUDO} -S -u ${UNPRIV} ssh-add -l 2>/dev/null < /dev/null ${SUDO} -S -u ${UNPRIV} ${SSHADD} -l 2>/dev/null
fi fi
r=$? r=$?
if [ $r -lt 2 ]; then if [ $r -lt 2 ]; then