]> asedeno.scripts.mit.edu Git - PuTTY.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'.)

[originally from svn r9225]

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;
 }