summaryrefslogtreecommitdiffstats
path: root/readpass.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2002-03-27 18:28:46 +0100
committerBen Lindstrom <mouring@eviladmin.org>2002-03-27 18:28:46 +0100
commit38a69e6b53ad05b39081f8531104be6d21970d79 (patch)
tree24de02e00310648775a48488559bf50e3fc24b85 /readpass.c
parent - markus@cvs.openbsd.org 2002/03/26 15:23:40 (diff)
downloadopenssh-38a69e6b53ad05b39081f8531104be6d21970d79.tar.xz
openssh-38a69e6b53ad05b39081f8531104be6d21970d79.zip
- 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 b4421ade0..96b7e84b4 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);