]> asedeno.scripts.mit.edu Git - PuTTY_svn.git/commitdiff
Mostly cosmetic change: don't claim to have found an SSH agent if
authorSimon Tatham <anakin@pobox.com>
Sat, 16 Jul 2011 12:03:14 +0000 (12:03 +0000)
committerSimon Tatham <anakin@pobox.com>
Sat, 16 Jul 2011 12:03:14 +0000 (12:03 +0000)
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: http://svn.tartarus.org/sgt/putty@9225 cda61777-01e9-0310-a592-d414129be87e

unix/uxagentc.c

index 3605c60124316947ab346975086eccf463fb1cd3..9f579cd9488bda6efc085b30b4d6dcc65c413e12 100644 (file)
@@ -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;
 }