summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Zeleny <jzeleny@redhat.com>2012-07-20 11:09:30 -0400
committerJakub Hrozek <jhrozek@redhat.com>2012-07-25 22:50:31 +0200
commit28aa01a364218d007161f72d5c0d193e895b2c67 (patch)
tree28ca9b4fa42a95b56a72464b2beaf62decf4dcc8 /src
parent198ee7c264bd8a473ecd0c343830b7952a51e90e (diff)
downloadsssd-28aa01a364218d007161f72d5c0d193e895b2c67.tar.gz
sssd-28aa01a364218d007161f72d5c0d193e895b2c67.tar.bz2
sssd-28aa01a364218d007161f72d5c0d193e895b2c67.zip
Remove ipa_selinux_map_merge()
This function is no longer necessary since sysdb interface for copying elements has been implemented.
Diffstat (limited to 'src')
-rw-r--r--src/providers/ipa/ipa_selinux_common.c41
-rw-r--r--src/providers/ipa/ipa_selinux_common.h4
-rw-r--r--src/providers/ipa/ipa_session.c10
3 files changed, 0 insertions, 55 deletions
diff --git a/src/providers/ipa/ipa_selinux_common.c b/src/providers/ipa/ipa_selinux_common.c
index 15f0b458..a01e0b6c 100644
--- a/src/providers/ipa/ipa_selinux_common.c
+++ b/src/providers/ipa/ipa_selinux_common.c
@@ -27,47 +27,6 @@
#include "providers/ipa/ipa_selinux_common.h"
-errno_t ipa_selinux_map_merge(struct sysdb_attrs *map,
- struct sysdb_attrs *rule,
- const char *attr)
-{
- struct ldb_message_element *map_el;
- struct ldb_message_element *rule_el;
- size_t total_cnt;
- errno_t ret;
- int i = 0;
-
- ret = sysdb_attrs_get_el(map, attr, &map_el);
- if (ret != EOK) {
- goto done;
- }
-
- ret = sysdb_attrs_get_el(rule, attr, &rule_el);
- if (ret != EOK) {
- goto done;
- }
-
- total_cnt = map_el->num_values + rule_el->num_values;
- map_el->values = talloc_realloc(map->a, map_el->values,
- struct ldb_val, total_cnt);
- if (map_el->values == NULL) {
- ret = ENOMEM;
- goto done;
- }
-
- while (map_el->num_values < total_cnt)
- {
- map_el->values[map_el->num_values] = ldb_val_dup(map_el->values,
- &rule_el->values[i]);
- map_el->num_values++;
- i++;
- }
-
- ret = EOK;
-done:
- return ret;
-}
-
errno_t ipa_save_user_maps(struct sysdb_ctx *sysdb,
size_t map_count,
struct sysdb_attrs **maps)
diff --git a/src/providers/ipa/ipa_selinux_common.h b/src/providers/ipa/ipa_selinux_common.h
index 17ccb231..d722136e 100644
--- a/src/providers/ipa/ipa_selinux_common.h
+++ b/src/providers/ipa/ipa_selinux_common.h
@@ -25,10 +25,6 @@
#ifndef IPA_SELINUX_COMMON_H_
#define IPA_SELINUX_COMMON_H_
-errno_t ipa_selinux_map_merge(struct sysdb_attrs *map,
- struct sysdb_attrs *rule,
- const char *attr);
-
errno_t ipa_save_host(struct sysdb_ctx *sysdb,
struct sysdb_attrs *host);
diff --git a/src/providers/ipa/ipa_session.c b/src/providers/ipa/ipa_session.c
index 51c785f5..4ddf0529 100644
--- a/src/providers/ipa/ipa_session.c
+++ b/src/providers/ipa/ipa_session.c
@@ -541,16 +541,6 @@ static void ipa_get_selinux_hbac_done(struct tevent_req *subreq)
/* Just to boost the following lookup */
state->possible_match[j] = NULL;
-
- ret = ipa_selinux_map_merge(usermap, rules[i], SYSDB_ORIG_MEMBER_USER);
- if (ret != EOK) {
- goto done;
- }
-
- ret = ipa_selinux_map_merge(usermap, rules[i], SYSDB_ORIG_MEMBER_HOST);
- if (ret != EOK) {
- goto done;
- }
}
}
}