]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9823 Only request minCSN if accesslog is around
authorOndřej Kuzník <ondra@mistotebe.net>
Thu, 7 Jul 2022 20:31:03 +0000 (21:31 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Thu, 7 Jul 2022 21:25:02 +0000 (21:25 +0000)
servers/slapd/overlays/syncprov.c

index ec37c0bb3eaca7d0ee4ae457bfa73822f32eb1f6..6d749a534d00cc2ab7281af97bce92ac312e4389 100644 (file)
@@ -3344,7 +3344,7 @@ no_change:        if ( !(op->o_sync_mode & SLAP_SYNC_PERSIST) ) {
                                        numcsns, sids, &mincsn, minsid ) ) {
                                do_present = SS_PRESENT;
                        }
-               } else if ( si->si_nopres && si->si_usehint ) {
+               } else if ( ad_minCSN != NULL && si->si_nopres && si->si_usehint ) {
                        /* We are instructed to trust minCSN if it exists. */
                        Entry *e;
                        Attribute *a = NULL;
@@ -3837,7 +3837,10 @@ sp_cf_gen(ConfigArgs *c)
                break;
        case SP_USEHINT:
                si->si_usehint = c->value_int;
-               rc = syncprov_setup_accesslog();
+               if ( si->si_usehint ) {
+                       /* Consider we might be a delta provider, but it's ok if not */
+                       (void)syncprov_setup_accesslog();
+               }
                break;
        case SP_LOGDB:
                if ( si->si_logs ) {