Only check the admin flag file once in intercept mode.

This commit is contained in:
Todd C. Miller
2022-09-02 14:45:57 -06:00
parent 159bdb1cb7
commit 49e9e5eb85

View File

@@ -186,6 +186,10 @@ sudoers_reinit_defaults(void)
/* Restore error logging. */
sudoers_error_hook = logger;
/* No need to check the admin flag file multiple times. */
if (ISSET(sudo_mode, MODE_POLICY_INTERCEPTED))
def_admin_flag = false;
debug_return_bool(true);
}