summaryrefslogtreecommitdiffstats
path: root/crypto/openssh/readpass.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssh/readpass.c')
-rw-r--r--crypto/openssh/readpass.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/crypto/openssh/readpass.c b/crypto/openssh/readpass.c
index c55dd21..dc1b11f 100644
--- a/crypto/openssh/readpass.c
+++ b/crypto/openssh/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 <readpassphrase.h>
@@ -120,8 +120,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);
OpenPOWER on IntegriCloud