summaryrefslogtreecommitdiffstats
path: root/server/db/sysdb.h
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2009-02-25 19:36:43 -0500
committerSimo Sorce <ssorce@redhat.com>2009-02-26 18:31:52 -0500
commit60bbc5034e546b7df7a6f782e3353b863f49618b (patch)
treecb8e8fc899c38ec78e71068c4b59ab8bb643117f /server/db/sysdb.h
parent89579fee5961b1dccfd59b431f0fbe160cacc2b7 (diff)
downloadsssd-60bbc5034e546b7df7a6f782e3353b863f49618b.tar.gz
sssd-60bbc5034e546b7df7a6f782e3353b863f49618b.tar.xz
sssd-60bbc5034e546b7df7a6f782e3353b863f49618b.zip
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.
Diffstat (limited to 'server/db/sysdb.h')
-rw-r--r--server/db/sysdb.h14
1 files changed, 1 insertions, 13 deletions
diff --git a/server/db/sysdb.h b/server/db/sysdb.h
index c6cc4deb7..c0ef361be 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,