summaryrefslogtreecommitdiff
path: root/src/providers/ad
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-01-10 16:36:22 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-01-21 22:17:34 +0100
commit249a28dbf31e11794c7f35d709c5561c1555898d (patch)
treeb3245fd366d70f9e4d5d45cc7643f2d078ce8423 /src/providers/ad
parent225d845476b6136be9b77f528ed986bba7a7f732 (diff)
downloadsssd-249a28dbf31e11794c7f35d709c5561c1555898d.tar.gz
sssd-249a28dbf31e11794c7f35d709c5561c1555898d.tar.bz2
sssd-249a28dbf31e11794c7f35d709c5561c1555898d.zip
Pass domain not be_req to access check functions
Diffstat (limited to 'src/providers/ad')
-rw-r--r--src/providers/ad/ad_access.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/providers/ad/ad_access.c b/src/providers/ad/ad_access.c
index 16b2423f..ec086d4e 100644
--- a/src/providers/ad/ad_access.c
+++ b/src/providers/ad/ad_access.c
@@ -39,22 +39,25 @@ ad_access_handler(struct be_req *breq)
struct ad_access_ctx);
struct pam_data *pd = talloc_get_type(breq->req_data, struct pam_data);
+ struct sss_domain_info *domain;
/* Handle subdomains */
if (strcasecmp(pd->domain, breq->be_ctx->domain->name) != 0) {
- breq->domain = new_subdomain(breq, breq->be_ctx->domain, pd->domain,
- NULL, NULL);
- if (breq->domain == NULL) {
+ domain = new_subdomain(breq, breq->be_ctx->domain,
+ pd->domain, NULL, NULL);
+ if (domain == NULL) {
DEBUG(SSSDBG_OP_FAILURE, ("new_subdomain failed.\n"));
breq->fn(breq, DP_ERR_FATAL, PAM_SYSTEM_ERR, NULL);
return;
}
+ } else {
+ domain = breq->be_ctx->domain;
}
/* Verify that the account is not locked */
req = sdap_access_send(breq,
breq->be_ctx->ev,
- breq,
+ breq->be_ctx, domain,
access_ctx->sdap_access_ctx,
pd);
if (!req) {