2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-30 22:05:46 +00:00

Print default runas in "sudo -l" if sudoers don't specify one.

This commit is contained in:
Todd C. Miller
2007-07-05 20:34:00 +00:00
parent 6a8fb71154
commit bdd5b43f75

View File

@@ -251,15 +251,17 @@ display_privs(v, pw)
for (cs = priv->cmndlist; cs != NULL; cs = cs->next) {
if (cs != priv->cmndlist)
print_priv(", ");
print_priv(" (");
if (cs->runaslist != NULL) {
print_priv(" (");
for (m = cs->runaslist; m != NULL; m = m->next) {
if (m != cs->runaslist)
print_priv(", ");
print_member(m->name, m->type, m->negated, RUNASALIAS);
}
print_priv(") ");
} else {
print_priv(def_runas_default);
}
print_priv(") ");
if (TAG_CHANGED(monitor)) {
print_priv(cs->tags.monitor ? "MONITOR: " : "NOMONITOR: ");
tags.monitor = cs->tags.monitor;