From 00addd5d689cb91b152fe4c8e0d59ab637ca0ff0 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Mon, 24 Jul 2006 00:32:27 +0000 Subject: [PATCH] ITS#4613 - fail to start if lastmod is off --- servers/slapd/overlays/syncprov.c | 7 +++++++ 1 file changed, 7 insertions(+) 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; } -- 2.39.5