summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-01-09 21:13:13 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-01-21 22:17:34 +0100
commitb860f8b6b6b03982c80268e9f6fd35f6455b6b37 (patch)
treebf99dd7c572850ca855f42b8bebb279dbfe3e26f
parent28c0e7ebc857bf488bbc043c9574de6abc1efea7 (diff)
downloadsssd-b860f8b6b6b03982c80268e9f6fd35f6455b6b37.tar.gz
sssd-b860f8b6b6b03982c80268e9f6fd35f6455b6b37.tar.xz
sssd-b860f8b6b6b03982c80268e9f6fd35f6455b6b37.zip
Remove hbac_ctx_sysdb()
-rw-r--r--src/providers/ipa/ipa_access.h7
-rw-r--r--src/providers/ipa/ipa_hbac_common.c9
2 files changed, 4 insertions, 12 deletions
diff --git a/src/providers/ipa/ipa_access.h b/src/providers/ipa/ipa_access.h
index 325f0ee63..a4bc3dc10 100644
--- a/src/providers/ipa/ipa_access.h
+++ b/src/providers/ipa/ipa_access.h
@@ -82,13 +82,6 @@ static inline struct be_ctx *hbac_ctx_be(struct hbac_ctx *hbac_ctx)
return req != NULL ? req->be_ctx : NULL;
}
-/* Get sysdb associated with HBAC context */
-static inline struct sysdb_ctx *hbac_ctx_sysdb(struct hbac_ctx *hbac_ctx)
-{
- struct be_req *be_req = hbac_ctx->be_req;
- return be_req != NULL ? be_req->domain->sysdb : NULL;
-}
-
/* Get tevent context associated with HBAC context */
static inline struct tevent_context *hbac_ctx_ev(struct hbac_ctx *hbac_ctx)
{
diff --git a/src/providers/ipa/ipa_hbac_common.c b/src/providers/ipa/ipa_hbac_common.c
index c8fb1aa18..9742da185 100644
--- a/src/providers/ipa/ipa_hbac_common.c
+++ b/src/providers/ipa/ipa_hbac_common.c
@@ -431,7 +431,6 @@ 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 sysdb_ctx *sysdb = hbac_ctx_sysdb(hbac_ctx);
struct sss_domain_info *domain = hbac_ctx_be(hbac_ctx)->domain;
const char *rhost;
const char *thost;
@@ -460,13 +459,13 @@ hbac_ctx_to_eval_request(TALLOC_CTX *mem_ctx,
ret = hbac_eval_user_element(eval_req, user_dom->sysdb, user_dom,
pd->user, &eval_req->user);
} else {
- ret = hbac_eval_user_element(eval_req, sysdb, domain,
+ ret = hbac_eval_user_element(eval_req, domain->sysdb, domain,
pd->user, &eval_req->user);
}
if (ret != EOK) goto done;
/* Get the PAM service and service groups */
- ret = hbac_eval_service_element(eval_req, sysdb, domain,
+ ret = hbac_eval_service_element(eval_req, domain->sysdb, domain,
pd->service, &eval_req->service);
if (ret != EOK) goto done;
@@ -482,7 +481,7 @@ hbac_ctx_to_eval_request(TALLOC_CTX *mem_ctx,
rhost = pd->rhost;
}
- ret = hbac_eval_host_element(eval_req, sysdb, domain,
+ ret = hbac_eval_host_element(eval_req, domain->sysdb, domain,
rhost, &eval_req->srchost);
if (ret != EOK) goto done;
@@ -494,7 +493,7 @@ hbac_ctx_to_eval_request(TALLOC_CTX *mem_ctx,
goto done;
}
- ret = hbac_eval_host_element(eval_req, sysdb, domain,
+ ret = hbac_eval_host_element(eval_req, domain->sysdb, domain,
thost, &eval_req->targethost);
if (ret != EOK) goto done;