]> git.sur5r.net Git - openldap/commitdiff
fix syncrepl when attr has no matching rule (ITS#6458)
authorPierangelo Masarati <ando@openldap.org>
Sun, 18 Apr 2010 05:37:36 +0000 (05:37 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sun, 18 Apr 2010 05:37:36 +0000 (05:37 +0000)
servers/slapd/syncrepl.c

index a5a35d5ba4b7ba23b969db5c47c391defed7033c..f05be0a49c2fe72e4f30512752b23a38b36d8050 100644 (file)
@@ -3286,10 +3286,12 @@ attr_cmp( Operation *op, Attribute *old, Attribute *new,
                 * Also use replace op if attr has no equality matching rule.
                 * (ITS#5781)
                 */
-               if ( nn && no < o &&
+               if ( ( nn || ( no > 0 && no < o ) ) &&
                        ( old->a_desc == slap_schema.si_ad_objectClass ||
-                        !old->a_desc->ad_type->sat_equality ))
+                        !old->a_desc->ad_type->sat_equality ) )
+               {
                        no = o;
+               }
 
                i = j;
                /* all old values were deleted, just use the replace op */