2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 14:25:15 +00:00

Add support for MAIL and NOMAIL command tags to toggle mail sending

behavior on a per-command (or Cmnd_Alias) basis.
This commit is contained in:
Todd C. Miller
2015-02-19 10:02:20 -07:00
parent 53ac30b63a
commit 45548cf049
16 changed files with 2210 additions and 1994 deletions

View File

@@ -1382,13 +1382,16 @@ sudo_sss_display_entry_short(struct sudo_sss_handle *handle,
cp++;
if (strcmp(cp, "authenticate") == 0)
sudo_lbuf_append(lbuf, val_array[i][0] == '!' ?
"NOPASSWD: " : "PASSWD: ");
"NOPASSWD: " : "PASSWD: ");
else if (strcmp(cp, "noexec") == 0)
sudo_lbuf_append(lbuf, val_array[i][0] == '!' ?
"EXEC: " : "NOEXEC: ");
"EXEC: " : "NOEXEC: ");
else if (strcmp(cp, "setenv") == 0)
sudo_lbuf_append(lbuf, val_array[i][0] == '!' ?
"NOSETENV: " : "SETENV: ");
"NOSETENV: " : "SETENV: ");
else if (strcmp(cp, "mail_all_cmnds") == 0 || strcmp(cp, "mail_always") == 0)
sudo_lbuf_append(lbuf, val_array[i][0] == '!' ?
"NOMAIL: " : "MAIL: ");
}
handle->fn_free_values(val_array);
break;