]> granicus.if.org Git - sudo/commitdiff
Fix the -b option when converting from LDIF.
authorTodd C. Miller <Todd.Miller@sudo.ws>
Thu, 19 Apr 2018 15:23:45 +0000 (09:23 -0600)
committerTodd C. Miller <Todd.Miller@sudo.ws>
Thu, 19 Apr 2018 15:23:45 +0000 (09:23 -0600)
plugins/sudoers/cvtsudoers_ldif.c

index 341c674ae051555026ab40cf50881484f6e7d256..de26e0a52d039153fd79db88ec060b4a1b38be52 100644 (file)
@@ -1090,8 +1090,7 @@ parse_ldif(const char *input_file, struct cvtsudoers_config *conf)
                    cp++;
                /* Skip over cn if present. */
                if (strncasecmp(cp, "cn=", 3) == 0) {
-                   cp += 3;
-                   while (*cp != '\0') {
+                   for (cp += 3; *cp != '\0'; cp++) {
                        /* Handle escaped ',' chars. */
                        if (*cp == '\\')
                            cp++;