mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 14:25:15 +00:00
Don't try to send mail if mailto not set or the mailer is not present.
This commit is contained in:
@@ -773,6 +773,9 @@ should_mail(int status)
|
||||
{
|
||||
debug_decl(should_mail, SUDOERS_DEBUG_LOGGING);
|
||||
|
||||
if (!def_mailto || !def_mailerpath || access(def_mailerpath, X_OK) == -1)
|
||||
debug_return_bool(false);
|
||||
|
||||
debug_return_bool(def_mail_always || ISSET(status, VALIDATE_ERROR) ||
|
||||
(def_mail_all_cmnds && ISSET(sudo_mode, (MODE_RUN|MODE_EDIT))) ||
|
||||
(def_mail_no_user && ISSET(status, FLAG_NO_USER)) ||
|
||||
|
Reference in New Issue
Block a user