[389-commits] ldap/servers

Richard Allen Megginson rmeggins at fedoraproject.org
Mon Dec 16 15:59:23 UTC 2013


 ldap/servers/slapd/schema.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 97cf45d236a8a333af2895b2bf04cc5940a14e37
Author: Rich Megginson <rmeggins at redhat.com>
Date:   Mon Dec 16 08:38:43 2013 -0700

    Ticket #47631 objectclass may, must lists skip rest of objectclass once first is found in sup
    
    https://fedorahosted.org/389/ticket/47631
    Reviewed by: nkinder (Thanks!)
    Branch: master
    Fix Description: Once a match is found, reset the found flag to 0 so that we
    will keep looking for the next match.
    Platforms tested: RHEL6 x86_64
    Flag Day: no
    Doc impact: no

diff --git a/ldap/servers/slapd/schema.c b/ldap/servers/slapd/schema.c
index ef85be3..414e7f0 100644
--- a/ldap/servers/slapd/schema.c
+++ b/ldap/servers/slapd/schema.c
@@ -4333,7 +4333,8 @@ parse_objclass_str ( const char *input, struct objclass **oc, char *errorbuf,
         OrigAllowedAttrsArray = (char **) slapi_ch_malloc (1 * sizeof(char *)) ;
         OrigAllowedAttrsArray[0] = NULL;
         if (psup_oc->oc_required && objClass->oc_at_oids_must) {
-            for (i = 0, found_it = 0; objClass->oc_at_oids_must[i]; i++) {
+            for (i = 0; objClass->oc_at_oids_must[i]; i++) {
+                found_it = 0;
                 for (j = 0; psup_oc->oc_required[j]; j++) {
                     if (strcasecmp (psup_oc->oc_required[j], objClass->oc_at_oids_must[i]) == 0) {
                         found_it = 1;
@@ -4350,7 +4351,8 @@ parse_objclass_str ( const char *input, struct objclass **oc, char *errorbuf,
             OrigRequiredAttrsArray = charray_dup(objClass->oc_at_oids_must);
         }
         if (psup_oc->oc_allowed && objClass->oc_at_oids_may) {
-            for (i = 0, found_it = 0; objClass->oc_at_oids_may[i]; i++) {
+            for (i = 0; objClass->oc_at_oids_may[i]; i++) {
+                found_it = 0;
                 for (j = 0; psup_oc->oc_allowed[j]; j++) {
                     if (strcasecmp (psup_oc->oc_allowed[j], objClass->oc_at_oids_may[i]) == 0) {
                         found_it = 1;




More information about the 389-commits mailing list