]> granicus.if.org Git - sudo/commitdiff
Use _PATH_STDPATH instead of _PATH_DEFPATH
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 12 Jul 2010 19:49:08 +0000 (15:49 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 12 Jul 2010 19:49:08 +0000 (15:49 -0400)
--HG--
branch : 1.7

env.c
logging.c
pathnames.h.in

diff --git a/env.c b/env.c
index 8eb8e1ad6f68f4f6c2ac2488d84f7c2fe66b1abb..cb06e2376bc58a34e3cb15f992c86f0fb1a91c34 100644 (file)
--- a/env.c
+++ b/env.c
@@ -751,7 +751,7 @@ rebuild_env(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
index 1d4acc5c6ddd2a1a64e6dc78300e122e7abebbd4..3f1d855643e58875a35a431e169a9a811c3955fd 100644 (file)
--- a/logging.c
+++ b/logging.c
@@ -431,7 +431,7 @@ send_mail(fmt, va_alist)
 #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",
index 32f68f8ce62f3110fd96412e0cb7fecd4f5ad913..b3bd537edc6c40fc88b9986d190556d04716bc59 100644 (file)
 #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 */