summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/authfd.c
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2018-11-30 02:24:53 +0000
committerDamien Miller <djm@cvs.openbsd.org>2018-11-30 02:24:53 +0000
commita14e29d81ddacc7985d024dd24728641558fc92e (patch)
tree22f4bd9d4af78c733983f2bbf0a3717a62483f93 /usr.bin/ssh/authfd.c
parentc645beb50af92de6987e780df1ca6bd85a077a91 (diff)
don't attempt to connect to empty SSH_AUTH_SOCK; bz#293
Diffstat (limited to 'usr.bin/ssh/authfd.c')
-rw-r--r--usr.bin/ssh/authfd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/authfd.c b/usr.bin/ssh/authfd.c
index 1c3632361d2..4a7f65eaf3d 100644
--- a/usr.bin/ssh/authfd.c
+++ b/usr.bin/ssh/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
@@ -92,7 +92,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));