summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2012-10-18 17:40:48 +0200
committerJakub Hrozek <jhrozek@redhat.com>2012-11-05 00:14:05 +0100
commit905579cfac2e0fe4b88bd204051264104a3f1700 (patch)
tree9577f9160b10c117c25a32d790fb45d0ac4543ef
parentf301ab3bd5959a796f2e88aa29fe40471a800e78 (diff)
downloadsssd-905579cfac2e0fe4b88bd204051264104a3f1700.tar.gz
sssd-905579cfac2e0fe4b88bd204051264104a3f1700.tar.xz
sssd-905579cfac2e0fe4b88bd204051264104a3f1700.zip
sysdb: add sysdb_base_dn()
Add a help function which returns the ldb_dn object for the base dn of the cache.
-rw-r--r--src/db/sysdb.c4
-rw-r--r--src/db/sysdb.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/src/db/sysdb.c b/src/db/sysdb.c
index 25ff67506..9685163b3 100644
--- a/src/db/sysdb.c
+++ b/src/db/sysdb.c
@@ -283,6 +283,10 @@ struct ldb_dn *sysdb_domain_dn(struct sysdb_ctx *sysdb, TALLOC_CTX *mem_ctx)
{
return ldb_dn_new_fmt(mem_ctx, sysdb->ldb, SYSDB_DOM_BASE, sysdb->domain->name);
}
+struct ldb_dn *sysdb_base_dn(struct sysdb_ctx *sysdb, TALLOC_CTX *mem_ctx)
+{
+ return ldb_dn_new(mem_ctx, sysdb->ldb, SYSDB_BASE);
+}
struct ldb_context *sysdb_ctx_get_ldb(struct sysdb_ctx *sysdb)
{
diff --git a/src/db/sysdb.h b/src/db/sysdb.h
index 0ce6beaa3..8fe0e81c1 100644
--- a/src/db/sysdb.h
+++ b/src/db/sysdb.h
@@ -328,6 +328,7 @@ struct ldb_dn *sysdb_netgroup_base_dn(struct sysdb_ctx *sysdb, TALLOC_CTX *mem_c
errno_t sysdb_group_dn_name(struct sysdb_ctx *sysdb, TALLOC_CTX *mem_ctx,
const char *dn_str, char **name);
struct ldb_dn *sysdb_domain_dn(struct sysdb_ctx *sysdb, TALLOC_CTX *mem_ctx);
+struct ldb_dn *sysdb_base_dn(struct sysdb_ctx *sysdb, TALLOC_CTX *mem_ctx);
struct ldb_dn *sysdb_custom_dn(struct sysdb_ctx *sysdb, TALLOC_CTX *mem_ctx,
const char *object_name,
const char *subtree_name);