diff options
author | Simo Sorce <ssorce@redhat.com> | 2009-03-04 23:05:54 -0500 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2009-03-04 23:05:54 -0500 |
commit | f9f42495c5ab22e17f7e59bd2df3f9353301d8b8 (patch) | |
tree | f002e47c49a1a5a3fac6bdf22d265588bf6f52ad /server/db/sysdb.c | |
parent | eb4f8ab8ddd78e3b2efc6130509f035001154ba3 (diff) | |
download | sssd-f9f42495c5ab22e17f7e59bd2df3f9353301d8b8.tar.gz sssd-f9f42495c5ab22e17f7e59bd2df3f9353301d8b8.tar.bz2 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.c | 6 |
1 files changed, 6 insertions, 0 deletions
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; |