]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/schema_check.c
allow array of more generic syntaxes
[openldap] / servers / slapd / schema_check.c
index 7d0ce830c2cb9d210112cfd8fea466b0e26b13eb..e3b76090e7568c8aa72c1a080608bb1d032d857c 100644 (file)
@@ -387,10 +387,12 @@ got_soc:
                                                        }
                                                }
                                        }
-                                       snprintf( textbuf, textlen, 
-                                               "class '%s' not allowed by content rule '%s'",
-                                               oc->soc_cname.bv_val,
-                                               ldap_contentrule2name( &cr->scr_crule ) );
+                                       if ( k ) {
+                                               snprintf( textbuf, textlen, 
+                                                       "class '%s' not allowed by content rule '%s'",
+                                                       oc->soc_cname.bv_val,
+                                                       ldap_contentrule2name( &cr->scr_crule ) );
+                                       }
                                } else if ( global_disallows & SLAP_DISALLOW_AUX_WO_CR ) {
                                        k = -1;
                                        snprintf( textbuf, textlen, 
@@ -570,6 +572,10 @@ int oc_check_allowed(
        for ( i = 0; socs[i]; i++ ) {
                /* if we know about the oc */
                ObjectClass     *oc = socs[i];
+               /* extensibleObject allows all */
+               if ( oc == slap_schema.si_oc_extensibleObject ) {
+                       return LDAP_SUCCESS;
+               }
                if ( oc != NULL && oc->soc_kind != LDAP_SCHEMA_ABSTRACT &&
                        ( sc == NULL || oc->soc_kind == LDAP_SCHEMA_AUXILIARY ))
                {