Skip to content

Commit

Permalink
Relax implicit ASKPASS requirements in X11 forwarding scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
riverar committed Feb 14, 2020
1 parent ee11c8e commit 48919b4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions readpass.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,19 @@ read_passphrase(const char *prompt, int flags)
askpass = getenv(SSH_ASKPASS_ENV);
else
askpass = _PATH_SSH_ASKPASS_DEFAULT;

#ifdef WINDOWS
if (getenv(SSH_ASKPASS_ENV)) {
#endif

if ((ret = ssh_askpass(askpass, prompt)) == NULL)
if (!(flags & RP_ALLOW_EOF))
return xstrdup("");
return ret;

#ifdef WINDOWS
}
#endif
}

if (readpassphrase(prompt, buf, sizeof buf, rppflags) == NULL) {
Expand Down

0 comments on commit 48919b4

Please sign in to comment.