mirror of
https://github.com/sudo-project/sudo.git
synced 2025-09-03 15:55:40 +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:
9
parse.c
9
parse.c
@@ -173,11 +173,14 @@ sudoers_lookup(pwflag)
|
|||||||
CLR(validated, VALIDATE_NOT_OK);
|
CLR(validated, VALIDATE_NOT_OK);
|
||||||
SET(validated, VALIDATE_OK);
|
SET(validated, VALIDATE_OK);
|
||||||
if (tags != NULL) {
|
if (tags != NULL) {
|
||||||
if (tags->nopasswd == TRUE)
|
if (tags->nopasswd == TRUE ||
|
||||||
|
(tags->nopasswd == UNSPEC && !def_authenticate))
|
||||||
SET(validated, FLAG_NOPASS);
|
SET(validated, FLAG_NOPASS);
|
||||||
if (tags->noexec == TRUE)
|
if (tags->noexec == TRUE ||
|
||||||
|
(tags->noexec == UNSPEC && def_noexec))
|
||||||
SET(validated, FLAG_NOEXEC);
|
SET(validated, FLAG_NOEXEC);
|
||||||
if (tags->monitor == TRUE)
|
if (tags->monitor == TRUE ||
|
||||||
|
(tags->monitor == UNSPEC && def_monitor))
|
||||||
SET(validated, FLAG_MONITOR);
|
SET(validated, FLAG_MONITOR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user