comparison cli-auth.c @ 398:59c7938af2bd

merge of '1250b8af44b62d8f4fe0f8d9fc7e7a1cc34e7e1c' and '7f8670ac3bb975f40967f3979d09d2199b7e90c8'
author Matt Johnston <matt@ucc.asn.au>
date Sat, 03 Feb 2007 08:20:30 +0000
parents 8f3ec7c104d9
children fdf06a5a54e4
comparison
equal deleted inserted replaced
396:e7c1a77d2921 398:59c7938af2bd
279 TRACE(("leave cli_auth_try")) 279 TRACE(("leave cli_auth_try"))
280 } 280 }
281 281
282 /* A helper for getpass() that exits if the user cancels. The returned 282 /* A helper for getpass() that exits if the user cancels. The returned
283 * password is statically allocated by getpass() */ 283 * password is statically allocated by getpass() */
284 char* getpass_or_cancel() 284 char* getpass_or_cancel(char* prompt)
285 { 285 {
286 char* password = NULL; 286 char* password = NULL;
287 287
288 password = getpass("Password: "); 288 password = getpass(prompt);
289 289
290 /* 0x03 is a ctrl-c character in the buffer. */ 290 /* 0x03 is a ctrl-c character in the buffer. */
291 if (password == NULL || strchr(password, '\3') != NULL) { 291 if (password == NULL || strchr(password, '\3') != NULL) {
292 dropbear_close("Interrupted."); 292 dropbear_close("Interrupted.");
293 } 293 }