cmndspec->notbefore = prev_cmndspec->notbefore;
cmndspec->notafter = prev_cmndspec->notafter;
cmndspec->tags = prev_cmndspec->tags;
+ if (cmndspec->tags.setenv == IMPLIED)
+ cmndspec->tags.setenv = UNSPEC;
} else {
/* Parse sudoRunAsUser / sudoRunAs */
if (runasusers != NULL) {
/* So we can inherit previous values. */
prev_cmndspec = cmndspec;
}
+ /* Sudo "ALL" implies the SETENV tag. */
+ if (c == NULL && cmndspec->tags.setenv == UNSPEC)
+ cmndspec->tags.setenv = IMPLIED;
}
/* Negated commands take precedence so we insert them at the end. */
TAILQ_CONCAT(&priv->cmndlist, &negated_cmnds, entries);