diff options
author | Simo Sorce <ssorce@redhat.com> | 2009-09-03 19:29:41 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2009-09-08 15:10:50 -0400 |
commit | 28d9dcbeabdf919506fe59e9d1cbed84fbd6e649 (patch) | |
tree | 3d5d878b1adc0ec8af94a52359d219689c763bd8 /server/db/sysdb.h | |
parent | aef967dc115c64f0288b8ecc3ff1d927aa42af70 (diff) | |
download | sssd-28d9dcbeabdf919506fe59e9d1cbed84fbd6e649.tar.gz sssd-28d9dcbeabdf919506fe59e9d1cbed84fbd6e649.tar.xz sssd-28d9dcbeabdf919506fe59e9d1cbed84fbd6e649.zip |
Split database in multiple files
The special persistent local database retains the original name.
All other backends now have their own cache-NAME.ldb file.
Diffstat (limited to 'server/db/sysdb.h')
-rw-r--r-- | server/db/sysdb.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/server/db/sysdb.h b/server/db/sysdb.h index 3d75f507e..2d8b3eaea 100644 --- a/server/db/sysdb.h +++ b/server/db/sysdb.h @@ -26,7 +26,8 @@ #include <tevent.h> #define SYSDB_CONF_SECTION "config/sysdb" -#define SYSDB_FILE "sssd.ldb" +#define CACHE_SYSDB_FILE "cache_%s.ldb" +#define LOCAL_SYSDB_FILE "sssd.ldb" #define SYSDB_BASE "cn=sysdb" #define SYSDB_DOM_BASE "cn=%s,cn=sysdb" @@ -137,6 +138,7 @@ #define SYSDB_MOD_REP LDB_FLAG_MOD_REPLACE struct confdb_ctx; +struct sysdb_ctx_list; struct sysdb_ctx; struct sysdb_handle; @@ -215,7 +217,19 @@ int sysdb_init(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct confdb_ctx *cdb, const char *alt_db_path, - struct sysdb_ctx **dbctx); + bool allow_upgrade, + struct sysdb_ctx_list **_ctx_list); +/* used to initialize only one domain database. + * Do NOT use if sysdb_init has already been called */ +int sysdb_domain_init(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct sss_domain_info *domain, + const char *db_path, + struct sysdb_ctx **_ctx); + +int sysdb_get_ctx_from_list(struct sysdb_ctx_list *ctx_list, + struct sss_domain_info *domain, + struct sysdb_ctx **_ctx); /* FIXME: REMOVE */ typedef void (*sysdb_callback_t)(void *, int, struct ldb_result *); |