Replace sudoers_warnings with sudoers_verbose.

This is now an int, with values > 1 reserved for visudo.
This commit is contained in:
Todd C. Miller
2023-03-20 18:27:27 -06:00
parent 738387aa4d
commit 8049e4e32f
11 changed files with 41 additions and 28 deletions

View File

@@ -5760,7 +5760,7 @@ push_include_int(const char *opath, bool isdir)
struct include_stack *new_istack;
if (idepth > MAX_SUDOERS_DEPTH) {
if (sudoers_warnings)
if (sudoers_verbose)
sudo_warnx(U_("%s: %s"), path, U_("too many levels of includes"));
sudoerserror(NULL);
sudo_rcstr_delref(path);
@@ -5783,7 +5783,7 @@ push_include_int(const char *opath, bool isdir)
status = sudo_secure_dir(path, sudoers_uid, sudoers_gid, &sb);
if (status != SUDO_PATH_SECURE) {
if (sudoers_warnings) {
if (sudoers_verbose) {
switch (status) {
case SUDO_PATH_BAD_TYPE:
errno = ENOTDIR;