Parse "ALL" as a command correctly.
This commit is contained in:
@@ -324,8 +324,11 @@ sudo_ldap_role_to_priv(const char *cn, void *hosts, void *runasusers,
|
|||||||
cmndspec->timeout = UNSPEC;
|
cmndspec->timeout = UNSPEC;
|
||||||
|
|
||||||
/* Fill in member. */
|
/* Fill in member. */
|
||||||
m->type = COMMAND;
|
|
||||||
m->negated = negated;
|
m->negated = negated;
|
||||||
|
if (strcmp(cmnd, "ALL") == 0) {
|
||||||
|
m->type = ALL;
|
||||||
|
} else {
|
||||||
|
m->type = COMMAND;
|
||||||
m->name = (char *)c;
|
m->name = (char *)c;
|
||||||
|
|
||||||
/* Fill in command with optional digest. */
|
/* Fill in command with optional digest. */
|
||||||
@@ -347,6 +350,7 @@ sudo_ldap_role_to_priv(const char *cn, void *hosts, void *runasusers,
|
|||||||
free_member(m);
|
free_member(m);
|
||||||
goto oom;
|
goto oom;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
cmndspec->cmnd = m;
|
cmndspec->cmnd = m;
|
||||||
|
|
||||||
if (prev_cmndspec != NULL) {
|
if (prev_cmndspec != NULL) {
|
||||||
|
Reference in New Issue
Block a user