summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/winbindd/winbindd_pam.c12
-rw-r--r--source3/winbindd/winbindd_pam_auth_crap.c2
2 files changed, 3 insertions, 11 deletions
diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c
index 2d2f466f80..47bcb6a847 100644
--- a/source3/winbindd/winbindd_pam.c
+++ b/source3/winbindd/winbindd_pam.c
@@ -1689,17 +1689,7 @@ enum winbindd_result winbindd_dual_pam_auth_crap(struct winbindd_domain *domain,
state->request->data.auth_crap.domain[sizeof(state->request->data.auth_crap.domain)-1]=0;
name_user = state->request->data.auth_crap.user;
-
- if (*state->request->data.auth_crap.domain) {
- name_domain = state->request->data.auth_crap.domain;
- } else if (lp_winbind_use_default_domain()) {
- name_domain = lp_workgroup();
- } else {
- DEBUG(5,("no domain specified with username (%s) - failing auth\n",
- name_user));
- result = NT_STATUS_NO_SUCH_USER;
- goto done;
- }
+ name_domain = state->request->data.auth_crap.domain;
DEBUG(3, ("[%5lu]: pam auth crap domain: %s user: %s\n", (unsigned long)state->pid,
name_domain, name_user));
diff --git a/source3/winbindd/winbindd_pam_auth_crap.c b/source3/winbindd/winbindd_pam_auth_crap.c
index dc2dc3e265..d62c4aa209 100644
--- a/source3/winbindd/winbindd_pam_auth_crap.c
+++ b/source3/winbindd/winbindd_pam_auth_crap.c
@@ -78,6 +78,8 @@ struct tevent_req *winbindd_pam_auth_crap_send(
return tevent_req_post(req, ev);
}
+ fstrcpy(request->data.auth_crap.domain, domain->name);
+
subreq = wb_domain_request_send(state, winbind_event_context(), domain,
request);
if (tevent_req_nomem(subreq, req)) {