2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +00:00

Print the section when warning about an illegal key in the conf file.

This should make it easier to tell when a setting is present in the
wrong section.
This commit is contained in:
Todd C. Miller
2021-08-16 10:44:48 -06:00
parent 5902c0e21c
commit bfcc31b19b

View File

@@ -1177,7 +1177,8 @@ logsrvd_conf_parse(struct logsrvd_config *config, FILE *fp, const char *path)
}
}
if (entry->conf_str == NULL) {
sudo_warnx(U_("%s:%d unknown key: %s"), path, lineno, line);
sudo_warnx(U_("%s:%d [%s] illegal key: %s"), path, lineno,
conf_section->name, line);
goto done;
}
}