]> git.sur5r.net Git - openldap/commitdiff
Add extensibleObject support
authorKurt Zeilenga <kurt@openldap.org>
Wed, 31 May 2000 18:46:13 +0000 (18:46 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 31 May 2000 18:46:13 +0000 (18:46 +0000)
servers/slapd/schema_check.c
servers/slapd/schema_prep.c
servers/slapd/slap.h

index 4f76da0e36bb1d5d7839914b2dbc854559110ad2..d1c00935c31ff32fea0427985b83de765acf6dd4 100644 (file)
@@ -41,6 +41,7 @@ entry_schema_check(
 #else
        static const char *ad_objectClass = "objectclass";
 #endif
+       int extensible = 0;
 
        if( !global_schemacheck ) return LDAP_SUCCESS;
 
@@ -74,6 +75,16 @@ entry_schema_check(
                                ret = LDAP_OBJECT_CLASS_VIOLATION;
                                break;
                        }
+
+#ifdef SLAPD_SCHEMA_NOT_COMPAT
+                       if( oc == slap_schema.si_oc_extensibleObject )
+#else
+                       if( !strcmp( aoc->a_vals[i], "extensibleObject" ) == 0 )
+#endif
+                       {
+                               extensible=1;
+                       }
+
                }
        }
 
@@ -81,6 +92,10 @@ entry_schema_check(
            return ret;
        }
 
+       if( extensible ) {
+               return LDAP_SUCCESS;
+       }
+
        /* check that each attr in the entry is allowed by some oc */
        for ( a = e->e_attrs; a != NULL; a = a->a_next ) {
 #ifdef SLAPD_SCHEMA_NOT_COMPAT
index d2bac90a64a1653d17db0ae5fa9426c901e15c6f..57409c8b38db6bd3711721f725bef9b5f4882124 100644 (file)
@@ -42,6 +42,7 @@ struct slap_schema_oc_map {
        size_t ssom_offset;
 } oc_map[] = {
        { "top", offsetof(struct slap_internal_schema, si_oc_top) },
+       { "extensibleObject", offsetof(struct slap_internal_schema, si_oc_extensibleObject) },
        { "alias", offsetof(struct slap_internal_schema, si_oc_alias) },
        { "referral", offsetof(struct slap_internal_schema, si_oc_referral) },
        { "LDAProotDSE", offsetof(struct slap_internal_schema, si_oc_rootdse) },
index 16635cca0710d164d3a563816861d647fece3c29..caa65db0f81031f2e6233fc9f3a0c2a7287e8cb6 100644 (file)
@@ -334,6 +334,7 @@ typedef struct slap_attr_desc {
 struct slap_internal_schema {
        /* objectClass */
        ObjectClass *si_oc_top;
+       ObjectClass *si_oc_extensibleObject;
        ObjectClass *si_oc_alias;
        ObjectClass *si_oc_referral;
        ObjectClass *si_oc_subentry;