Commit 64619bed authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Install system schema checks

parent 9a3dcc37
......@@ -46,9 +46,9 @@ entry_schema_check(
= slap_schema.si_ad_objectClass;
int extensible = 0;
int subentry = is_entry_subentry( e );
int collective = 0;
int collectiveSubentry = 0;
if( subentry) collective = is_entry_collectiveAttributes( e );
if( subentry) collectiveSubentry = is_entry_collectiveAttributes( e );
*text = textbuf;
......@@ -68,7 +68,7 @@ entry_schema_check(
}
}
if( !collective && is_at_collective( a->a_desc->ad_type ) ) {
if( !collectiveSubentry && is_at_collective( a->a_desc->ad_type ) ) {
snprintf( textbuf, textlen,
"'%s' can only appear in collectiveAttributes subentry",
type );
......
This diff is collapsed.
......@@ -427,10 +427,12 @@ typedef struct slap_attribute_type {
MatchingRule *sat_approx;
MatchingRule *sat_ordering;
MatchingRule *sat_substr;
Syntax *sat_syntax;
Syntax *sat_syntax;
AttributeTypeSchemaCheckFN *sat_check;
slap_mask_t sat_flags;
struct slap_attr_desc *sat_ad;
struct slap_attribute_type *sat_next;
ldap_pvt_thread_mutex_t sat_ad_mutex;
#define sat_oid sat_atype.at_oid
#define sat_names sat_atype.at_names
......@@ -446,6 +448,8 @@ typedef struct slap_attribute_type {
#define sat_no_user_mod sat_atype.at_no_user_mod
#define sat_usage sat_atype.at_usage
#define sat_extensions sat_atype.at_extensions
struct slap_attribute_type *sat_next;
} AttributeType;
#define is_at_operational(at) ((at)->sat_usage)
......@@ -466,19 +470,21 @@ typedef int (ObjectClassSchemaCheckFN)(
typedef struct slap_object_class {
LDAPObjectClass soc_oclass;
struct slap_object_class **soc_sups;
AttributeType **soc_required;
AttributeType **soc_allowed;
AttributeType **soc_required;
AttributeType **soc_allowed;
ObjectClassSchemaCheckFN *sco_check;
struct slap_object_class *soc_next;
#define soc_oid soc_oclass.oc_oid
#define soc_names soc_oclass.oc_names
#define soc_desc soc_oclass.oc_desc
slap_mask_t sco_flags;
#define soc_oid soc_oclass.oc_oid
#define soc_names soc_oclass.oc_names
#define soc_desc soc_oclass.oc_desc
#define soc_obsolete soc_oclass.oc_obsolete
#define soc_sup_oids soc_oclass.oc_sup_oids
#define soc_kind soc_oclass.oc_kind
#define soc_kind soc_oclass.oc_kind
#define soc_at_oids_must soc_oclass.oc_at_oids_must
#define soc_at_oids_may soc_oclass.oc_at_oids_may
#define soc_extensions soc_oclass.oc_extensions
struct slap_object_class *soc_next;
} ObjectClass;
#ifdef LDAP_DIT_CONTENT_RULES
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment