diff options
author | Matt Johnston <matt@ucc.asn.au> | 2007-02-03 08:20:34 +0000 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2007-02-03 08:20:34 +0000 |
commit | d9aeb2773e236e662c8b493f4bcee978f9908d7c (patch) | |
tree | bac48e388bf3ac739ae14cdf98da0eb4bb9d17bf /cli-authpasswd.c | |
parent | 056b92bd4c8a42ce1843493310d382159166edb8 (diff) | |
parent | c5fd7dd5548f28e32d846e39d17e5c4de4e769af (diff) |
merge of '5fdf69ca60d1683cdd9f4c2595134bed26394834'
and '6b61c50f4cf888bea302ac8fcf5dbb573b443251'
--HG--
extra : convert_revision : b1dd3b94e60a07a176dba2b035ac79968595990a
Diffstat (limited to 'cli-authpasswd.c')
-rw-r--r-- | cli-authpasswd.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cli-authpasswd.c b/cli-authpasswd.c index ec290e0..2500a25 100644 --- a/cli-authpasswd.c +++ b/cli-authpasswd.c @@ -116,19 +116,19 @@ static char *gui_getpass(const char *prompt) { void cli_auth_password() { char* password = NULL; + char prompt[80]; TRACE(("enter cli_auth_password")) CHECKCLEARTOWRITE(); + snprintf(prompt, sizeof(prompt), "%s@%s's password: ", + cli_opts.username, cli_opts.remotehost); #ifdef ENABLE_CLI_ASKPASS_HELPER if (want_askpass()) - password = gui_getpass("Password: "); + password = gui_getpass(prompt); else #endif - password = getpass("Password: "); - - if (password == NULL) - return 0; + password = getpass_or_cancel(prompt); buf_putbyte(ses.writepayload, SSH_MSG_USERAUTH_REQUEST); |