summaryrefslogtreecommitdiffhomepage
path: root/cli-authpasswd.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2006-01-15 06:43:24 +0000
committerMatt Johnston <matt@ucc.asn.au>2006-01-15 06:43:24 +0000
commitfd0f873a367b133fd41af34dc168bd594ee2928c (patch)
tree95cd089b6b5b7e07e9d8fdaa03dbfb5aa6fffab4 /cli-authpasswd.c
parentd8e61e51ded9c7fb784d33f9939b9c40a967bc0f (diff)
Cancel a dbclient password prompt if the user presses ctrl-c.
Enter still has to be pressed since glibc blocks ctrl-c in getpass() --HG-- extra : convert_revision : 1c8128fba89431f2460dd5914f0614850d529b76
Diffstat (limited to 'cli-authpasswd.c')
-rw-r--r--cli-authpasswd.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/cli-authpasswd.c b/cli-authpasswd.c
index ec290e0..5dffac4 100644
--- a/cli-authpasswd.c
+++ b/cli-authpasswd.c
@@ -125,10 +125,7 @@ void cli_auth_password() {
password = gui_getpass("Password: ");
else
#endif
- password = getpass("Password: ");
-
- if (password == NULL)
- return 0;
+ password = getpass_or_cancel("Password: ");
buf_putbyte(ses.writepayload, SSH_MSG_USERAUTH_REQUEST);