1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

cli_cm: Make nicer password prompt in do_connect().

Guenther
This commit is contained in:
Günther Deschner 2008-04-20 22:56:09 +02:00
parent f81da8e8ed
commit cc967e76a3

View File

@ -202,10 +202,15 @@ static struct cli_state *do_connect(TALLOC_CTX *ctx,
}
if (!cm_creds.got_pass && !cm_creds.use_kerberos) {
char *pass = getpass("Password: ");
char *label = NULL;
char *pass;
label = talloc_asprintf(ctx, "Enter %s's password: ",
cm_creds.username);
pass = getpass(label);
if (pass) {
cm_set_password(pass);
}
TALLOC_FREE(label);
}
username = cm_creds.username ? cm_creds.username : "";