summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-01-09 17:31:40 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-01-21 22:17:33 +0100
commit18cb0d6489d01a61a2f7bf53815f53a58e9ade0d (patch)
treebb763f0e3d67b5e3c9059c750a263182fd84a4f9 /src
parent0700185377ad23885cc2ddae20abe0dc36a3abca (diff)
downloadsssd-18cb0d6489d01a61a2f7bf53815f53a58e9ade0d.tar.gz
sssd-18cb0d6489d01a61a2f7bf53815f53a58e9ade0d.tar.xz
sssd-18cb0d6489d01a61a2f7bf53815f53a58e9ade0d.zip
Remove sysdb arg from hbac_*host_attrs_to_rule()
Diffstat (limited to 'src')
-rw-r--r--src/providers/ipa/ipa_hbac_common.c2
-rw-r--r--src/providers/ipa/ipa_hbac_hosts.c11
-rw-r--r--src/providers/ipa/ipa_hbac_private.h2
3 files changed, 4 insertions, 11 deletions
diff --git a/src/providers/ipa/ipa_hbac_common.c b/src/providers/ipa/ipa_hbac_common.c
index 652220b21..8f921f82f 100644
--- a/src/providers/ipa/ipa_hbac_common.c
+++ b/src/providers/ipa/ipa_hbac_common.c
@@ -337,7 +337,6 @@ hbac_attrs_to_rule(TALLOC_CTX *mem_ctx,
/* Get the target hosts */
ret = hbac_thost_attrs_to_rule(new_rule,
- hbac_ctx_sysdb(hbac_ctx),
hbac_ctx->be_req->domain,
new_rule->name,
hbac_ctx->rules[idx],
@@ -351,7 +350,6 @@ hbac_attrs_to_rule(TALLOC_CTX *mem_ctx,
/* Get the source hosts */
ret = hbac_shost_attrs_to_rule(new_rule,
- hbac_ctx_sysdb(hbac_ctx),
hbac_ctx->be_req->domain,
new_rule->name,
hbac_ctx->rules[idx],
diff --git a/src/providers/ipa/ipa_hbac_hosts.c b/src/providers/ipa/ipa_hbac_hosts.c
index 474a39759..7f387c633 100644
--- a/src/providers/ipa/ipa_hbac_hosts.c
+++ b/src/providers/ipa/ipa_hbac_hosts.c
@@ -29,7 +29,6 @@
* Functions to convert sysdb_attrs to the hbac_rule format
*/
static errno_t hbac_host_attrs_to_rule(TALLOC_CTX *mem_ctx,
- struct sysdb_ctx *sysdb,
struct sss_domain_info *domain,
const char *rule_name,
struct sysdb_attrs *rule_attrs,
@@ -115,7 +114,7 @@ static errno_t hbac_host_attrs_to_rule(TALLOC_CTX *mem_ctx,
}
/* First check if this is a specific host */
- ret = sysdb_search_custom(tmp_ctx, sysdb, domain, filter,
+ ret = sysdb_search_custom(tmp_ctx, domain->sysdb, domain, filter,
HBAC_HOSTS_SUBDIR, attrs,
&count, &msgs);
if (ret != EOK && ret != ENOENT) goto done;
@@ -151,7 +150,7 @@ static errno_t hbac_host_attrs_to_rule(TALLOC_CTX *mem_ctx,
num_hosts++;
} else { /* ret == ENOENT */
/* Check if this is a hostgroup */
- ret = sysdb_search_custom(tmp_ctx, sysdb, domain, filter,
+ ret = sysdb_search_custom(tmp_ctx, domain->sysdb, domain, filter,
HBAC_HOSTGROUPS_SUBDIR, attrs,
&count, &msgs);
if (ret != EOK && ret != ENOENT) goto done;
@@ -225,7 +224,6 @@ done:
errno_t
hbac_thost_attrs_to_rule(TALLOC_CTX *mem_ctx,
- struct sysdb_ctx *sysdb,
struct sss_domain_info *domain,
const char *rule_name,
struct sysdb_attrs *rule_attrs,
@@ -233,7 +231,7 @@ hbac_thost_attrs_to_rule(TALLOC_CTX *mem_ctx,
{
DEBUG(7, ("Processing target hosts for rule [%s]\n", rule_name));
- return hbac_host_attrs_to_rule(mem_ctx, sysdb, domain,
+ return hbac_host_attrs_to_rule(mem_ctx, domain,
rule_name, rule_attrs,
IPA_HOST_CATEGORY, IPA_MEMBER_HOST,
NULL, thosts);
@@ -241,7 +239,6 @@ hbac_thost_attrs_to_rule(TALLOC_CTX *mem_ctx,
errno_t
hbac_shost_attrs_to_rule(TALLOC_CTX *mem_ctx,
- struct sysdb_ctx *sysdb,
struct sss_domain_info *domain,
const char *rule_name,
struct sysdb_attrs *rule_attrs,
@@ -273,7 +270,7 @@ hbac_shost_attrs_to_rule(TALLOC_CTX *mem_ctx,
goto done;
}
- ret = hbac_host_attrs_to_rule(tmp_ctx, sysdb, domain,
+ ret = hbac_host_attrs_to_rule(tmp_ctx, domain,
rule_name, rule_attrs,
IPA_SOURCE_HOST_CATEGORY, IPA_SOURCE_HOST,
&host_count, &shosts);
diff --git a/src/providers/ipa/ipa_hbac_private.h b/src/providers/ipa/ipa_hbac_private.h
index 857160591..984ce90b5 100644
--- a/src/providers/ipa/ipa_hbac_private.h
+++ b/src/providers/ipa/ipa_hbac_private.h
@@ -93,7 +93,6 @@ hbac_get_category(struct sysdb_attrs *attrs,
errno_t
hbac_thost_attrs_to_rule(TALLOC_CTX *mem_ctx,
- struct sysdb_ctx *sysdb,
struct sss_domain_info *domain,
const char *rule_name,
struct sysdb_attrs *rule_attrs,
@@ -101,7 +100,6 @@ hbac_thost_attrs_to_rule(TALLOC_CTX *mem_ctx,
errno_t
hbac_shost_attrs_to_rule(TALLOC_CTX *mem_ctx,
- struct sysdb_ctx *sysdb,
struct sss_domain_info *domain,
const char *rule_name,
struct sysdb_attrs *rule_attrs,