]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: don't attempt to connect to empty SSH_AUTH_SOCK; bz#293
authordjm@openbsd.org <djm@openbsd.org>
Fri, 30 Nov 2018 02:24:52 +0000 (02:24 +0000)
committerDamien Miller <djm@mindrot.org>
Fri, 7 Dec 2018 02:10:57 +0000 (13:10 +1100)
OpenBSD-Commit-ID: 0e8fc8f19f14b21adef7109e0faa583d87c0e929

authfd.c

index ecdd869abf01b10b8f2fb0254d4aafb66420fe12..cc9c6502dbc8412e60f0f7acf29d249cf44320ce 100644 (file)
--- a/authfd.c
+++ b/authfd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: authfd.c,v 1.111 2018/07/09 21:59:10 markus Exp $ */
+/* $OpenBSD: authfd.c,v 1.112 2018/11/30 02:24:52 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -94,7 +94,7 @@ ssh_get_authentication_socket(int *fdp)
                *fdp = -1;
 
        authsocket = getenv(SSH_AUTHSOCKET_ENV_NAME);
-       if (!authsocket)
+       if (authsocket == NULL || *authsocket == '\0')
                return SSH_ERR_AGENT_NOT_PRESENT;
 
        memset(&sunaddr, 0, sizeof(sunaddr));