Allow sudo.conf Path settings to disable path names (by setting the

value of NULL).
This commit is contained in:
Todd C. Miller
2015-12-18 12:31:28 -07:00
parent 7a57bae1e6
commit 55531958de
5 changed files with 73 additions and 27 deletions

View File

@@ -140,7 +140,8 @@ disable_execute(char *envp[])
#endif /* HAVE_PRIV_SET */
#ifdef _PATH_SUDO_NOEXEC
envp = preload_dso(envp, sudo_conf_noexec_path());
if (sudo_conf_noexec_path() != NULL)
envp = preload_dso(envp, sudo_conf_noexec_path());
#endif /* _PATH_SUDO_NOEXEC */
debug_return_ptr(envp);