]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9282 fix crash in nonpresent_callback
authorHoward Chu <hyc@openldap.org>
Mon, 31 Aug 2020 18:36:10 +0000 (19:36 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Mon, 31 Aug 2020 19:59:21 +0000 (19:59 +0000)
In a standard Refresh present phase, the provider sends no cookie
since it is only listing the entries that existed as of the time
in the cookie the consumer sent. In this case the consumer only
needs to check entryCSNs against its last sent cookie.

servers/slapd/syncrepl.c

index bb9bb387a1f4bd6e01ddb4b14a0855029a4e579a..8ceb38f334e99a04b92a3e2465d88e657197e7a3 100644 (file)
@@ -4613,6 +4613,9 @@ nonpresent_callback(
                if ( present_uuid == NULL ) {
                        int covered = 1; /* covered by our new contextCSN? */
 
+                       if ( !syncCookie )
+                               syncCookie = &si->si_syncCookie;
+
                        /* TODO: This can go once we can build a filter that takes care of
                         * the check for us */
                        a = attr_find( rs->sr_entry->e_attrs, slap_schema.si_ad_entryCSN );