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.h | |
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.h')
-rw-r--r-- | server/db/sysdb.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/server/db/sysdb.h b/server/db/sysdb.h index c1ae7979..4083edd8 100644 --- a/server/db/sysdb.h +++ b/server/db/sysdb.h @@ -36,6 +36,10 @@ #define SYSDB_USER_CLASS "user" #define SYSDB_GROUP_CLASS "group" +#define SYSDB_NEXTID "nextID" +#define SYSDB_UIDNUM "uidNumber" +#define SYSDB_GIDNUM "gidNumber" + #define SYSDB_PW_NAME "uid" #define SYSDB_PW_PWD "userPassword" #define SYSDB_PW_UIDNUM "uidNumber" @@ -64,6 +68,8 @@ #define SYSDB_LAST_UPDATE "lastUpdate" +#define SYSDB_NEXTID_FILTER "("SYSDB_NEXTID"=*)" + #define SYSDB_PWNAM_FILTER "(&(objectclass="SYSDB_USER_CLASS")("SYSDB_PW_NAME"=%s))" #define SYSDB_PWUID_FILTER "(&(objectclass="SYSDB_USER_CLASS")("SYSDB_PW_UIDNUM"=%lu))" #define SYSDB_PWENT_FILTER "(objectclass="SYSDB_USER_CLASS")" @@ -160,9 +166,10 @@ void sysdb_operation_done(struct sysdb_req *req); struct ldb_dn *sysdb_user_dn(struct sysdb_ctx *ctx, void *memctx, const char *domain, const char *name); - struct ldb_dn *sysdb_group_dn(struct sysdb_ctx *ctx, void *memctx, const char *domain, const char *name); +struct ldb_dn *sysdb_domain_dn(struct sysdb_ctx *ctx, void *memctx, + const char *domain); int sysdb_init(TALLOC_CTX *mem_ctx, struct tevent_context *ev, |