From f9f42495c5ab22e17f7e59bd2df3f9353301d8b8 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Wed, 4 Mar 2009 23:05:54 -0500 Subject: 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. --- server/db/sysdb.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'server/db/sysdb.c') diff --git a/server/db/sysdb.c b/server/db/sysdb.c index b6558499..bdc7588f 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; -- cgit