From 1bab6404f52f753624b12a4d96d9e41fcb5c1d4f Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Sat, 7 Feb 2009 11:54:53 +0000 Subject: [PATCH] consistently allow explicit add/delete of superior objectClasses (ITS#5517) --- servers/slapd/mods.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/servers/slapd/mods.c b/servers/slapd/mods.c index 328d69b53b..1ad15f8906 100644 --- a/servers/slapd/mods.c +++ b/servers/slapd/mods.c @@ -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; -- 2.39.5