From: Howard Chu Date: Sat, 15 Jan 2000 03:48:37 +0000 (+0000) Subject: Fix bug in group spec parsing, was failing to set attributeType if a X-Git-Tag: UCDATA_2_4~29 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0b15c19cdf81f3403e35458d8addb7f7a4377d76;p=openldap Fix bug in group spec parsing, was failing to set attributeType if a nondefault objectclass was given --- diff --git a/servers/slapd/aclparse.c b/servers/slapd/aclparse.c index 73bb669c00..b7da8b8623 100644 --- a/servers/slapd/aclparse.c +++ b/servers/slapd/aclparse.c @@ -338,7 +338,7 @@ parse_acl( /* format of string is "group/objectClassValue/groupAttrName" */ if ((value = strchr(left, '/')) != NULL) { *value++ = '\0'; - if (value && *value + if (*value && (name = strchr(value, '/')) != NULL) { *name++ = '\0'; @@ -353,14 +353,14 @@ parse_acl( *--value = '/'; } else { b->a_group_oc = ch_strdup("groupOfNames"); + } - if (name && *name) { - b->a_group_at = ch_strdup(name); - *--name = '/'; + if (name && *name) { + b->a_group_at = ch_strdup(name); + *--name = '/'; - } else { - b->a_group_at = ch_strdup("member"); - } + } else { + b->a_group_at = ch_strdup("member"); } continue; }