2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +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

@@ -2226,6 +2226,9 @@ sudo_ldap_display_entry_short(LDAP *ld, LDAPMessage *entry, struct sudo_lbuf *lb
else if (strcmp(cp, "setenv") == 0)
sudo_lbuf_append(lbuf, (*p)->bv_val[0] == '!' ?
"NOSETENV: " : "SETENV: ");
else if (strcmp(cp, "mail_all_cmnds") == 0 || strcmp(cp, "mail_always") == 0)
sudo_lbuf_append(lbuf, (*p)->bv_val[0] == '!' ?
"NOMAIL: " : "MAIL: ");
}
ldap_value_free_len(bv);
}