]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/schema_check.c
reject registrations when back-monitor is not configured
[openldap] / servers / slapd / schema_check.c
index 02a3f012cdbaeab5b359d89efc4536a7226a96b4..7a8ace4e48e7445a1e5618614291850db60196bc 100644 (file)
@@ -43,7 +43,7 @@ static int entry_naming_check(
 
 int
 entry_schema_check( 
-       Backend *be,
+       Operation *op,
        Entry *e,
        Attribute *oldattrs,
        int manage,
@@ -64,7 +64,11 @@ entry_schema_check(
        int subentry = is_entry_subentry( e );
        int collectiveSubentry = 0;
 
-       if ( SLAP_NO_SCHEMA_CHECK( be )) {
+       if ( SLAP_NO_SCHEMA_CHECK( op->o_bd )) {
+               return LDAP_SUCCESS;
+       }
+
+       if ( get_no_schema_check( op ) ) {
                return LDAP_SUCCESS;
        }
 
@@ -84,7 +88,7 @@ entry_schema_check(
 
                if( a->a_desc->ad_type->sat_check ) {
                        int rc = (a->a_desc->ad_type->sat_check)(
-                               be, e, a, text, textbuf, textlen );
+                               op->o_bd, e, a, text, textbuf, textlen );
                        if( rc != LDAP_SUCCESS ) {
                                return rc;
                        }
@@ -308,7 +312,7 @@ entry_schema_check(
                }
 
                if ( oc->soc_check ) {
-                       int rc = (oc->soc_check)( be, e, oc,
+                       int rc = (oc->soc_check)( op->o_bd, e, oc,
                                text, textbuf, textlen );
                        if( rc != LDAP_SUCCESS ) {
                                return rc;