add FLAG_NO_CHECK
This commit is contained in:
@@ -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",
|
||||||
|
3
parse.c
3
parse.c
@@ -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.
|
||||||
|
Reference in New Issue
Block a user