]> git.sur5r.net Git - openldap/commitdiff
consistently allow explicit add/delete of superior objectClasses (ITS#5517)
authorPierangelo Masarati <ando@openldap.org>
Sat, 7 Feb 2009 11:54:53 +0000 (11:54 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 7 Feb 2009 11:54:53 +0000 (11:54 +0000)
servers/slapd/mods.c

index 328d69b53be4f90beb01fb203755857930bd1814..1ad15f8906997ed3068939a25d4a1237cc16e0c6 100644 (file)
@@ -99,7 +99,13 @@ modify_add_values(
                 * server (whether from LDAP or from the underlying
                 * database).
                 */
-               flags = SLAP_MR_EQUALITY | SLAP_MR_VALUE_OF_ASSERTION_SYNTAX;
+               if ( a->a_desc == slap_schema.si_ad_objectClass ) {
+                       /* Needed by ITS#5517 */
+                       flags = SLAP_MR_EQUALITY | SLAP_MR_VALUE_OF_ATTRIBUTE_SYNTAX;
+
+               } else {
+                       flags = SLAP_MR_EQUALITY | SLAP_MR_VALUE_OF_ASSERTION_SYNTAX;
+               }
                if ( mod->sm_nvalues ) {
                        flags |= SLAP_MR_ASSERTED_VALUE_NORMALIZED_MATCH |
                                SLAP_MR_ATTRIBUTE_VALUE_NORMALIZED_MATCH;