From 0b15c19cdf81f3403e35458d8addb7f7a4377d76 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sat, 15 Jan 2000 03:48:37 +0000 Subject: [PATCH] Fix bug in group spec parsing, was failing to set attributeType if a nondefault objectclass was given --- servers/slapd/aclparse.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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; } -- 2.39.5