summaryrefslogtreecommitdiff
path: root/source3/nsswitch
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-10-31 20:29:18 +0000
committerGerald Carter <jerry@samba.org>2003-10-31 20:29:18 +0000
commit94713905d1109dad4e14af74d36de2560cb54ba7 (patch)
tree7c062c43beb93614ae034db77a77a09a57c651d2 /source3/nsswitch
parent732fecd3a0f6b07e79549940f3d10fefa1e221df (diff)
downloadsamba-94713905d1109dad4e14af74d36de2560cb54ba7.tar.gz
samba-94713905d1109dad4e14af74d36de2560cb54ba7.tar.bz2
samba-94713905d1109dad4e14af74d36de2560cb54ba7.zip
prompt for password when invoking --set-auth-user and no pw
is given (patch from Tom Dickson) (This used to be commit ca18ec0f901330c14a68c8a44d2a88a42bb7d92c)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/wbinfo.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/nsswitch/wbinfo.c b/source3/nsswitch/wbinfo.c
index 0018e99f60..04233bb85c 100644
--- a/source3/nsswitch/wbinfo.c
+++ b/source3/nsswitch/wbinfo.c
@@ -789,8 +789,13 @@ static BOOL wbinfo_set_auth_user(char *username)
if (password) {
*password = 0;
password++;
- } else
- password = "";
+ } else {
+ char *thepass = getpass("Password: ");
+ if (thepass) {
+ password = thepass;
+ } else
+ password = "";
+ }
/* Store or remove DOMAIN\username%password in secrets.tdb */