diff options
author | Jeremy Allison <jra@samba.org> | 2008-05-30 10:09:22 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2008-05-30 10:09:22 -0700 |
commit | a991c5a7c30253fa36e1ee65fb717d62acf3a806 (patch) | |
tree | f744dcbdef7864a1f5915564bde3e11e133a1ecd /source3/nsswitch | |
parent | 2e9136e085f9a88741c594b44037b2f86474882f (diff) | |
parent | 3e20aeb18e418a5a1a7821fd8c3f0d0bc5169489 (diff) | |
download | samba-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')
-rw-r--r-- | source3/nsswitch/libwbclient/wbc_pam.c | 2 | ||||
-rw-r--r-- | source3/nsswitch/wbinfo.c | 19 |
2 files changed, 19 insertions, 2 deletions
diff --git a/source3/nsswitch/libwbclient/wbc_pam.c b/source3/nsswitch/libwbclient/wbc_pam.c index 6385094235..c109625abf 100644 --- a/source3/nsswitch/libwbclient/wbc_pam.c +++ b/source3/nsswitch/libwbclient/wbc_pam.c @@ -309,7 +309,7 @@ wbcErr wbcAuthenticateUserEx(const struct wbcAuthUserParams *params, } strncpy(request.data.auth.pass, params->password.plaintext, - sizeof(request.data.auth.user)-1); + sizeof(request.data.auth.pass)-1); break; case WBC_AUTH_USER_LEVEL_HASH: 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); |