]> git.sur5r.net Git - openldap/commitdiff
handle softadd/softdel (internal modifications; ITS#7773)
authorPierangelo Masarati <ando@OpenLDAP.org>
Sat, 28 Dec 2013 15:18:10 +0000 (16:18 +0100)
committerPierangelo Masarati <ando@OpenLDAP.org>
Sat, 28 Dec 2013 15:20:08 +0000 (16:20 +0100)
servers/slapd/overlays/constraint.c

index 62dec6be955a8213081b0aa825fa9d5938b98548..4e8b13dd6cd93a6539defe8816eecf6e4a9a2914 100644 (file)
@@ -855,6 +855,7 @@ constraint_check_count_violation( Modifications *m, Entry *target_entry, constra
                                ca = m->sml_numvals;
                                switch ( m->sml_op ) {
                                case LDAP_MOD_DELETE:
+                               case SLAP_MOD_SOFTDEL:
                                        if ( !ca || ca > ce ) {
                                                ce = 0;
                                        } else {
@@ -865,6 +866,7 @@ constraint_check_count_violation( Modifications *m, Entry *target_entry, constra
                                        break;
 
                                case LDAP_MOD_ADD:
+                               case SLAP_MOD_SOFTADD:
                                        ce += ca;
                                        break;
 
@@ -872,6 +874,11 @@ constraint_check_count_violation( Modifications *m, Entry *target_entry, constra
                                        ce = ca;
                                        break;
 
+#if 0
+                               /* TODO */
+                               case handle SLAP_MOD_ADD_IF_NOT_PRESENT:
+#endif
+
                                default:
                                        /* impossible! assert? */
                                        return 1;