comparison cli-auth.c @ 378:a124aff0cbf1

merge of '182c2d8dbd5321ef4d1df8758936f4dc7127015f' and '31dcd7a22983ef19d6c63248e415e71d292dd0ec'
author Matt Johnston <matt@ucc.asn.au>
date Wed, 06 Dec 2006 13:11:41 +0000
parents 8f3ec7c104d9
children fdf06a5a54e4
comparison
equal deleted inserted replaced
377:1bfa65fed772 378:a124aff0cbf1
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 }