add FLAG_NO_CHECK

This commit is contained in:
Todd C. Miller
1999-08-26 09:06:41 +00:00
parent ca1b945b36
commit a2b3e36e73
3 changed files with 6 additions and 1 deletions

View File

@@ -298,6 +298,9 @@ log_auth(status, inform_user)
else if (status & FLAG_NO_HOST) else if (status & FLAG_NO_HOST)
(void) fprintf(stderr, "%s is not allowed to run sudo on %s. %s", (void) fprintf(stderr, "%s is not allowed to run sudo on %s. %s",
user_name, user_shost, "This incident will be reported.\n"); 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 else
(void) fprintf(stderr, (void) fprintf(stderr,
"Sorry, user %s is not allowed to execute '%s%s%s' as %s on %s.\n", "Sorry, user %s is not allowed to execute '%s%s%s' as %s on %s.\n",

View File

@@ -147,7 +147,8 @@ sudoers_lookup(check_cmnd)
error |= FLAG_NO_HOST; error |= FLAG_NO_HOST;
if (!top) if (!top)
error |= FLAG_NO_USER; error |= FLAG_NO_USER;
} } else
error |= FLAG_NO_CHECK;
/* /*
* Only check the actual command if the check_cmnd flag is set. * Only check the actual command if the check_cmnd flag is set.

1
sudo.h
View File

@@ -68,6 +68,7 @@ struct sudo_user {
#define FLAG_NOPASS 0x10 #define FLAG_NOPASS 0x10
#define FLAG_NO_USER 0x20 #define FLAG_NO_USER 0x20
#define FLAG_NO_HOST 0x40 #define FLAG_NO_HOST 0x40
#define FLAG_NO_CHECK 0x80
/* /*
* Boolean values * Boolean values