Add a source to struct sudo_nss and use it if getdefs() fails.
Also remove useless "Problem with defaults entries" warning in testsudoers.
This commit is contained in:
@@ -292,18 +292,18 @@ main(int argc, char *argv[])
|
||||
}
|
||||
break;
|
||||
case format_sudoers:
|
||||
if (sudoersparse() != 0 || parse_error)
|
||||
if (sudoersparse() != 0)
|
||||
parse_error = true;
|
||||
break;
|
||||
default:
|
||||
sudo_fatalx("error: unhandled input %d", input_format);
|
||||
}
|
||||
if (!update_defaults(&parsed_policy, NULL, SETDEF_ALL, false))
|
||||
parse_error = true;
|
||||
|
||||
if (!parse_error)
|
||||
(void) puts("Parses OK");
|
||||
|
||||
if (!update_defaults(&parsed_policy, NULL, SETDEF_ALL, false))
|
||||
(void) puts("Problem with defaults entries");
|
||||
|
||||
if (dflag) {
|
||||
(void) putchar('\n');
|
||||
dump_sudoers(&lbuf);
|
||||
|
Reference in New Issue
Block a user