In -l mode, if the user is only allowed to run as a group, display
the user's name, not root's before the allowed group.
This commit is contained in:
8
parse.c
8
parse.c
@@ -328,8 +328,10 @@ sudo_file_display_priv_short(pw, us, lbuf)
|
||||
print_member(lbuf, m->name, m->type, m->negated,
|
||||
RUNASALIAS);
|
||||
}
|
||||
} else {
|
||||
} else if (tq_empty(&cs->runasgrouplist)) {
|
||||
lbuf_append(lbuf, def_runas_default, NULL);
|
||||
} else {
|
||||
lbuf_append(lbuf, pw->pw_name, NULL);
|
||||
}
|
||||
if (!tq_empty(&cs->runasgrouplist)) {
|
||||
lbuf_append(lbuf, " : ", NULL);
|
||||
@@ -377,8 +379,10 @@ sudo_file_display_priv_long(pw, us, lbuf)
|
||||
print_member(lbuf, m->name, m->type, m->negated,
|
||||
RUNASALIAS);
|
||||
}
|
||||
} else {
|
||||
} else if (tq_empty(&cs->runasgrouplist)) {
|
||||
lbuf_append(lbuf, def_runas_default, NULL);
|
||||
} else {
|
||||
lbuf_append(lbuf, pw->pw_name, NULL);
|
||||
}
|
||||
lbuf_print(lbuf);
|
||||
if (!tq_empty(&cs->runasgrouplist)) {
|
||||
|
Reference in New Issue
Block a user