summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-01-09 21:27:13 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-01-21 22:17:34 +0100
commitf67c42ad2b6b23bda8232d3adb51ed75b9f30f38 (patch)
treeacbd92b7456aee5563d50dedf7752418cd1977f6
parentb860f8b6b6b03982c80268e9f6fd35f6455b6b37 (diff)
downloadsssd-f67c42ad2b6b23bda8232d3adb51ed75b9f30f38.tar.gz
sssd-f67c42ad2b6b23bda8232d3adb51ed75b9f30f38.tar.xz
sssd-f67c42ad2b6b23bda8232d3adb51ed75b9f30f38.zip
Remove hbac_ctx_be()
-rw-r--r--src/providers/ipa/ipa_access.c5
-rw-r--r--src/providers/ipa/ipa_access.h9
-rw-r--r--src/providers/ipa/ipa_hbac_common.c2
3 files changed, 4 insertions, 12 deletions
diff --git a/src/providers/ipa/ipa_access.c b/src/providers/ipa/ipa_access.c
index f4bdf2b91..39bbfb747 100644
--- a/src/providers/ipa/ipa_access.c
+++ b/src/providers/ipa/ipa_access.c
@@ -462,11 +462,10 @@ static void hbac_sysdb_save(struct tevent_req *req)
bool in_transaction = false;
struct hbac_ctx *hbac_ctx =
tevent_req_callback_data(req, struct hbac_ctx);
- struct sss_domain_info *domain = hbac_ctx_be(hbac_ctx)->domain;
+ struct sss_domain_info *domain = hbac_ctx->be_req->domain;
struct ldb_dn *base_dn;
- struct be_ctx *be_ctx = hbac_ctx_be(hbac_ctx);
struct ipa_access_ctx *access_ctx =
- talloc_get_type(be_ctx->bet_info[BET_ACCESS].pvt_bet_data,
+ talloc_get_type(hbac_ctx->be_req->be_ctx->bet_info[BET_ACCESS].pvt_bet_data,
struct ipa_access_ctx);
TALLOC_CTX *tmp_ctx;
diff --git a/src/providers/ipa/ipa_access.h b/src/providers/ipa/ipa_access.h
index a4bc3dc10..551a17a09 100644
--- a/src/providers/ipa/ipa_access.h
+++ b/src/providers/ipa/ipa_access.h
@@ -75,17 +75,10 @@ struct hbac_ctx {
struct sysdb_attrs **servicegroups;
};
-/* Get BE context associated with HBAC context */
-static inline struct be_ctx *hbac_ctx_be(struct hbac_ctx *hbac_ctx)
-{
- struct be_req *req = hbac_ctx != NULL ? hbac_ctx->be_req : NULL;
- return req != NULL ? req->be_ctx : NULL;
-}
-
/* Get tevent context associated with HBAC context */
static inline struct tevent_context *hbac_ctx_ev(struct hbac_ctx *hbac_ctx)
{
- struct be_ctx *be_ctx = hbac_ctx_be(hbac_ctx);
+ struct be_ctx *be_ctx = hbac_ctx->be_req->be_ctx;
return be_ctx != NULL ? be_ctx->ev : NULL;
}
diff --git a/src/providers/ipa/ipa_hbac_common.c b/src/providers/ipa/ipa_hbac_common.c
index 9742da185..ced9fb452 100644
--- a/src/providers/ipa/ipa_hbac_common.c
+++ b/src/providers/ipa/ipa_hbac_common.c
@@ -431,7 +431,7 @@ 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(hbac_ctx)->domain;
+ struct sss_domain_info *domain = hbac_ctx->be_req->domain;
const char *rhost;
const char *thost;
struct sss_domain_info *user_dom;