Always allocate a struct sudo_command for the command, even for ALL.

Previously we special-cased handling of ALL but this complicates
some upcoming changes.
This commit is contained in:
Todd C. Miller
2021-08-18 09:12:19 -06:00
parent dad40a50a1
commit 53a95e3a50
3 changed files with 241 additions and 250 deletions

View File

@@ -396,11 +396,6 @@ cmnd_matches(struct sudoers_parse_tree *parse_tree, const struct member *m,
switch (m->type) {
case ALL:
if (m->name == NULL) {
matched = !m->negated;
break;
}
FALLTHROUGH;
case COMMAND:
c = (struct sudo_command *)m->name;
if (command_matches(c->cmnd, c->args, runchroot, info, &c->digests))