summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-01-07 22:45:15 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-01-15 10:53:02 +0100
commita703ed242523c145133f522085ee3180452b3743 (patch)
treeeb200f4f69dd54f7447e1c871c6a2f7ea64c421e /src
parent770896b194b7b66b09c2a30545b4d091fd86b1f4 (diff)
downloadsssd-a703ed242523c145133f522085ee3180452b3743.tar.gz
sssd-a703ed242523c145133f522085ee3180452b3743.tar.xz
sssd-a703ed242523c145133f522085ee3180452b3743.zip
Add domain to sysdb_delete_custom
Diffstat (limited to 'src')
-rw-r--r--src/db/sysdb.h1
-rw-r--r--src/db/sysdb_autofs.c2
-rw-r--r--src/db/sysdb_ops.c3
-rw-r--r--src/db/sysdb_ssh.c2
-rw-r--r--src/db/sysdb_sudo.c2
-rw-r--r--src/tests/sysdb-tests.c2
6 files changed, 7 insertions, 5 deletions
diff --git a/src/db/sysdb.h b/src/db/sysdb.h
index a82363b1e..96f329271 100644
--- a/src/db/sysdb.h
+++ b/src/db/sysdb.h
@@ -740,6 +740,7 @@ int sysdb_search_custom_by_name(TALLOC_CTX *mem_ctx,
struct ldb_message ***_msgs);
int sysdb_delete_custom(struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
const char *object_name,
const char *subtree_name);
diff --git a/src/db/sysdb_autofs.c b/src/db/sysdb_autofs.c
index e226662fe..d0af1eef7 100644
--- a/src/db/sysdb_autofs.c
+++ b/src/db/sysdb_autofs.c
@@ -160,7 +160,7 @@ sysdb_delete_autofsmap(struct sysdb_ctx *sysdb_ctx,
const char *name)
{
DEBUG(SSSDBG_TRACE_FUNC, ("Deleting autofs map %s\n", name));
- return sysdb_delete_custom(sysdb_ctx, name, AUTOFS_MAP_SUBDIR);
+ return sysdb_delete_custom(sysdb_ctx, sysdb_ctx->domain, name, AUTOFS_MAP_SUBDIR);
}
errno_t
diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c
index 4cd94bd57..6b5a1c40d 100644
--- a/src/db/sysdb_ops.c
+++ b/src/db/sysdb_ops.c
@@ -2202,6 +2202,7 @@ done:
/* = Custom Delete======================================= */
int sysdb_delete_custom(struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
const char *object_name,
const char *subtree_name)
{
@@ -2219,7 +2220,7 @@ int sysdb_delete_custom(struct sysdb_ctx *sysdb,
}
dn = sysdb_custom_dn(sysdb, tmp_ctx,
- sysdb->domain, object_name, subtree_name);
+ domain, object_name, subtree_name);
if (dn == NULL) {
DEBUG(1, ("sysdb_custom_dn failed.\n"));
ret = ENOMEM;
diff --git a/src/db/sysdb_ssh.c b/src/db/sysdb_ssh.c
index d65634174..4eabe3d5b 100644
--- a/src/db/sysdb_ssh.c
+++ b/src/db/sysdb_ssh.c
@@ -225,7 +225,7 @@ sysdb_delete_ssh_host(struct sysdb_ctx *sysdb,
const char *name)
{
DEBUG(SSSDBG_TRACE_FUNC, ("Deleting host %s\n", name));
- return sysdb_delete_custom(sysdb, name, SSH_HOSTS_SUBDIR);
+ return sysdb_delete_custom(sysdb, sysdb->domain, name, SSH_HOSTS_SUBDIR);
}
static errno_t
diff --git a/src/db/sysdb_sudo.c b/src/db/sysdb_sudo.c
index 7704c02be..56ac8428c 100644
--- a/src/db/sysdb_sudo.c
+++ b/src/db/sysdb_sudo.c
@@ -627,7 +627,7 @@ errno_t sysdb_sudo_purge_byname(struct sysdb_ctx *sysdb,
const char *name)
{
DEBUG(SSSDBG_TRACE_INTERNAL, ("Deleting sudo rule %s\n", name));
- return sysdb_delete_custom(sysdb, name, SUDORULE_SUBDIR);
+ return sysdb_delete_custom(sysdb, sysdb->domain, name, SUDORULE_SUBDIR);
}
errno_t sysdb_sudo_purge_byfilter(struct sysdb_ctx *sysdb,
diff --git a/src/tests/sysdb-tests.c b/src/tests/sysdb-tests.c
index e4a0dd94d..595ef0a7b 100644
--- a/src/tests/sysdb-tests.c
+++ b/src/tests/sysdb-tests.c
@@ -364,7 +364,7 @@ static int test_delete_custom(struct test_data *data)
{
int ret;
- ret = sysdb_delete_custom(data->ctx->sysdb,
+ ret = sysdb_delete_custom(data->ctx->sysdb, data->ctx->domain,
CUSTOM_TEST_OBJECT, CUSTOM_TEST_CONTAINER);
return ret;
}