summaryrefslogtreecommitdiffhomepage
path: root/cli-authpasswd.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2006-06-12 14:41:32 +0000
committerMatt Johnston <matt@ucc.asn.au>2006-06-12 14:41:32 +0000
commitd0537c7506af0f7193fd11a63ccbac04a464485a (patch)
treea07147b04c250a99f5cd7e94cb64852fca001dfa /cli-authpasswd.c
parenta0ed2ca71b42e119cc67d821c6ecb13b230dfbee (diff)
Make the dbclient password prompt more useful
--HG-- extra : convert_revision : 3bcfb35f7a6065dafbd695d943b95d64efff1c99
Diffstat (limited to 'cli-authpasswd.c')
-rw-r--r--cli-authpasswd.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/cli-authpasswd.c b/cli-authpasswd.c
index 5dffac4..2500a25 100644
--- a/cli-authpasswd.c
+++ b/cli-authpasswd.c
@@ -116,16 +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_or_cancel("Password: ");
+ password = getpass_or_cancel(prompt);
buf_putbyte(ses.writepayload, SSH_MSG_USERAUTH_REQUEST);