]> git.sur5r.net Git - openldap/commitdiff
Reverse arguments of is_object_subclass and reverse backwards calls
authorKurt Zeilenga <kurt@openldap.org>
Sat, 9 Feb 2002 23:55:37 +0000 (23:55 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sat, 9 Feb 2002 23:55:37 +0000 (23:55 +0000)
servers/slapd/aclparse.c
servers/slapd/oc.c
servers/slapd/proto-slap.h

index b79ed144fca146e35246f18a05919c41a376c74f..a58e13eff67ae9980497a47483bc5f42d9f6e6de 100644 (file)
@@ -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\" "
index e17ccac5b121763b6d1185b491d9fde9ecf69fb4..7163f1aa5f025eb2504e9e251c5563cd548230e6 100644 (file)
@@ -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;
                }
        }
index 2d28064dcb8a737f7928cc1655675011a6a54abd..e76bf6554e1fd65313775829a09d961e314937ca 100644 (file)
@@ -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 ));