diff cli-authpasswd.c @ 268:475a818dd6e7

Cancel a dbclient password prompt if the user presses ctrl-c. Enter still has to be pressed since glibc blocks ctrl-c in getpass()
author Matt Johnston <matt@ucc.asn.au>
date Sun, 15 Jan 2006 06:43:24 +0000
parents efbaf6b03837
children 8f3ec7c104d9
line wrap: on
line diff
--- a/cli-authpasswd.c	Sun Jan 15 06:39:48 2006 +0000
+++ b/cli-authpasswd.c	Sun Jan 15 06:43:24 2006 +0000
@@ -125,10 +125,7 @@
 		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);