X-Git-Url: http://andersk.mit.edu/gitweb/openssh.git/blobdiff_plain/cf8dd51301ee1fe4a405a8e26bc6bed6f1793506..0f121b102c3885de88ac1a8d265ee4008b6dd1ff:/ssh-add.c diff --git a/ssh-add.c b/ssh-add.c index 2ade9c23..d81510e1 100644 --- a/ssh-add.c +++ b/ssh-add.c @@ -106,8 +106,12 @@ add_file(AuthenticationConnection *ac, const char *filename) } RSA_free(public_key); - if (!interactive && getenv("DISPLAY")) - askpass = getenv("SSH_ASKPASS"); + if (!interactive && getenv("DISPLAY")) { + if (getenv(SSH_ASKPASS_ENV)) + askpass = getenv(SSH_ASKPASS_ENV); + else + askpass = SSH_ASKPASS_DEFAULT; + } /* At first, try empty passphrase */ success = load_private_key(filename, "", key, &comment);