summaryrefslogtreecommitdiff
path: root/readpass.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2002-03-27 17:28:46 +0000
committerBen Lindstrom <mouring@eviladmin.org>2002-03-27 17:28:46 +0000
commit38a69e6b53ad05b39081f8531104be6d21970d79 (patch)
tree24de02e00310648775a48488559bf50e3fc24b85 /readpass.c
parentcd8bbce80beaea59996d79d3ad91d6f9922257f1 (diff)
- markus@cvs.openbsd.org 2002/03/26 15:58:46
[readpass.c readpass.h sshconnect2.c] client side support for PASSWD_CHANGEREQ
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);