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/ipa/ipa_hbac_common.c | |
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/ipa/ipa_hbac_common.c')
-rw-r--r-- | src/providers/ipa/ipa_hbac_common.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/providers/ipa/ipa_hbac_common.c b/src/providers/ipa/ipa_hbac_common.c index 17499d31..90ec0ce4 100644 --- a/src/providers/ipa/ipa_hbac_common.c +++ b/src/providers/ipa/ipa_hbac_common.c @@ -264,6 +264,7 @@ hbac_attrs_to_rule(TALLOC_CTX *mem_ctx, size_t idx, struct hbac_rule **rule) { + struct be_ctx *be_ctx = be_req_get_be_ctx(hbac_ctx->be_req); errno_t ret; struct hbac_rule *new_rule; struct ldb_message_element *el; @@ -306,8 +307,7 @@ hbac_attrs_to_rule(TALLOC_CTX *mem_ctx, } /* Get the users */ - ret = hbac_user_attrs_to_rule(new_rule, - hbac_ctx->be_req->be_ctx->domain, + ret = hbac_user_attrs_to_rule(new_rule, be_ctx->domain, new_rule->name, hbac_ctx->rules[idx], &new_rule->users); @@ -318,8 +318,7 @@ hbac_attrs_to_rule(TALLOC_CTX *mem_ctx, } /* Get the services */ - ret = hbac_service_attrs_to_rule(new_rule, - hbac_ctx->be_req->be_ctx->domain, + ret = hbac_service_attrs_to_rule(new_rule, be_ctx->domain, new_rule->name, hbac_ctx->rules[idx], &new_rule->services); @@ -330,8 +329,7 @@ hbac_attrs_to_rule(TALLOC_CTX *mem_ctx, } /* Get the target hosts */ - ret = hbac_thost_attrs_to_rule(new_rule, - hbac_ctx->be_req->be_ctx->domain, + ret = hbac_thost_attrs_to_rule(new_rule, be_ctx->domain, new_rule->name, hbac_ctx->rules[idx], &new_rule->targethosts); @@ -343,8 +341,7 @@ hbac_attrs_to_rule(TALLOC_CTX *mem_ctx, /* Get the source hosts */ - ret = hbac_shost_attrs_to_rule(new_rule, - hbac_ctx->be_req->be_ctx->domain, + ret = hbac_shost_attrs_to_rule(new_rule, be_ctx->domain, new_rule->name, hbac_ctx->rules[idx], dp_opt_get_bool(hbac_ctx->ipa_options, @@ -431,7 +428,8 @@ hbac_ctx_to_eval_request(TALLOC_CTX *mem_ctx, struct pam_data *pd = hbac_ctx->pd; TALLOC_CTX *tmp_ctx; struct hbac_eval_req *eval_req; - struct sss_domain_info *domain = hbac_ctx->be_req->be_ctx->domain; + struct be_ctx *be_ctx = be_req_get_be_ctx(hbac_ctx->be_req); + struct sss_domain_info *domain = be_ctx->domain; const char *rhost; const char *thost; struct sss_domain_info *user_dom; |