summaryrefslogtreecommitdiffstats
path: root/readpass.c
diff options
context:
space:
mode:
Diffstat (limited to 'readpass.c')
-rw-r--r--readpass.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/readpass.c b/readpass.c
index b4421ade..96b7e84b 100644
--- a/readpass.c
+++ b/readpass.c
@@ -23,7 +23,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: readpass.c,v 1.26 2002/02/13 00:39:15 markus Exp $");
+RCSID("$OpenBSD: readpass.c,v 1.27 2002/03/26 15:58:46 markus Exp $");
#include "xmalloc.h"
#include "readpass.h"
@@ -118,8 +118,11 @@ read_passphrase(const char *prompt, int flags)
return ssh_askpass(askpass, prompt);
}
- if (readpassphrase(prompt, buf, sizeof buf, rppflags) == NULL)
+ if (readpassphrase(prompt, buf, sizeof buf, rppflags) == NULL) {
+ if (flags & RP_ALLOW_EOF)
+ return NULL;
return xstrdup("");
+ }
ret = xstrdup(buf);
memset(buf, 'x', sizeof buf);