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

@@ -2024,7 +2024,7 @@ sudo_ldap_read_config(void)
if ((fp = fopen(path_ldap_conf, "r")) == NULL)
debug_return_bool(false);
while (sudo_parseln(&line, &linesize, NULL, fp) != -1) {
while (sudo_parseln(&line, &linesize, NULL, fp, PARSELN_COMM_BOL) != -1) {
if (*line == '\0')
continue; /* skip empty line */