mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-22 01:49:11 +00:00
Remove superfluous "parse error in sudoers near line N" message.
The sudoers parser now produces better syntax error messages so we don't need visudo to print its own.
This commit is contained in:
parent
03eb3d6db9
commit
1b300f78de
@ -942,15 +942,7 @@ check_syntax(const char *sudoers_file, bool quiet, bool strict, bool oldperms)
|
||||
sudoers_setlocale(oldlocale, NULL);
|
||||
ok = !parse_error;
|
||||
|
||||
if (parse_error) {
|
||||
if (!quiet) {
|
||||
if (errorlineno != -1)
|
||||
(void) printf(_("parse error in %s near line %d\n"),
|
||||
errorfile, errorlineno);
|
||||
else if (errorfile != NULL)
|
||||
(void) printf(_("parse error in %s\n"), errorfile);
|
||||
}
|
||||
} else {
|
||||
if (!parse_error) {
|
||||
struct sudoersfile *sp;
|
||||
|
||||
/* Parsed OK, check mode and owner. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user