ldap/servers/slapd/schema.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
New commits: commit 4ea2fde8f9face3d090ea5335571da1c0400c5f1 Author: Rich Megginson rmeggins@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: 389-ds-base-1.3.2 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 (cherry picked from commit 97cf45d236a8a333af2895b2bf04cc5940a14e37)
diff --git a/ldap/servers/slapd/schema.c b/ldap/servers/slapd/schema.c index 6fdb99f..6245680 100644 --- a/ldap/servers/slapd/schema.c +++ b/ldap/servers/slapd/schema.c @@ -4309,7 +4309,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; @@ -4326,7 +4327,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;
389-commits@lists.fedoraproject.org