mirror of
https://github.com/samba-team/samba.git
synced 2025-03-29 02:50:28 +03:00
wbinfo: prompt for password when none has been given.
Guenther (This used to be commit 7c1f36d84a4c5779ea86923be69e209d0c9c0943)
This commit is contained in:
parent
7cc9b5c5a1
commit
b7f745b200
@ -958,7 +958,14 @@ static bool wbinfo_auth(char *username)
|
||||
p++;
|
||||
password = p;
|
||||
} else {
|
||||
password = "";
|
||||
char *prompt;
|
||||
asprintf(&prompt, "Enter %s's password:", username);
|
||||
if (!prompt) {
|
||||
return false;
|
||||
}
|
||||
|
||||
password = getpass(prompt);
|
||||
SAFE_FREE(prompt);
|
||||
}
|
||||
|
||||
name = s;
|
||||
@ -1001,6 +1008,16 @@ static bool wbinfo_auth_crap(char *username)
|
||||
if (p) {
|
||||
*p = 0;
|
||||
fstrcpy(pass, p + 1);
|
||||
} else {
|
||||
char *prompt;
|
||||
asprintf(&prompt, "Enter %s's password:", username);
|
||||
if (!prompt) {
|
||||
return false;
|
||||
}
|
||||
|
||||
fstrcpy(pass, getpass(prompt));
|
||||
SAFE_FREE(prompt);
|
||||
|
||||
}
|
||||
|
||||
parse_wbinfo_domain_user(username, name_domain, name_user);
|
||||
|
Loading…
x
Reference in New Issue
Block a user