diff options
Diffstat (limited to 'source3/nsswitch/wbinfo.c')
-rw-r--r-- | source3/nsswitch/wbinfo.c | 18 |
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); |