summaryrefslogtreecommitdiff
path: root/src/providers/ipa
diff options
context:
space:
mode:
authorJan Zeleny <jzeleny@redhat.com>2012-05-23 04:21:35 -0400
committerStephen Gallagher <sgallagh@redhat.com>2012-05-31 15:46:27 -0400
commit64ddff90c7fcc02ccb06824ac93af7d5f361a88f (patch)
tree70f12aa095d575826844f26278c2056ce8df0cf5 /src/providers/ipa
parent3111c28041b732b98a7fb39ef6232257d086d670 (diff)
downloadsssd-64ddff90c7fcc02ccb06824ac93af7d5f361a88f.tar.gz
sssd-64ddff90c7fcc02ccb06824ac93af7d5f361a88f.tar.bz2
sssd-64ddff90c7fcc02ccb06824ac93af7d5f361a88f.zip
Add support for filtering atributes
This patch adds support for filtering attributes when constructing attribute list from a map for LDAP query.
Diffstat (limited to 'src/providers/ipa')
-rw-r--r--src/providers/ipa/ipa_hosts.c5
-rw-r--r--src/providers/ipa/ipa_id.c3
-rw-r--r--src/providers/ipa/ipa_netgroups.c2
-rw-r--r--src/providers/ipa/ipa_selinux_maps.c3
-rw-r--r--src/providers/ipa/ipa_subdomains_id.c6
5 files changed, 12 insertions, 7 deletions
diff --git a/src/providers/ipa/ipa_hosts.c b/src/providers/ipa/ipa_hosts.c
index 09a5acaf..792af410 100644
--- a/src/providers/ipa/ipa_hosts.c
+++ b/src/providers/ipa/ipa_hosts.c
@@ -103,7 +103,7 @@ ipa_host_info_send(TALLOC_CTX *mem_ctx,
state->hostgroup_map = hostgroup_map;
ret = build_attrs_from_map(state, host_map, IPA_OPTS_HOST,
- &state->attrs, NULL);
+ NULL, &state->attrs, NULL);
if (ret != EOK) {
goto immediate;
}
@@ -214,7 +214,8 @@ ipa_host_info_done(struct tevent_req *subreq)
if (state->hostgroup_map) {
talloc_free(state->attrs);
ret = build_attrs_from_map(state, state->hostgroup_map,
- IPA_OPTS_HOSTGROUP, &state->attrs, NULL);
+ IPA_OPTS_HOSTGROUP, NULL,
+ &state->attrs, NULL);
if (ret != EOK) {
tevent_req_error(req, ret);
return;
diff --git a/src/providers/ipa/ipa_id.c b/src/providers/ipa/ipa_id.c
index 1f434799..5f528632 100644
--- a/src/providers/ipa/ipa_id.c
+++ b/src/providers/ipa/ipa_id.c
@@ -212,7 +212,8 @@ struct tevent_req *ipa_netgroup_get_send(TALLOC_CTX *memctx,
talloc_zfree(clean_name);
ret = build_attrs_from_map(state, ctx->opts->netgroup_map,
- IPA_OPTS_NETGROUP, &state->attrs, NULL);
+ IPA_OPTS_NETGROUP, NULL,
+ &state->attrs, NULL);
if (ret != EOK) goto fail;
ret = ipa_netgroup_get_retry(req);
diff --git a/src/providers/ipa/ipa_netgroups.c b/src/providers/ipa/ipa_netgroups.c
index 881eeb86..7d9a433e 100644
--- a/src/providers/ipa/ipa_netgroups.c
+++ b/src/providers/ipa/ipa_netgroups.c
@@ -528,7 +528,7 @@ static int ipa_netgr_fetch_hosts(struct ipa_get_netgroups_state *state,
return ENOMEM;
ret = build_attrs_from_map(state, state->ipa_opts->host_map,
- IPA_OPTS_HOST, &attrs, NULL);
+ IPA_OPTS_HOST, NULL, &attrs, NULL);
if (ret != EOK) {
talloc_free(filter);
return ret;
diff --git a/src/providers/ipa/ipa_selinux_maps.c b/src/providers/ipa/ipa_selinux_maps.c
index 28923cee..b0a2c8f7 100644
--- a/src/providers/ipa/ipa_selinux_maps.c
+++ b/src/providers/ipa/ipa_selinux_maps.c
@@ -77,7 +77,8 @@ struct tevent_req *ipa_selinux_get_maps_send(TALLOC_CTX *mem_ctx,
state->maps = NULL;
ret = build_attrs_from_map(state, ipa_opts->selinuxuser_map,
- IPA_OPTS_SELINUX_USERMAP, &state->attrs, NULL);
+ IPA_OPTS_SELINUX_USERMAP, NULL,
+ &state->attrs, NULL);
if (ret != EOK) goto fail;
state->cur_filter = NULL;
diff --git a/src/providers/ipa/ipa_subdomains_id.c b/src/providers/ipa/ipa_subdomains_id.c
index 39f076cd..eed8170c 100644
--- a/src/providers/ipa/ipa_subdomains_id.c
+++ b/src/providers/ipa/ipa_subdomains_id.c
@@ -89,11 +89,13 @@ struct tevent_req *ipa_get_subdomain_account_info_send(TALLOC_CTX *memctx,
switch (state->entry_type) {
case BE_REQ_USER:
ret = build_attrs_from_map(state, ctx->opts->user_map,
- SDAP_OPTS_USER, &state->attrs, NULL);
+ SDAP_OPTS_USER, NULL,
+ &state->attrs, NULL);
break;
case BE_REQ_GROUP:
ret = build_attrs_from_map(state, ctx->opts->group_map,
- SDAP_OPTS_GROUP, &state->attrs, NULL);
+ SDAP_OPTS_GROUP, NULL,
+ &state->attrs, NULL);
break;
default:
ret = EINVAL;