From 60bbc5034e546b7df7a6f782e3353b863f49618b Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Wed, 25 Feb 2009 19:36:43 -0500 Subject: Serialize access to sysdb and also exposes ldb transactions. This is necessary because in ldb only 1 transaction per context is possible and all operations (or new transactions) are nested within it. Will revisit this later when ldb will addresses the problem. --- server/db/sysdb.h | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'server/db/sysdb.h') diff --git a/server/db/sysdb.h b/server/db/sysdb.h index c6cc4deb..c0ef361b 100644 --- a/server/db/sysdb.h +++ b/server/db/sysdb.h @@ -23,7 +23,6 @@ #define __SYS_DB_H__ #include "ldb.h" -#include "ldb_errors.h" #define SYSDB_CONF_SECTION "config/sysdb" #define SYSDB_FILE "sssd.ldb" @@ -77,12 +76,8 @@ #define SYSDB_INITGR_ATTRS {SYSDB_GR_GIDNUM, SYSDB_LAST_UPDATE, \ NULL} -struct sysdb_ctx { - struct ldb_context *ldb; - char *ldb_file; -}; - struct confdb_ctx; +struct sysdb_ctx; typedef void (*sysdb_callback_t)(void *, int, struct ldb_result *); @@ -93,7 +88,6 @@ int sysdb_init(TALLOC_CTX *mem_ctx, struct sysdb_ctx **dbctx); int sysdb_getpwnam(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, struct sysdb_ctx *ctx, const char *domain, const char *name, @@ -101,7 +95,6 @@ int sysdb_getpwnam(TALLOC_CTX *mem_ctx, sysdb_callback_t fn, void *ptr); int sysdb_getpwuid(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, struct sysdb_ctx *ctx, const char *domain, uid_t uid, @@ -109,14 +102,12 @@ int sysdb_getpwuid(TALLOC_CTX *mem_ctx, sysdb_callback_t fn, void *ptr); int sysdb_enumpwent(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, struct sysdb_ctx *ctx, const char *domain, bool legacy, sysdb_callback_t fn, void *ptr); int sysdb_getgrnam(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, struct sysdb_ctx *ctx, const char *domain, const char *name, @@ -124,7 +115,6 @@ int sysdb_getgrnam(TALLOC_CTX *mem_ctx, sysdb_callback_t fn, void *ptr); int sysdb_getgrgid(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, struct sysdb_ctx *ctx, const char *domain, gid_t gid, @@ -132,14 +122,12 @@ int sysdb_getgrgid(TALLOC_CTX *mem_ctx, sysdb_callback_t fn, void *ptr); int sysdb_enumgrent(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, struct sysdb_ctx *ctx, const char *domain, bool legacy, sysdb_callback_t fn, void *ptr); int sysdb_initgroups(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, struct sysdb_ctx *ctx, const char *domain, const char *name, -- cgit