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:
Todd C. Miller
2022-03-09 12:38:25 -07:00
parent 31ab2e2297
commit 6ec279532e
8 changed files with 23 additions and 11 deletions

View File

@@ -27,6 +27,7 @@ struct defaults_list;
/* XXX - parse_tree, ret_if_found and ret_if_notfound should be private */
struct sudo_nss {
TAILQ_ENTRY(sudo_nss) entries;
const char *source;
int (*open)(struct sudo_nss *nss);
int (*close)(struct sudo_nss *nss);
struct sudoers_parse_tree *(*parse)(struct sudo_nss *nss);