From: Kurt Zeilenga Date: Sat, 9 Feb 2002 23:55:37 +0000 (+0000) Subject: Reverse arguments of is_object_subclass and reverse backwards calls X-Git-Tag: OPENLDAP_REL_ENG_2_1_BP~73 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2b71d70f2f43259b062a2fcfe33acd5a23a333a9;p=openldap Reverse arguments of is_object_subclass and reverse backwards calls --- diff --git a/servers/slapd/aclparse.c b/servers/slapd/aclparse.c index b79ed144fc..a58e13eff6 100644 --- a/servers/slapd/aclparse.c +++ b/servers/slapd/aclparse.c @@ -509,8 +509,8 @@ parse_acl( } } - if( is_object_subclass( b->a_group_oc, - slap_schema.si_oc_referral ) ) + if( is_object_subclass( slap_schema.si_oc_referral, + b->a_group_oc )) { fprintf( stderr, "%s: line %d: group objectclass \"%s\" " @@ -519,8 +519,8 @@ parse_acl( acl_usage(); } - if( is_object_subclass( b->a_group_oc, - slap_schema.si_oc_alias ) ) + if( is_object_subclass( slap_schema.si_oc_alias, + b->a_group_oc )) { fprintf( stderr, "%s: line %d: group objectclass \"%s\" " diff --git a/servers/slapd/oc.c b/servers/slapd/oc.c index e17ccac5b1..7163f1aa5f 100644 --- a/servers/slapd/oc.c +++ b/servers/slapd/oc.c @@ -17,8 +17,8 @@ #include "ldap_pvt.h" int is_object_subclass( - ObjectClass *sub, - ObjectClass *sup ) + ObjectClass *sup, + ObjectClass *sub ) { int i; @@ -26,19 +26,19 @@ int is_object_subclass( #if 1 Debug( LDAP_DEBUG_TRACE, "is_object_subclass(%s,%s) %d\n", - sub->soc_oid, sup->soc_oid, sup == sub ); + sup->soc_oid, sub->soc_oid, sup == sub ); #endif if( sup == sub ) { return 1; } - if( sup->soc_sups == NULL ) { + if( sub->soc_sups == NULL ) { return 0; } - for( i=0; sup->soc_sups[i] != NULL; i++ ) { - if( is_object_subclass( sub, sup->soc_sups[i] ) ) { + for( i=0; sub->soc_sups[i] != NULL; i++ ) { + if( is_object_subclass( sup, sub->soc_sups[i] ) ) { return 1; } } diff --git a/servers/slapd/proto-slap.h b/servers/slapd/proto-slap.h index 2d28064dcb..e76bf6554e 100644 --- a/servers/slapd/proto-slap.h +++ b/servers/slapd/proto-slap.h @@ -619,8 +619,8 @@ LDAP_SLAPD_F (ObjectClass *) oc_find LDAP_P(( LDAP_SLAPD_F (ObjectClass *) oc_bvfind LDAP_P(( struct berval *ocname)); LDAP_SLAPD_F (int) is_object_subclass LDAP_P(( - ObjectClass *sub, - ObjectClass *sup )); + ObjectClass *sup, + ObjectClass *sub )); LDAP_SLAPD_F (int) is_entry_objectclass LDAP_P(( Entry *, ObjectClass *oc, int set_flags ));