From: Howard Chu Date: Mon, 24 Jul 2006 00:32:27 +0000 (+0000) Subject: ITS#4613 - fail to start if lastmod is off X-Git-Tag: OPENLDAP_REL_ENG_2_4_3ALPHA~9^2~44 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=00addd5d689cb91b152fe4c8e0d59ab637ca0ff0;p=openldap ITS#4613 - fail to start if lastmod is off --- diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c index 5a3b4185c6..c9de4aec8e 100644 --- a/servers/slapd/overlays/syncprov.c +++ b/servers/slapd/overlays/syncprov.c @@ -1366,6 +1366,7 @@ syncprov_playlog( Operation *op, SlapReply *rs, sessionlog *sl, i++; AC_MEMCPY( cbuf, se->se_csn.bv_val, se->se_csn.bv_len ); delcsn.bv_len = se->se_csn.bv_len; + delcsn.bv_val[delcsn.bv_len] = '\0'; } else { nmods++; j = num - nmods; @@ -2326,6 +2327,12 @@ syncprov_db_open( int rc; void *thrctx = NULL; + if ( !SLAP_LASTMOD( be )) { + Debug( LDAP_DEBUG_ANY, + "syncprov_db_open: invalid config, lastmod must be enabled\n", 0, 0, 0 ); + return -1; + } + if ( slapMode & SLAP_TOOL_MODE ) { return 0; }