[Bug 2936] ssh tries to use empty $SSH_AUTH_SOCK

bugzilla-daemon at bugzilla.mindrot.org bugzilla-daemon at bugzilla.mindrot.org
Fri Nov 30 01:10:29 AEDT 2018


https://bugzilla.mindrot.org/show_bug.cgi?id=2936

Jakub Jelen <jjelen at redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jjelen at redhat.com

--- Comment #1 from Jakub Jelen <jjelen at redhat.com> ---
The following patch should take care of this:

diff --git a/authfd.c b/authfd.c
index ecdd869a..972f1b5f 100644
--- a/authfd.c
+++ b/authfd.c
@@ -94,7 +94,7 @@ ssh_get_authentication_socket(int *fdp)
                *fdp = -1;

        authsocket = getenv(SSH_AUTHSOCKET_ENV_NAME);
-       if (!authsocket)
+       if (!authsocket || authsocket[0] == '\0')
                return SSH_ERR_AGENT_NOT_PRESENT;

        memset(&sunaddr, 0, sizeof(sunaddr));

-- 
You are receiving this mail because:
You are watching the assignee of the bug.


More information about the openssh-bugs mailing list