2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 14:25:15 +00:00

Instead of parsing sudoers Defaults twice, parse once while reading

sudoers and then just set the parsed value in update_defaults().
This commit is contained in:
Todd C. Miller
2016-11-06 18:59:49 -07:00
parent 1f24108969
commit df8404dbd4
8 changed files with 136 additions and 150 deletions

View File

@@ -1239,7 +1239,7 @@ sudo_sss_parse_options(struct sudo_sss_handle *handle, struct sss_sudo_rule *rul
goto done;
}
op = sudo_sss_parse_option(copy, &var, &val);
early = is_early_default(var);
early = is_early_default_byname(var);
if (early != NULL) {
set_early_default(var, val, op,
source ? source : "sudoRole UNKNOWN", 0, false, early);
@@ -1255,7 +1255,7 @@ sudo_sss_parse_options(struct sudo_sss_handle *handle, struct sss_sudo_rule *rul
goto done;
}
op = sudo_sss_parse_option(copy, &var, &val);
if (is_early_default(var) == NULL) {
if (is_early_default_byname(var) == NULL) {
set_default(var, val, op,
source ? source : "sudoRole UNKNOWN", 0, false);
}