Skip to content

Commit

Permalink
Relax implicit ASKPASS requirements for X11 forwarding scenarios (#428)
Browse files Browse the repository at this point in the history
  • Loading branch information
riverar authored Feb 28, 2020
1 parent a4e42bd commit 5207e6f
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 5207e6f

Please sign in to comment.