mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-27 01:59:38 -05:00
Change structuralObjectClass to use objectClassMatch,
enabling objectclass subclass debugging
This commit is contained in:
parent
e661f2f289
commit
c1bf5ab485
2 changed files with 34 additions and 9 deletions
|
|
@ -24,7 +24,7 @@ int is_object_subclass(
|
|||
|
||||
if( sub == NULL || sup == NULL ) return 0;
|
||||
|
||||
#if 0
|
||||
#if 1
|
||||
Debug( LDAP_DEBUG_TRACE, "is_object_subclass(%s,%s) %d\n",
|
||||
sub->soc_oid, sup->soc_oid, sup == sub );
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -34,6 +34,17 @@ objectClassMatch(
|
|||
ObjectClass *oc = oc_bvfind( value );
|
||||
ObjectClass *asserted = oc_bvfind( a );
|
||||
|
||||
#if 1
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG(( "schema", LDAP_LEVEL_ENTRY,
|
||||
"> objectClassMatch(%s, %s)\n",
|
||||
value->bv_val, a->bv_val ));
|
||||
#else
|
||||
Debug( LDAP_DEBUG_TRACE, "> objectClassMatch(%s,%s)\n",
|
||||
value->bv_val, a->bv_val, 0 );
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if( asserted == NULL ) {
|
||||
if( OID_LEADCHAR( *a->bv_val ) ) {
|
||||
/* OID form, return FALSE */
|
||||
|
|
@ -56,13 +67,13 @@ objectClassMatch(
|
|||
*matchp = !is_object_subclass( asserted, oc );
|
||||
}
|
||||
|
||||
#if 0
|
||||
#if 1
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG(( "schema", LDAP_LEVEL_ENTRY,
|
||||
"objectClassMatch(%s, %s) = %d\n",
|
||||
"< objectClassMatch(%s, %s) = %d\n",
|
||||
value->bv_val, a->bv_val, *matchp ));
|
||||
#else
|
||||
Debug( LDAP_DEBUG_TRACE, "objectClassMatch(%s,%s) = %d\n",
|
||||
Debug( LDAP_DEBUG_TRACE, "< objectClassMatch(%s,%s) = %d\n",
|
||||
value->bv_val, a->bv_val, *matchp );
|
||||
#endif
|
||||
#endif
|
||||
|
|
@ -70,6 +81,9 @@ objectClassMatch(
|
|||
return LDAP_SUCCESS;
|
||||
}
|
||||
|
||||
#if 1
|
||||
#define structuralObjectClassMatch objectClassMatch
|
||||
#else
|
||||
static int
|
||||
structuralObjectClassMatch(
|
||||
int *matchp,
|
||||
|
|
@ -83,6 +97,17 @@ structuralObjectClassMatch(
|
|||
ObjectClass *oc = oc_bvfind( value );
|
||||
ObjectClass *asserted = oc_bvfind( a );
|
||||
|
||||
#if 1
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG(( "schema", LDAP_LEVEL_ENTRY,
|
||||
"> structuralObjectClassMatch(%s, %s)\n",
|
||||
value->bv_val, a->bv_val ));
|
||||
#else
|
||||
Debug( LDAP_DEBUG_TRACE, "> structuralObjectClassMatch(%s,%s)\n",
|
||||
value->bv_val, a->bv_val, 0 );
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if( asserted == NULL ) {
|
||||
if( OID_LEADCHAR( *a->bv_val ) ) {
|
||||
/* OID form, return FALSE */
|
||||
|
|
@ -101,19 +126,20 @@ structuralObjectClassMatch(
|
|||
|
||||
*matchp = ( asserted != oc );
|
||||
|
||||
#if 0
|
||||
#if 1
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG(( "schema", LDAP_LEVEL_ENTRY,
|
||||
"structuralObjectClassMatch( %s, %s ) = %d\n",
|
||||
"< structuralObjectClassMatch( %s, %s ) = %d\n",
|
||||
value->bv_val, a->bv_val, *matchp ));
|
||||
#else
|
||||
Debug( LDAP_DEBUG_TRACE, "structuralObjectClassMatch(%s,%s) = %d\n",
|
||||
Debug( LDAP_DEBUG_TRACE, "< structuralObjectClassMatch(%s,%s) = %d\n",
|
||||
value->bv_val, a->bv_val, *matchp );
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return LDAP_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
static ObjectClassSchemaCheckFN rootDseObjectClass;
|
||||
static ObjectClassSchemaCheckFN aliasObjectClass;
|
||||
|
|
@ -207,8 +233,7 @@ static struct slap_schema_ad_map {
|
|||
"DESC 'RFC2256: object classes of the entity' "
|
||||
"EQUALITY objectIdentifierMatch "
|
||||
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.38 )",
|
||||
NULL, 0,
|
||||
objectClassMatch, NULL, NULL,
|
||||
NULL, 0, objectClassMatch, NULL, NULL,
|
||||
offsetof(struct slap_internal_schema, si_ad_objectClass) },
|
||||
|
||||
/* user entry operational attributes */
|
||||
|
|
|
|||
Loading…
Reference in a new issue