Add a flags option to sudo_parseln() and a flag to only mach comments

at the beginning of the line.  Use the flag when parsing ldap.conf.
This commit is contained in:
Todd C. Miller
2016-09-01 09:19:20 -06:00
parent 04340eea60
commit 17ad75d50b
8 changed files with 25 additions and 13 deletions

View File

@@ -1184,7 +1184,7 @@ read_env_file(const char *path, int overwrite)
debug_return_bool(rval);
}
while (sudo_parseln(&line, &linesize, NULL, fp) != -1) {
while (sudo_parseln(&line, &linesize, NULL, fp, 0) != -1) {
/* Skip blank or comment lines */
if (*(var = line) == '\0')
continue;