summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-01-09 21:11:45 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-01-21 22:17:33 +0100
commit28c0e7ebc857bf488bbc043c9574de6abc1efea7 (patch)
tree957de671ee63bcd27f57498684cda91b39319f6c
parente0404de84c31d2387bb244d018a5cac8d01f8b19 (diff)
downloadsssd-28c0e7ebc857bf488bbc043c9574de6abc1efea7.tar.gz
sssd-28c0e7ebc857bf488bbc043c9574de6abc1efea7.tar.bz2
sssd-28c0e7ebc857bf488bbc043c9574de6abc1efea7.zip
Remove sysdb argument from hbac_get_cached_rules()
-rw-r--r--src/providers/ipa/ipa_access.c6
-rw-r--r--src/providers/ipa/ipa_access.h1
-rw-r--r--src/providers/ipa/ipa_selinux.c8
3 files changed, 6 insertions, 9 deletions
diff --git a/src/providers/ipa/ipa_access.c b/src/providers/ipa/ipa_access.c
index a0158f53..f4bdf2b9 100644
--- a/src/providers/ipa/ipa_access.c
+++ b/src/providers/ipa/ipa_access.c
@@ -596,8 +596,7 @@ void ipa_hbac_evaluate_rules(struct hbac_ctx *hbac_ctx)
struct hbac_info *info;
/* Get HBAC rules from the sysdb */
- ret = hbac_get_cached_rules(hbac_ctx, hbac_ctx_sysdb(hbac_ctx),
- hbac_ctx->be_req->domain,
+ ret = hbac_get_cached_rules(hbac_ctx, hbac_ctx->be_req->domain,
&hbac_ctx->rule_count, &hbac_ctx->rules);
if (ret != EOK) {
DEBUG(1, ("Could not retrieve rules from the cache\n"));
@@ -642,7 +641,6 @@ void ipa_hbac_evaluate_rules(struct hbac_ctx *hbac_ctx)
}
errno_t hbac_get_cached_rules(TALLOC_CTX *mem_ctx,
- struct sysdb_ctx *sysdb,
struct sss_domain_info *domain,
size_t *_rule_count,
struct sysdb_attrs ***_rules)
@@ -679,7 +677,7 @@ errno_t hbac_get_cached_rules(TALLOC_CTX *mem_ctx,
goto done;
}
- ret = sysdb_search_custom(tmp_ctx, sysdb, domain, filter,
+ ret = sysdb_search_custom(tmp_ctx, domain->sysdb, domain, filter,
HBAC_RULES_SUBDIR, attrs,
&rule_count, &msgs);
if (ret != EOK && ret != ENOENT) {
diff --git a/src/providers/ipa/ipa_access.h b/src/providers/ipa/ipa_access.h
index 6d36ea61..325f0ee6 100644
--- a/src/providers/ipa/ipa_access.h
+++ b/src/providers/ipa/ipa_access.h
@@ -118,7 +118,6 @@ static inline bool hbac_ctx_is_offline(struct hbac_ctx *ctx)
void ipa_access_handler(struct be_req *be_req);
errno_t hbac_get_cached_rules(TALLOC_CTX *mem_ctx,
- struct sysdb_ctx *sysdb,
struct sss_domain_info *domain,
size_t *_rule_count,
struct sysdb_attrs ***_rules);
diff --git a/src/providers/ipa/ipa_selinux.c b/src/providers/ipa/ipa_selinux.c
index bec4948f..df0efda1 100644
--- a/src/providers/ipa/ipa_selinux.c
+++ b/src/providers/ipa/ipa_selinux.c
@@ -645,8 +645,7 @@ ipa_get_selinux_maps_offline(struct tevent_req *req)
state->nmaps = nmaps;
/* read all the HBAC rules */
- ret = hbac_get_cached_rules(state, state->be_req->be_ctx->domain->sysdb,
- state->be_req->be_ctx->domain,
+ ret = hbac_get_cached_rules(state, state->be_req->be_ctx->domain,
&state->hbac_rule_count, &state->hbac_rules);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE, ("hbac_get_cached_rules failed [%d]: %s\n",
@@ -793,8 +792,9 @@ static void ipa_get_selinux_maps_done(struct tevent_req *subreq)
access_name = state->be_req->be_ctx->bet_info[BET_ACCESS].mod_name;
selinux_name = state->be_req->be_ctx->bet_info[BET_SELINUX].mod_name;
if (strcasecmp(access_name, selinux_name) == 0) {
- ret = hbac_get_cached_rules(state, bctx->domain->sysdb, bctx->domain,
- &state->hbac_rule_count, &state->hbac_rules);
+ ret = hbac_get_cached_rules(state, bctx->domain,
+ &state->hbac_rule_count,
+ &state->hbac_rules);
/* Terminates the request */
goto done;
}