summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-11-30 12:07:39 +0100
committerAndreas Schneider <asn@cryptomilk.org>2012-11-30 14:01:07 +0100
commit234f9365b93b267f5a42dcc75512f08ccfb840c8 (patch)
treec0606bc35034851c8647c062ae697ac4abf4d3d4 /source3/lib
parent3101fcccff3ef847a123b10b2b99611e52504414 (diff)
downloadsamba-234f9365b93b267f5a42dcc75512f08ccfb840c8.tar.gz
samba-234f9365b93b267f5a42dcc75512f08ccfb840c8.tar.bz2
samba-234f9365b93b267f5a42dcc75512f08ccfb840c8.zip
s3:popt_common: Fix password processing.
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Fri Nov 30 14:01:08 CET 2012 on sn-devel-104
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/popt_common.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/source3/lib/popt_common.c b/source3/lib/popt_common.c
index c07283925b..1ec861906c 100644
--- a/source3/lib/popt_common.c
+++ b/source3/lib/popt_common.c
@@ -515,15 +515,6 @@ static void popt_common_credentials_callback(poptContext con,
exit(ENOMEM);
}
set_cmdline_auth_info_username(auth_info, puser);
-
- if ((p = strchr_m(puser,'%'))) {
- size_t len;
- *p = 0;
- len = strlen(p+1);
- set_cmdline_auth_info_password(auth_info, p+1);
- memset(strchr_m(getenv("USER"),'%')+1,'X',len);
- }
- SAFE_FREE(puser);
}
if (getenv("PASSWD")) {
@@ -546,13 +537,13 @@ static void popt_common_credentials_callback(poptContext con,
if ((lp=strchr_m(puser,'%'))) {
size_t len;
- *lp = 0;
+ *lp = '\0';
set_cmdline_auth_info_username(auth_info,
puser);
set_cmdline_auth_info_password(auth_info,
lp+1);
len = strlen(lp+1);
- memset(strchr_m(arg,'%')+1,'X',len);
+ memset(lp + 1, '\0', len);
} else {
set_cmdline_auth_info_username(auth_info,
puser);