summaryrefslogtreecommitdiff
path: root/src/providers
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-01-08 00:48:12 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-01-15 10:53:02 +0100
commit740870643f337ce70d85f25f9ed057cd1f91028c (patch)
tree319f52b3a9e13a7c14492808a789778f1ee37613 /src/providers
parent2913240aee51ce81195148a4d814e967f66839c4 (diff)
downloadsssd-740870643f337ce70d85f25f9ed057cd1f91028c.tar.gz
sssd-740870643f337ce70d85f25f9ed057cd1f91028c.tar.bz2
sssd-740870643f337ce70d85f25f9ed057cd1f91028c.zip
Add domain argument to sysdb selinux functions
Diffstat (limited to 'src/providers')
-rw-r--r--src/providers/ipa/ipa_selinux.c9
-rw-r--r--src/providers/ipa/ipa_selinux_common.c3
-rw-r--r--src/providers/ipa/ipa_selinux_common.h1
3 files changed, 9 insertions, 4 deletions
diff --git a/src/providers/ipa/ipa_selinux.c b/src/providers/ipa/ipa_selinux.c
index c8093bad..09dc075f 100644
--- a/src/providers/ipa/ipa_selinux.c
+++ b/src/providers/ipa/ipa_selinux.c
@@ -215,20 +215,21 @@ static void ipa_selinux_handler_done(struct tevent_req *req)
}
in_transaction = true;
- ret = sysdb_delete_usermaps(breq->sysdb);
+ ret = sysdb_delete_usermaps(breq->sysdb, breq->domain);
if (ret != EOK) {
DEBUG(SSSDBG_CRIT_FAILURE,
("Cannot delete existing maps from sysdb\n"));
goto fail;
}
- ret = sysdb_store_selinux_config(sysdb, default_user, map_order);
+ ret = sysdb_store_selinux_config(sysdb, breq->be_ctx->domain,
+ default_user, map_order);
if (ret != EOK) {
goto fail;
}
if (map_count > 0 && maps != NULL) {
- ret = ipa_save_user_maps(sysdb, map_count, maps);
+ ret = ipa_save_user_maps(sysdb, breq->be_ctx->domain, map_count, maps);
if (ret != EOK) {
goto fail;
}
@@ -595,6 +596,7 @@ ipa_get_selinux_maps_offline(struct tevent_req *req)
/* read the config entry */
ret = sysdb_search_selinux_config(state, state->be_req->be_ctx->sysdb,
+ state->be_req->be_ctx->domain,
NULL, &defaults);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE, ("sysdb_search_selinux_config failed [%d]: %s\n",
@@ -628,6 +630,7 @@ ipa_get_selinux_maps_offline(struct tevent_req *req)
/* read all the SELinux rules */
ret = sysdb_get_selinux_usermaps(state, state->be_req->be_ctx->sysdb,
+ state->be_req->be_ctx->domain,
attrs, &nmaps, &maps);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE, ("sysdb_get_selinux_usermaps failed [%d]: %s\n",
diff --git a/src/providers/ipa/ipa_selinux_common.c b/src/providers/ipa/ipa_selinux_common.c
index 45794388..2276d0c9 100644
--- a/src/providers/ipa/ipa_selinux_common.c
+++ b/src/providers/ipa/ipa_selinux_common.c
@@ -28,6 +28,7 @@
errno_t ipa_save_user_maps(struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
size_t map_count,
struct sysdb_attrs **maps)
{
@@ -44,7 +45,7 @@ errno_t ipa_save_user_maps(struct sysdb_ctx *sysdb,
in_transaction = true;
for (i = 0; i < map_count; i++) {
- ret = sysdb_store_selinux_usermap(sysdb, maps[i]);
+ ret = sysdb_store_selinux_usermap(sysdb, domain, maps[i]);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE, ("Failed to store user map %d. "
"Ignoring.\n", i));
diff --git a/src/providers/ipa/ipa_selinux_common.h b/src/providers/ipa/ipa_selinux_common.h
index d722136e..8a659556 100644
--- a/src/providers/ipa/ipa_selinux_common.h
+++ b/src/providers/ipa/ipa_selinux_common.h
@@ -29,6 +29,7 @@ errno_t ipa_save_host(struct sysdb_ctx *sysdb,
struct sysdb_attrs *host);
errno_t ipa_save_user_maps(struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
size_t map_count,
struct sysdb_attrs **maps);