summaryrefslogtreecommitdiff
path: root/source3/nsswitch
diff options
context:
space:
mode:
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/wbinfo.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/source3/nsswitch/wbinfo.c b/source3/nsswitch/wbinfo.c
index 7bb4abe9b2..2fb46c4a2f 100644
--- a/source3/nsswitch/wbinfo.c
+++ b/source3/nsswitch/wbinfo.c
@@ -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);