]> git.sur5r.net Git - openldap/commitdiff
More OBSOLETE checks
authorKurt Zeilenga <kurt@openldap.org>
Thu, 10 Oct 2002 02:38:32 +0000 (02:38 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Thu, 10 Oct 2002 02:38:32 +0000 (02:38 +0000)
servers/slapd/schema_check.c

index 1fcc4ab6de2ea3e985e44374dd68a736525212e1..4aead7c4aa923abb965b516a1e44fbb851839c30 100644 (file)
@@ -310,6 +310,24 @@ entry_schema_check(
                                "unrecognized objectClass '%s'",
                                aoc->a_vals[i].bv_val );
 
+#ifdef NEW_LOGGING
+                       LDAP_LOG( OPERATION, INFO, 
+                               "entry_schema_check: dn (%s), %s\n", e->e_dn, textbuf, 0 );
+#else
+                       Debug( LDAP_DEBUG_ANY,
+                               "entry_check_schema(%s): %s\n",
+                               e->e_dn, textbuf, 0 );
+#endif
+
+                       return LDAP_OBJECT_CLASS_VIOLATION;
+               }
+
+               if ( oc->soc_obsolete ) {
+                       /* disallow obsolete classes */
+                       snprintf( textbuf, textlen, 
+                               "objectClass '%s' is OBSOLETE",
+                               aoc->a_vals[i].bv_val );
+
 #ifdef NEW_LOGGING
                        LDAP_LOG( OPERATION, INFO, 
                                "entry_schema_check: dn (%s), %s\n", e->e_dn, textbuf, 0 );