summaryrefslogtreecommitdiff
path: root/libexec/login_skey
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2004-03-10 21:30:28 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2004-03-10 21:30:28 +0000
commitff294b0a943dc81c4cf0a467e96b76d5442a1c4f (patch)
treeb92e051489c97d48a88503f132aa292be124df55 /libexec/login_skey
parent56d7d8a963877ba2ee5123ab43220c21f7fc6459 (diff)
More checking for a NULL return value from getpass(). otto@ OK
Diffstat (limited to 'libexec/login_skey')
-rw-r--r--libexec/login_skey/login_skey.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libexec/login_skey/login_skey.c b/libexec/login_skey/login_skey.c
index b71b1359e5c..fe7f33cea75 100644
--- a/libexec/login_skey/login_skey.c
+++ b/libexec/login_skey/login_skey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: login_skey.c,v 1.11 2002/09/06 18:45:07 deraadt Exp $ */
+/* $OpenBSD: login_skey.c,v 1.12 2004/03/10 21:30:27 millert Exp $ */
/*-
* Copyright (c) 1995 Berkeley Software Design, Inc. All rights reserved.
@@ -182,7 +182,8 @@ main(int argc, char *argv[])
if (haskey)
alarm(120);
resumed = 0;
- readpassphrase(skeyprompt, passbuf, sizeof(passbuf), 0);
+ if (!readpassphrase(skeyprompt, passbuf, sizeof(passbuf), 0))
+ exit(1);
if (passbuf[0] == '\0')
readpassphrase("S/Key Password [echo on]: ",
passbuf, sizeof(passbuf), RPP_ECHO_ON);