mdev: do not treat non-leading '#' chars as start of comment. Closes 4676
[oweals/busybox.git] / util-linux / mdev.c
index c6be1b872772a6ca34ac93add75ca10a9646c0cd..e5f0c2deb47e81ac8e2d0e3ea7ed79a5a99a24a7 100644 (file)
@@ -206,7 +206,8 @@ static void parse_next_rule(void)
                char *tokens[4];
                char *val;
 
-               if (!config_read(G.parser, tokens, 4, 3, "# \t", PARSE_NORMAL))
+               /* No PARSE_EOL_COMMENTS, because command may contain '#' chars */
+               if (!config_read(G.parser, tokens, 4, 3, "# \t", PARSE_NORMAL & ~PARSE_EOL_COMMENTS))
                        break;
 
                /* Fields: [-]regex uid:gid mode [alias] [cmd] */