summaryrefslogtreecommitdiff
path: root/src/db
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/db
parent770896b194b7b66b09c2a30545b4d091fd86b1f4 (diff)
downloadsssd-a703ed242523c145133f522085ee3180452b3743.tar.gz
sssd-a703ed242523c145133f522085ee3180452b3743.tar.bz2
sssd-a703ed242523c145133f522085ee3180452b3743.zip
Add domain to sysdb_delete_custom
Diffstat (limited to 'src/db')
-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
5 files changed, 6 insertions, 4 deletions
diff --git a/src/db/sysdb.h b/src/db/sysdb.h
index a82363b1..96f32927 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 e226662f..d0af1eef 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 4cd94bd5..6b5a1c40 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 d6563417..4eabe3d5 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 7704c02b..56ac8428 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,