]> git.sur5r.net Git - openldap/commitdiff
Fix bug in group spec parsing, was failing to set attributeType if a
authorHoward Chu <hyc@openldap.org>
Sat, 15 Jan 2000 03:48:37 +0000 (03:48 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 15 Jan 2000 03:48:37 +0000 (03:48 +0000)
nondefault objectclass was given

servers/slapd/aclparse.c

index 73bb669c006f0cc8dfbf92e65e524f2e5ca31b21..b7da8b8623ccfba808b21b24ccabf3ce61de2338 100644 (file)
@@ -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;
                                }