summaryrefslogtreecommitdiffstats
path: root/src/db/sysdb_selinux.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/db/sysdb_selinux.c')
-rw-r--r--src/db/sysdb_selinux.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/db/sysdb_selinux.c b/src/db/sysdb_selinux.c
index 8e69cd3e2..5311545da 100644
--- a/src/db/sysdb_selinux.c
+++ b/src/db/sysdb_selinux.c
@@ -271,7 +271,24 @@ done:
return ret;
}
+errno_t sysdb_delete_usermaps(struct sysdb_ctx *sysdb)
+{
+ struct ldb_dn *dn = NULL;
+ errno_t ret;
+
+ dn = ldb_dn_new_fmt(sysdb, sysdb->ldb,
+ SYSDB_TMPL_SELINUX_BASE, sysdb->domain->name);
+ if (!dn) return ENOMEM;
+
+ ret = sysdb_delete_recursive(sysdb, dn, true);
+ talloc_free(dn);
+ if (ret != EOK) {
+ DEBUG(SSSDBG_CRIT_FAILURE, ("sysdb_delete_recursive failed.\n"));
+ return ret;
+ }
+ return EOK;
+}
/* --- SYSDB SELinux search routines --- */
errno_t sysdb_search_selinux_usermap_by_mapname(TALLOC_CTX *mem_ctx,