summaryrefslogtreecommitdiff
path: root/source3/nsswitch/wbinfo.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-05-30 10:09:22 -0700
committerJeremy Allison <jra@samba.org>2008-05-30 10:09:22 -0700
commita991c5a7c30253fa36e1ee65fb717d62acf3a806 (patch)
treef744dcbdef7864a1f5915564bde3e11e133a1ecd /source3/nsswitch/wbinfo.c
parent2e9136e085f9a88741c594b44037b2f86474882f (diff)
parent3e20aeb18e418a5a1a7821fd8c3f0d0bc5169489 (diff)
downloadsamba-a991c5a7c30253fa36e1ee65fb717d62acf3a806.tar.gz
samba-a991c5a7c30253fa36e1ee65fb717d62acf3a806.tar.bz2
samba-a991c5a7c30253fa36e1ee65fb717d62acf3a806.zip
Merge branch 'v3-3-test' of ssh://jra@git.samba.org/data/git/samba into v3-3-test
(This used to be commit 3d01248f63d0d476c16236453983ffe759d0b2c2)
Diffstat (limited to 'source3/nsswitch/wbinfo.c')
-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);