From 2527703c0690f4a24224068ff3a2e009d29447fa Mon Sep 17 00:00:00 2001 From: simon Date: Sat, 16 Jul 2011 12:03:14 +0000 Subject: [PATCH] Mostly cosmetic change: don't claim to have found an SSH agent if SSH_AUTH_SOCK is defined to the empty string. (Because a common way to 'unset' it is to run commands like 'SSH_AUTH_SOCK= putty -load thing'.) git-svn-id: svn://svn.tartarus.org/sgt/putty@9225 cda61777-01e9-0310-a592-d414129be87e --- unix/uxagentc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/unix/uxagentc.c b/unix/uxagentc.c index 3605c601..9f579cd9 100644 --- a/unix/uxagentc.c +++ b/unix/uxagentc.c @@ -17,7 +17,8 @@ int agent_exists(void) { - if (getenv("SSH_AUTH_SOCK") != NULL) + const char *p = getenv("SSH_AUTH_SOCK"); + if (p && *p) return TRUE; return FALSE; } -- 2.11.0