[SCM] Samba Shared Repository - branch v3-3-test updated -
release-3-2-0pre2-2619-g7c1f36d
Günther Deschner
gd at samba.org
Tue May 27 14:48:24 GMT 2008
The branch, v3-3-test has been updated
via 7c1f36d84a4c5779ea86923be69e209d0c9c0943 (commit)
from 895036829c137558f7c03c31a8747a51fd290d18 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test
- Log -----------------------------------------------------------------
commit 7c1f36d84a4c5779ea86923be69e209d0c9c0943
Author: Günther Deschner <gd at samba.org>
Date: Tue May 27 16:45:04 2008 +0200
wbinfo: prompt for password when none has been given.
Guenther
-----------------------------------------------------------------------
Summary of changes:
source/nsswitch/wbinfo.c | 19 ++++++++++++++++++-
1 files changed, 18 insertions(+), 1 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/nsswitch/wbinfo.c b/source/nsswitch/wbinfo.c
index 7bb4abe..2fb46c4 100644
--- a/source/nsswitch/wbinfo.c
+++ b/source/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);
--
Samba Shared Repository
More information about the samba-cvs
mailing list