summaryrefslogtreecommitdiff
path: root/source3/winbindd
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-11-26 10:55:48 +0100
committerVolker Lendecke <vlendec@samba.org>2010-11-26 14:43:20 +0100
commit51d4951304faee26550b9c57c6800363852b988b (patch)
treeb9967f3ead20060a5fa7a52de63c1b35897274b8 /source3/winbindd
parent6a2171c7393a8dfff849090b2822200f9f672617 (diff)
downloadsamba-51d4951304faee26550b9c57c6800363852b988b.tar.gz
samba-51d4951304faee26550b9c57c6800363852b988b.tar.bz2
samba-51d4951304faee26550b9c57c6800363852b988b.zip
s3: Fix filling in the pam_auth_crap domain name
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Fri Nov 26 14:43:20 CET 2010 on sn-devel-104
Diffstat (limited to 'source3/winbindd')
-rw-r--r--source3/winbindd/winbindd_pam_auth_crap.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/source3/winbindd/winbindd_pam_auth_crap.c b/source3/winbindd/winbindd_pam_auth_crap.c
index 41e6681cce..186e510aa3 100644
--- a/source3/winbindd/winbindd_pam_auth_crap.c
+++ b/source3/winbindd/winbindd_pam_auth_crap.c
@@ -35,7 +35,6 @@ struct tevent_req *winbindd_pam_auth_crap_send(
struct tevent_req *req, *subreq;
struct winbindd_pam_auth_crap_state *state;
struct winbindd_domain *domain;
- const char *domain_name;
req = tevent_req_create(mem_ctx, &state,
struct winbindd_pam_auth_crap_state);
@@ -61,27 +60,19 @@ struct tevent_req *winbindd_pam_auth_crap_send(
return tevent_req_post(req, ev);
}
- domain_name = NULL;
-
- if (request->data.auth_crap.domain[0] != '\0') {
- domain_name = request->data.auth_crap.domain;
- } else if (lp_winbind_use_default_domain()) {
- domain_name = lp_workgroup();
- }
-
- domain = NULL;
-
- if (domain_name != NULL) {
- domain = find_auth_domain(request->flags, domain_name);
+ if ((request->data.auth_crap.domain[0] == '\0')
+ && lp_winbind_use_default_domain()) {
+ fstrcpy(request->data.auth_crap.domain,
+ lp_workgroup());
}
+ domain = find_auth_domain(
+ request->flags, request->data.auth_crap.domain);
if (domain == NULL) {
tevent_req_nterror(req, NT_STATUS_NO_SUCH_USER);
return tevent_req_post(req, ev);
}
- fstrcpy(request->data.auth_crap.domain, domain->name);
-
if (request->data.auth_crap.workstation[0] == '\0') {
fstrcpy(request->data.auth_crap.workstation, global_myname());
}