2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 22:35:10 +00:00

Check def_authenticate, def_noexec and def_monitor when setting return flags.

XXX May be better to just set the defaults directly and get rid of those flags.
This commit is contained in:
Todd C. Miller
2004-11-19 19:46:55 +00:00
parent 2c2daa8eca
commit 2c3cff1704

View File

@@ -173,11 +173,14 @@ sudoers_lookup(pwflag)
CLR(validated, VALIDATE_NOT_OK);
SET(validated, VALIDATE_OK);
if (tags != NULL) {
if (tags->nopasswd == TRUE)
if (tags->nopasswd == TRUE ||
(tags->nopasswd == UNSPEC && !def_authenticate))
SET(validated, FLAG_NOPASS);
if (tags->noexec == TRUE)
if (tags->noexec == TRUE ||
(tags->noexec == UNSPEC && def_noexec))
SET(validated, FLAG_NOEXEC);
if (tags->monitor == TRUE)
if (tags->monitor == TRUE ||
(tags->monitor == UNSPEC && def_monitor))
SET(validated, FLAG_MONITOR);
}
}