2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-22 09:57:41 +00:00

Use _PATH_STDPATH instead of _PATH_DEFPATH

This commit is contained in:
Todd C. Miller 2010-07-12 18:07:52 -04:00
parent 151db86e3b
commit 5b9e39ac87
3 changed files with 6 additions and 2 deletions

View File

@ -43,6 +43,10 @@
#define _PATH_DEFPATH "/usr/bin:/bin"
#endif /* _PATH_DEFPATH */
#ifndef _PATH_STDPATH
#define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin"
#endif /* _PATH_STDPATH */
#ifndef _PATH_ENVIRONMENT
#define _PATH_ENVIRONMENT "/etc/environment"
#endif /* _PATH_ENVIRONMENT */

View File

@ -572,7 +572,7 @@ rebuild_env(int noexec)
if (!ISSET(didvar, DID_TERM))
sudo_putenv("TERM=unknown", FALSE, FALSE);
if (!ISSET(didvar, DID_PATH))
sudo_setenv("PATH", _PATH_DEFPATH, FALSE);
sudo_setenv("PATH", _PATH_STDPATH, FALSE);
/*
* Preload a noexec file? For a list of LD_PRELOAD-alikes, see

View File

@ -404,7 +404,7 @@ send_mail(const char *fmt, ...)
#ifndef NO_ROOT_MAILER
static char *root_envp[] = {
"HOME=/",
"PATH=/usr/bin:/bin",
"PATH=/usr/bin:/bin:/usr/sbin:/sbin",
"LOGNAME=root",
"USERNAME=root",
"USER=root",