]> git.sur5r.net Git - openldap/commitdiff
Mostly remove global_schemacheck. More cleanup needed in
authorKurt Zeilenga <kurt@openldap.org>
Wed, 11 May 2005 22:24:18 +0000 (22:24 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 11 May 2005 22:24:18 +0000 (22:24 +0000)
bconfig.c and back-sql.

servers/slapd/bconfig.c
servers/slapd/modify.c
servers/slapd/proto-slap.h
servers/slapd/schema_check.c
servers/slapd/schemaparse.c
servers/slapd/slapadd.c

index a157ee49e8953670586544236ed189517813c727..b738a9871e8b7304f48255250786076138bf35bd 100644 (file)
@@ -1089,10 +1089,12 @@ config_generic(ConfigArgs *c) {
                        break;
 
                case CFG_CHECK:
+#if 0
                        global_schemacheck = c->value_int;
                        if(!global_schemacheck) Debug(LDAP_DEBUG_ANY, "%s: "
                                "schema checking disabled! your mileage may vary!\n",
                                c->log, 0, 0);
+#endif
                        break;
 
                case CFG_ACL:
index f9c64d4c9f9a8a8163f416a4231f33cb5a67a174..f80cebdf66a833066b535c764fdac3ac89343c70 100644 (file)
@@ -842,7 +842,7 @@ int slap_mods_opattrs(
        if( op->o_tag == LDAP_REQ_ADD ) {
                struct berval tmpval;
 
-               if( global_schemacheck ) {
+               {
                        int rc = mods_structural_class( mods, &tmpval,
                                text, textbuf, textlen );
                        if( rc != LDAP_SUCCESS ) return rc;
index e2175c2279a54c518500709a063f3eb9423d0005..2b63204f901a3d2dd3f2d28b4b3b740efd9b7367 100644 (file)
@@ -1495,7 +1495,9 @@ LDAP_SLAPD_V (const char)         Versionstr[];
 
 LDAP_SLAPD_V (int)             global_gentlehup;
 LDAP_SLAPD_V (int)             global_idletimeout;
-LDAP_SLAPD_V (int)             global_schemacheck;
+
+#define global_schemacheck     (1)
+
 LDAP_SLAPD_V (char *)  global_host;
 LDAP_SLAPD_V (char *)  global_realm;
 LDAP_SLAPD_V (char **) default_passwd_hash;
index 253849d3780776e9d551622a0ff6ef5d8abaf7ae..cdf21460cae777dbd8e7203d8f1b37cbe3e2007b 100644 (file)
@@ -111,9 +111,6 @@ entry_schema_check(
                }
        }
 
-       /* it's a REALLY bad idea to disable schema checks */
-       if( !global_schemacheck ) return LDAP_SUCCESS;
-
        /* find the structural object class attribute */
        asc = attr_find( e->e_attrs, ad_structuralObjectClass );
        if ( asc == NULL ) {
index d0b0d5b77a26c2721048efe64ddafe25bf20ae79..0834dc0ae8c08a6795bce87c7e65c7fec5f71910 100644 (file)
@@ -25,8 +25,6 @@
 #include "slap.h"
 #include "ldap_schema.h"
 
-int    global_schemacheck = 1; /* schemacheck ON is default */
-
 static void            oc_usage(void); 
 static void            at_usage(void);
 
index 7aa4ee29310d9b4f277535fc4905b2a23e08cb52..1ee67a86b42e2f162bd776058b4485cf20e8e007 100644 (file)
@@ -145,7 +145,7 @@ slapadd( int argc, char **argv )
                        break;
                }
 
-               if( global_schemacheck ) {
+               {
                        Attribute *sc = attr_find( e->e_attrs,
                                slap_schema.si_ad_structuralObjectClass );
                        Attribute *oc = attr_find( e->e_attrs,
@@ -176,7 +176,8 @@ slapadd( int argc, char **argv )
                                        break;
                                }
 
-                               attr_merge_one( e, slap_schema.si_ad_structuralObjectClass, &val, NULL );
+                               attr_merge_one( e, slap_schema.si_ad_structuralObjectClass,
+                                       &val, NULL );
                        }
 
                        /* check schema */