summaryrefslogtreecommitdiffstats
path: root/server/db/sysdb.c
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2009-03-04 23:05:54 -0500
committerSimo Sorce <ssorce@redhat.com>2009-03-04 23:05:54 -0500
commitf9f42495c5ab22e17f7e59bd2df3f9353301d8b8 (patch)
treef002e47c49a1a5a3fac6bdf22d265588bf6f52ad /server/db/sysdb.c
parenteb4f8ab8ddd78e3b2efc6130509f035001154ba3 (diff)
downloadsssd-f9f42495c5ab22e17f7e59bd2df3f9353301d8b8.tar.gz
sssd-f9f42495c5ab22e17f7e59bd2df3f9353301d8b8.tar.xz
sssd-f9f42495c5ab22e17f7e59bd2df3f9353301d8b8.zip
Add internal min/max/next id management fucntions
Retrieve minID and maxID from domain configuration so that lower and upper bounds can be set per domain. Add function that keeps track of the next available id, increments and returns it on requests, avoiding collisions with existing ids.
Diffstat (limited to 'server/db/sysdb.c')
-rw-r--r--server/db/sysdb.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/server/db/sysdb.c b/server/db/sysdb.c
index b65584997..bdc7588fe 100644
--- a/server/db/sysdb.c
+++ b/server/db/sysdb.c
@@ -36,6 +36,12 @@ struct ldb_dn *sysdb_group_dn(struct sysdb_ctx *ctx, void *memctx,
return ldb_dn_new_fmt(memctx, ctx->ldb, SYSDB_TMPL_GROUP, name, domain);
}
+struct ldb_dn *sysdb_domain_dn(struct sysdb_ctx *ctx, void *memctx,
+ const char *domain)
+{
+ return ldb_dn_new_fmt(memctx, ctx->ldb, SYSDB_DOM_BASE, domain);
+}
+
struct ldb_context *sysdb_ctx_get_ldb(struct sysdb_ctx *ctx)
{
return ctx->ldb;