diff options
author | djm@openbsd.org <djm@openbsd.org> | 2018-11-30 02:24:52 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2018-12-07 13:10:57 +1100 |
commit | 87d6cf1cbc91df6815db8fe0acc7c910bc3d18e4 (patch) | |
tree | 7ae543310f498e487172bc9a13f6c9314e521a21 | |
parent | 91b19198c3f604f5eef2c56dbe36f29478243141 (diff) |
upstream: don't attempt to connect to empty SSH_AUTH_SOCK; bz#293
OpenBSD-Commit-ID: 0e8fc8f19f14b21adef7109e0faa583d87c0e929
-rw-r--r-- | authfd.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: authfd.c,v 1.111 2018/07/09 21:59:10 markus Exp $ */ | 1 | /* $OpenBSD: authfd.c,v 1.112 2018/11/30 02:24:52 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -94,7 +94,7 @@ ssh_get_authentication_socket(int *fdp) | |||
94 | *fdp = -1; | 94 | *fdp = -1; |
95 | 95 | ||
96 | authsocket = getenv(SSH_AUTHSOCKET_ENV_NAME); | 96 | authsocket = getenv(SSH_AUTHSOCKET_ENV_NAME); |
97 | if (!authsocket) | 97 | if (authsocket == NULL || *authsocket == '\0') |
98 | return SSH_ERR_AGENT_NOT_PRESENT; | 98 | return SSH_ERR_AGENT_NOT_PRESENT; |
99 | 99 | ||
100 | memset(&sunaddr, 0, sizeof(sunaddr)); | 100 | memset(&sunaddr, 0, sizeof(sunaddr)); |