diff options
Diffstat (limited to 'readpass.c')
-rw-r--r-- | readpass.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/readpass.c b/readpass.c index b4421ade0..96b7e84b4 100644 --- a/readpass.c +++ b/readpass.c | |||
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | RCSID("$OpenBSD: readpass.c,v 1.26 2002/02/13 00:39:15 markus Exp $"); | 26 | RCSID("$OpenBSD: readpass.c,v 1.27 2002/03/26 15:58:46 markus Exp $"); |
27 | 27 | ||
28 | #include "xmalloc.h" | 28 | #include "xmalloc.h" |
29 | #include "readpass.h" | 29 | #include "readpass.h" |
@@ -118,8 +118,11 @@ read_passphrase(const char *prompt, int flags) | |||
118 | return ssh_askpass(askpass, prompt); | 118 | return ssh_askpass(askpass, prompt); |
119 | } | 119 | } |
120 | 120 | ||
121 | if (readpassphrase(prompt, buf, sizeof buf, rppflags) == NULL) | 121 | if (readpassphrase(prompt, buf, sizeof buf, rppflags) == NULL) { |
122 | if (flags & RP_ALLOW_EOF) | ||
123 | return NULL; | ||
122 | return xstrdup(""); | 124 | return xstrdup(""); |
125 | } | ||
123 | 126 | ||
124 | ret = xstrdup(buf); | 127 | ret = xstrdup(buf); |
125 | memset(buf, 'x', sizeof buf); | 128 | memset(buf, 'x', sizeof buf); |