]> git.sur5r.net Git - openldap/commitdiff
ITS#4613 - fail to start if lastmod is off
authorHoward Chu <hyc@openldap.org>
Mon, 24 Jul 2006 00:32:27 +0000 (00:32 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 24 Jul 2006 00:32:27 +0000 (00:32 +0000)
servers/slapd/overlays/syncprov.c

index 5a3b4185c631d59e0060deaee0d11d62152d5dfc..c9de4aec8ed9abc7c5a831fa6a38b45d3a754e16 100644 (file)
@@ -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;
        }