diff options
author | Simo Sorce <simo@redhat.com> | 2013-01-11 17:26:19 -0500 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-01-21 22:17:34 +0100 |
commit | 03abdaa21ecf562b714f204ca42379ff08626f75 (patch) | |
tree | 0b6a9d40fc90292d4cadd4c738b8cda8a5dacd06 /src/providers/ad | |
parent | 99151f2217ddaa179543b89b49f836f29f7dcd2a (diff) | |
download | sssd-03abdaa21ecf562b714f204ca42379ff08626f75.tar.gz sssd-03abdaa21ecf562b714f204ca42379ff08626f75.tar.bz2 sssd-03abdaa21ecf562b714f204ca42379ff08626f75.zip |
Add be_req_get_be_ctx() helper.
In preparation for making be_req opaque
Diffstat (limited to 'src/providers/ad')
-rw-r--r-- | src/providers/ad/ad_access.c | 16 | ||||
-rw-r--r-- | src/providers/ad/ad_id.c | 12 |
2 files changed, 14 insertions, 14 deletions
diff --git a/src/providers/ad/ad_access.c b/src/providers/ad/ad_access.c index 66eb4eaa..3c5c66bd 100644 --- a/src/providers/ad/ad_access.c +++ b/src/providers/ad/ad_access.c @@ -34,16 +34,17 @@ void ad_access_handler(struct be_req *breq) { struct tevent_req *req; + struct be_ctx *be_ctx = be_req_get_be_ctx(breq); struct ad_access_ctx *access_ctx = - talloc_get_type(breq->be_ctx->bet_info[BET_ACCESS].pvt_bet_data, + talloc_get_type(be_ctx->bet_info[BET_ACCESS].pvt_bet_data, 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) { - domain = new_subdomain(breq, breq->be_ctx->domain, + if (strcasecmp(pd->domain, be_ctx->domain->name) != 0) { + domain = new_subdomain(breq, be_ctx->domain, pd->domain, NULL, NULL); if (domain == NULL) { DEBUG(SSSDBG_OP_FAILURE, ("new_subdomain failed.\n")); @@ -51,15 +52,12 @@ ad_access_handler(struct be_req *breq) return; } } else { - domain = breq->be_ctx->domain; + domain = be_ctx->domain; } /* Verify that the account is not locked */ - req = sdap_access_send(breq, - breq->be_ctx->ev, - breq->be_ctx, domain, - access_ctx->sdap_access_ctx, - pd); + req = sdap_access_send(breq, be_ctx->ev, be_ctx, domain, + access_ctx->sdap_access_ctx, pd); if (!req) { be_req_terminate(breq, DP_ERR_FATAL, PAM_SYSTEM_ERR, NULL); return; diff --git a/src/providers/ad/ad_id.c b/src/providers/ad/ad_id.c index 311c8096..f6e975e1 100644 --- a/src/providers/ad/ad_id.c +++ b/src/providers/ad/ad_id.c @@ -24,25 +24,27 @@ #include "providers/ad/ad_id.h" void -ad_account_info_handler(struct be_req *breq) +ad_account_info_handler(struct be_req *be_req) { struct ad_id_ctx *ad_ctx; struct sdap_id_ctx *sdap_id_ctx; + struct be_ctx *be_ctx = be_req_get_be_ctx(be_req); - ad_ctx = talloc_get_type(breq->be_ctx->bet_info[BET_ID].pvt_bet_data, + ad_ctx = talloc_get_type(be_ctx->bet_info[BET_ID].pvt_bet_data, struct ad_id_ctx); sdap_id_ctx = ad_ctx->sdap_id_ctx; - return sdap_handle_account_info(breq, sdap_id_ctx); + return sdap_handle_account_info(be_req, sdap_id_ctx); } void ad_check_online(struct be_req *be_req) { struct ad_id_ctx *ad_ctx; + struct be_ctx *be_ctx = be_req_get_be_ctx(be_req); - ad_ctx = talloc_get_type(be_req->be_ctx->bet_info[BET_ID].pvt_bet_data, - struct ad_id_ctx); + ad_ctx = talloc_get_type(be_ctx->bet_info[BET_ID].pvt_bet_data, + struct ad_id_ctx); return sdap_do_online_check(be_req, ad_ctx->sdap_id_ctx); } |