summaryrefslogtreecommitdiffstats
path: root/ldap/servers/slapd/backend.c
diff options
context:
space:
mode:
authorNoriko Hosoi <nhosoi@redhat.com>2010-09-12 21:59:29 -0700
committerNoriko Hosoi <nhosoi@redhat.com>2010-09-13 10:06:51 -0700
commit80ce631a97977c273a56b5d4d7e99a7eaf109d57 (patch)
tree75207bb0b02a57485d87efedabfcc2fe243eeb06 /ldap/servers/slapd/backend.c
parent2a25e6518f6e2bd83dd4750bf023d332edef2063 (diff)
downloadds-80ce631a97977c273a56b5d4d7e99a7eaf109d57.tar.gz
ds-80ce631a97977c273a56b5d4d7e99a7eaf109d57.tar.xz
ds-80ce631a97977c273a56b5d4d7e99a7eaf109d57.zip
Bug 633168 - Share backend dbEnv with the replication changelog
https://bugzilla.redhat.com/show_bug.cgi?id=633168 Description: * cl5_api.c, cl5_api.h - fetches dbEnv from backend using slapi_back_get_info. - unused macros and DB helper functions and APIs are removed. * cl5_config.c - local changelog DB related config parameters are removed. * Added SLAPI_PLUGIN_BE_PRE_CLOSE_FN and SLAPI_PLUGIN_BE_POST_OPEN_FN to close changelog DB before dbEnv is closed and to open changelog DB after dbEnv is opened, respectively. * Added slapi APIs slapi_back_get_info and slapi_back_set_info to get/set the backend info. * back-ldbm - db2bak[.pl] and bak2db[.pl] backs up and restores the database files including changelog db. - changelog dir is backed up in <backupdir>/.repl_changelog_backup. - underlying implementation ldbm_back_get_info for slapi_back_get_info is added. * Added an upgrade script 81changelog.pl See also: http://directory.fedoraproject.org/wiki/Move_changelog
Diffstat (limited to 'ldap/servers/slapd/backend.c')
-rw-r--r--ldap/servers/slapd/backend.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/ldap/servers/slapd/backend.c b/ldap/servers/slapd/backend.c
index 087f437a..9bdc0aff 100644
--- a/ldap/servers/slapd/backend.c
+++ b/ldap/servers/slapd/backend.c
@@ -581,3 +581,25 @@ void be_set_timelimit(Slapi_Backend * be, int timelimit)
{
be->be_timelimit = timelimit;
}
+
+int
+slapi_back_get_info(Slapi_Backend *be, int cmd, void **info)
+{
+ int rc = -1;
+ if (!be || !be->be_get_info || !info) {
+ return rc;
+ }
+ rc = (*be->be_get_info)(be, cmd, info);
+ return rc;
+}
+
+int
+slapi_back_set_info(Slapi_Backend *be, int cmd, void *info)
+{
+ int rc = -1;
+ if (!be || !be->be_set_info || !info) {
+ return rc;
+ }
+ rc = (*be->be_set_info)(be, cmd, info);
+ return rc;
+}