]> git.sur5r.net Git - openldap/commitdiff
ITS#6963 config entries' objectclass is read-only
authorHoward Chu <hyc@openldap.org>
Sat, 4 Jun 2011 20:40:57 +0000 (13:40 -0700)
committerHoward Chu <hyc@openldap.org>
Sat, 4 Jun 2011 20:40:57 +0000 (13:40 -0700)
servers/slapd/bconfig.c

index 2e853db53ce98d238d7e20c118bbc929236d5272..fe0735cbaa0dfecb75c5854ba01e6fe91d869474 100644 (file)
@@ -5561,6 +5561,11 @@ config_modify_internal( CfEntryInfo *ce, Operation *op, SlapReply *rs,
        oc_at = attr_find( e->e_attrs, slap_schema.si_ad_objectClass );
        if ( !oc_at ) return LDAP_OBJECT_CLASS_VIOLATION;
 
+       for (ml = op->orm_modlist; ml; ml=ml->sml_next) {
+               if (ml->sml_desc == slap_schema.si_ad_objectClass)
+                       return rc;
+       }
+
        colst = count_ocs( oc_at, &nocs );
 
        /* make sure add/del flags are clear; should always be true */