Reset sudoers path, owner and mode before parsing plugin arguments.

This is only needed when calling sudoers_policy_deserialize_info()
more than once, which is true for the policy fuzzer.
This commit is contained in:
Todd C. Miller
2021-02-12 21:15:36 -07:00
parent 197d6600fa
commit e89a8133ac

View File

@@ -117,6 +117,10 @@ sudoers_policy_deserialize_info(void *v)
}
/* Parse sudo.conf plugin args. */
sudoers_file = _PATH_SUDOERS;
sudoers_mode = SUDOERS_MODE;
sudoers_uid = SUDOERS_UID;
sudoers_gid = SUDOERS_GID;
if (info->plugin_args != NULL) {
for (cur = info->plugin_args; *cur != NULL; cur++) {
if (MATCHES(*cur, "error_recovery=")) {