Commit aecf4033 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Hide some yet-to-be-implemented schema

parent 02fb60d3
......@@ -464,6 +464,9 @@ at_schema_info( Entry *e )
if ( ldap_attributetype2bv( &at->sat_atype, vals ) == NULL ) {
return -1;
}
if( at->sat_flags & SLAP_AT_HIDE ) continue;
#if 0
Debug( LDAP_DEBUG_TRACE, "Merging at [%ld] %s\n",
(long) vals[0].bv_len, vals[0].bv_val, 0 );
......
......@@ -61,7 +61,7 @@ int is_entry_objectclass(
}
if( set_flags && ( e->e_ocflags & SLAP_OC__END )) {
return (e->e_ocflags & oc->soc_flags);
return (e->e_ocflags & oc->soc_flags) ? 1 : 0;
}
/*
......@@ -480,6 +480,9 @@ oc_schema_info( Entry *e )
if ( ldap_objectclass2bv( &oc->soc_oclass, vals ) == NULL ) {
return -1;
}
if( oc->soc_flags & SLAP_OC_HIDE ) continue;
#if 0
Debug( LDAP_DEBUG_TRACE, "Merging oc [%ld] %s\n",
(long) vals[0].bv_len, vals[0].bv_val, 0 );
......
......@@ -201,7 +201,7 @@ static struct slap_schema_oc_map {
{ "collectiveAttributeSubentry", "( 2.5.20.2 "
"NAME 'collectiveAttributeSubentry' "
"AUXILIARY )",
subentryObjectClass, SLAP_OC_COLLECTIVEATTRIBUTESUBENTRY,
subentryObjectClass, SLAP_OC_COLLECTIVEATTRIBUTESUBENTRY|SLAP_OC_HIDE,
offsetof(struct slap_internal_schema, si_oc_collectiveAttributeSubentry) },
{ "dynamicObject", "( 1.3.6.1.4.1.1466.101.119.2 "
"NAME 'dynamicObject' "
......@@ -293,13 +293,13 @@ static struct slap_schema_ad_map {
"EQUALITY distinguishedNameMatch "
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 "
"NO-USER-MODIFICATION USAGE directoryOperation )",
NULL, 0, NULL, NULL, NULL,
NULL, SLAP_AT_HIDE, NULL, NULL, NULL,
offsetof(struct slap_internal_schema, si_ad_collectiveSubentries) },
{ "collectiveExclusions", "( 2.5.18.7 NAME 'collectiveExclusions' "
"EQUALITY objectIdentifierMatch "
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.38 "
"USAGE directoryOperation )",
NULL, 0, NULL, NULL, NULL,
NULL, SLAP_AT_HIDE, NULL, NULL, NULL,
offsetof(struct slap_internal_schema, si_ad_collectiveExclusions) },
{ "entryUUID", "( 1.3.6.1.4.1.4203.666.1.6 NAME 'entryUUID' "
......@@ -383,13 +383,13 @@ static struct slap_schema_ad_map {
"EQUALITY objectIdentifierMatch "
"USAGE directoryOperation "
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.38 )",
administrativeRoleAttribute, 0, NULL, NULL, NULL,
administrativeRoleAttribute, SLAP_AT_HIDE, NULL, NULL, NULL,
offsetof(struct slap_internal_schema, si_ad_administrativeRole) },
{ "subtreeSpecification", "( 2.5.18.6 NAME 'subtreeSpecification' "
"SINGLE-VALUE "
"USAGE directoryOperation "
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.45 )",
subentryAttribute, 0, NULL, NULL, NULL,
subentryAttribute, SLAP_AT_HIDE, NULL, NULL, NULL,
offsetof(struct slap_internal_schema, si_ad_subtreeSpecification) },
/* subschema subentry attributes */
......@@ -398,13 +398,13 @@ static struct slap_schema_ad_map {
"EQUALITY integerFirstComponentMatch "
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.17 "
"USAGE directoryOperation ) ",
subentryAttribute, 0, NULL, NULL, NULL,
subentryAttribute, SLAP_AT_HIDE, NULL, NULL, NULL,
offsetof(struct slap_internal_schema, si_ad_ditStructureRules) },
{ "ditContentRules", "( 2.5.21.2 NAME 'dITContentRules' "
"DESC 'RFC2252: DIT content rules' "
"EQUALITY objectIdentifierFirstComponentMatch "
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.16 USAGE directoryOperation )",
subentryAttribute, 0, NULL, NULL, NULL,
subentryAttribute, SLAP_AT_HIDE, NULL, NULL, NULL,
offsetof(struct slap_internal_schema, si_ad_ditContentRules) },
{ "matchingRules", "( 2.5.21.4 NAME 'matchingRules' "
"DESC 'RFC2252: matching rules' "
......@@ -428,13 +428,13 @@ static struct slap_schema_ad_map {
"DESC 'RFC2252: name forms ' "
"EQUALITY objectIdentifierFirstComponentMatch "
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.35 USAGE directoryOperation )",
subentryAttribute, 0, NULL, NULL, NULL,
subentryAttribute, SLAP_AT_HIDE, NULL, NULL, NULL,
offsetof(struct slap_internal_schema, si_ad_nameForms) },
{ "matchingRuleUse", "( 2.5.21.8 NAME 'matchingRuleUse' "
"DESC 'RFC2252: matching rule uses' "
"EQUALITY objectIdentifierFirstComponentMatch "
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.31 USAGE directoryOperation )",
subentryAttribute, 0, NULL, NULL, NULL,
subentryAttribute, SLAP_AT_HIDE, NULL, NULL, NULL,
offsetof(struct slap_internal_schema, si_ad_matchingRuleUse) },
{ "ldapSyntaxes", "( 1.3.6.1.4.1.1466.101.120.16 NAME 'ldapSyntaxes' "
......@@ -466,14 +466,14 @@ static struct slap_schema_ad_map {
"DESC 'OpenLDAP ACL entry pseudo-attribute' "
"SYNTAX 1.3.6.1.4.1.4203.1.1.1 "
"SINGLE-VALUE NO-USER-MODIFICATION USAGE dSAOperation )",
NULL, 0, NULL, NULL, NULL,
NULL, SLAP_AT_HIDE, NULL, NULL, NULL,
offsetof(struct slap_internal_schema, si_ad_entry) },
{ "children", "( 1.3.6.1.4.1.4203.1.3.2 "
"NAME 'children' "
"DESC 'OpenLDAP ACL children pseudo-attribute' "
"SYNTAX 1.3.6.1.4.1.4203.1.1.1 "
"SINGLE-VALUE NO-USER-MODIFICATION USAGE dSAOperation )",
NULL, 0, NULL, NULL, NULL,
NULL, SLAP_AT_HIDE, NULL, NULL, NULL,
offsetof(struct slap_internal_schema, si_ad_children) },
#ifdef SLAPD_ACI_ENABLED
{ "OpenLDAPaci", "( 1.3.6.1.4.1.4203.666.1.5 "
......
......@@ -431,6 +431,9 @@ typedef struct slap_attribute_type {
Syntax *sat_syntax;
AttributeTypeSchemaCheckFN *sat_check;
#define SLAP_AT_NONE 0x0000U
#define SLAP_AT_HIDE 0x0001U /* hide attribute */
slap_mask_t sat_flags;
struct slap_attribute_type *sat_next;
......@@ -496,6 +499,7 @@ typedef struct slap_object_class {
#define SLAP_OC_COLLECTIVEATTRIBUTESUBENTRY 0x10
#define SLAP_OC__MASK 0x1F
#define SLAP_OC__END 0x20
#define SLAP_OC_HIDE 0x80
#ifdef LDAP_EXTENDED_SCHEMA
/*
......
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