diff options
Diffstat (limited to 'src/providers')
-rw-r--r-- | src/providers/ipa/ipa_selinux.c | 9 | ||||
-rw-r--r-- | src/providers/ipa/ipa_selinux_common.c | 3 | ||||
-rw-r--r-- | src/providers/ipa/ipa_selinux_common.h | 1 |
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); |