summaryrefslogtreecommitdiffstats
path: root/src/db/sysdb_sudo.c
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-01-06 02:04:58 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-01-15 10:49:20 +0100
commit9675bccabff4e79d224f64611ad9ff3e073b488e (patch)
tree39f5a16b37263395930a6e0ed209a3244ae22c81 /src/db/sysdb_sudo.c
parentde526c8425886ca3bed8f07a0f092ba5ac325654 (diff)
downloadsssd-9675bccabff4e79d224f64611ad9ff3e073b488e.tar.gz
sssd-9675bccabff4e79d224f64611ad9ff3e073b488e.tar.xz
sssd-9675bccabff4e79d224f64611ad9ff3e073b488e.zip
Make sysdb_custom_subtree_dn() require a domain.
Diffstat (limited to 'src/db/sysdb_sudo.c')
-rw-r--r--src/db/sysdb_sudo.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/db/sysdb_sudo.c b/src/db/sysdb_sudo.c
index d50df0bad..9a8e76aa8 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);