From a2b3e36e73eeccf8c40d20023d6e62d9c93a96cc Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Thu, 26 Aug 1999 09:06:41 +0000 Subject: [PATCH] add FLAG_NO_CHECK --- logging.c | 3 +++ parse.c | 3 ++- sudo.h | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/logging.c b/logging.c index bf8743c28..abb7ad5aa 100644 --- a/logging.c +++ b/logging.c @@ -298,6 +298,9 @@ log_auth(status, inform_user) else if (status & FLAG_NO_HOST) (void) fprintf(stderr, "%s is not allowed to run sudo on %s. %s", user_name, user_shost, "This incident will be reported.\n"); + else if (status & FLAG_NO_CHECK) + (void) fprintf(stderr, "Sorry, user %s may not run sudo on %s.\n", + user_name, user_shost); else (void) fprintf(stderr, "Sorry, user %s is not allowed to execute '%s%s%s' as %s on %s.\n", diff --git a/parse.c b/parse.c index eae5dcd14..95cc0bcc5 100644 --- a/parse.c +++ b/parse.c @@ -147,7 +147,8 @@ sudoers_lookup(check_cmnd) error |= FLAG_NO_HOST; if (!top) error |= FLAG_NO_USER; - } + } else + error |= FLAG_NO_CHECK; /* * Only check the actual command if the check_cmnd flag is set. diff --git a/sudo.h b/sudo.h index 0d5a6a0a0..062d45d4d 100644 --- a/sudo.h +++ b/sudo.h @@ -68,6 +68,7 @@ struct sudo_user { #define FLAG_NOPASS 0x10 #define FLAG_NO_USER 0x20 #define FLAG_NO_HOST 0x40 +#define FLAG_NO_CHECK 0x80 /* * Boolean values -- 2.40.0