From 9675bccabff4e79d224f64611ad9ff3e073b488e Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Sun, 6 Jan 2013 02:04:58 -0500 Subject: Make sysdb_custom_subtree_dn() require a domain. --- src/db/sysdb_sudo.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/db/sysdb_sudo.c') diff --git a/src/db/sysdb_sudo.c b/src/db/sysdb_sudo.c index d50df0ba..9a8e76aa 100644 --- a/src/db/sysdb_sudo.c +++ b/src/db/sysdb_sudo.c @@ -598,7 +598,8 @@ errno_t sysdb_sudo_get_last_full_refresh(struct sysdb_ctx *sysdb, time_t *value) /* ==================== Purge functions ==================== */ -errno_t sysdb_sudo_purge_all(struct sysdb_ctx *sysdb) +static errno_t sysdb_sudo_purge_all(struct sysdb_ctx *sysdb, + struct sss_domain_info *domain) { struct ldb_dn *base_dn = NULL; TALLOC_CTX *tmp_ctx = NULL; @@ -607,7 +608,7 @@ errno_t sysdb_sudo_purge_all(struct sysdb_ctx *sysdb) tmp_ctx = talloc_new(NULL); NULL_CHECK(tmp_ctx, ret, done); - base_dn = sysdb_custom_subtree_dn(sysdb, tmp_ctx, SUDORULE_SUBDIR); + base_dn = sysdb_custom_subtree_dn(sysdb, tmp_ctx, domain, SUDORULE_SUBDIR); NULL_CHECK(base_dn, ret, done); ret = sysdb_delete_recursive(sysdb, base_dn, true); @@ -630,6 +631,7 @@ errno_t sysdb_sudo_purge_byname(struct sysdb_ctx *sysdb, } errno_t sysdb_sudo_purge_byfilter(struct sysdb_ctx *sysdb, + struct sss_domain_info *domain, const char *filter) { TALLOC_CTX *tmp_ctx; @@ -647,7 +649,7 @@ errno_t sysdb_sudo_purge_byfilter(struct sysdb_ctx *sysdb, /* just purge all if there's no filter */ if (!filter) { - return sysdb_sudo_purge_all(sysdb); + return sysdb_sudo_purge_all(sysdb, domain); } tmp_ctx = talloc_new(NULL); -- cgit