summaryrefslogtreecommitdiff
path: root/source3/nsswitch/wbinfo.c
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2002-09-12 05:39:55 +0000
committerTim Potter <tpot@samba.org>2002-09-12 05:39:55 +0000
commit21a738b8d08da7581b7ce7d498d89a6c5d651d2b (patch)
treefa041a34e16a37c81709262e133c5c643083030c /source3/nsswitch/wbinfo.c
parenta9b450cba82b0788590a0a2a0a56e256ba83144d (diff)
downloadsamba-21a738b8d08da7581b7ce7d498d89a6c5d651d2b.tar.gz
samba-21a738b8d08da7581b7ce7d498d89a6c5d651d2b.tar.bz2
samba-21a738b8d08da7581b7ce7d498d89a6c5d651d2b.zip
Merge undone cleanups.
(This used to be commit d87c1f507d38444e627bce59b6c765d9c9479ac6)
Diffstat (limited to 'source3/nsswitch/wbinfo.c')
-rw-r--r--source3/nsswitch/wbinfo.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/source3/nsswitch/wbinfo.c b/source3/nsswitch/wbinfo.c
index 7a1aee44cd..875df231dc 100644
--- a/source3/nsswitch/wbinfo.c
+++ b/source3/nsswitch/wbinfo.c
@@ -422,7 +422,6 @@ static BOOL wbinfo_auth(char *username)
struct winbindd_request request;
struct winbindd_response response;
NSS_STATUS result;
- fstring name_user, name_domain;
char *p;
/* Send off request */
@@ -434,16 +433,11 @@ static BOOL wbinfo_auth(char *username)
if (p) {
*p = 0;
+ fstrcpy(request.data.auth.user, username);
fstrcpy(request.data.auth.pass, p + 1);
- }
-
- parse_wbinfo_domain_user(username, name_domain, name_user);
-
- if (p)
- *p = '%';
-
- fstrcpy(request.data.auth.user, name_user);
- fstrcpy(request.data.auth.domain, name_domain);
+ *p = '%';
+ } else
+ fstrcpy(request.data.auth.user, username);
result = winbindd_request(WINBINDD_PAM_AUTH, &request, &response);
@@ -486,10 +480,8 @@ static BOOL wbinfo_auth_crap(char *username)
parse_wbinfo_domain_user(username, name_domain, name_user);
- if (p)
- *p = '%';
-
fstrcpy(request.data.auth_crap.user, name_user);
+
fstrcpy(request.data.auth_crap.domain, name_domain);
generate_random_buffer(request.data.auth_crap.chal, 8, False);