]> granicus.if.org Git - sudo/commitdiff
Use _PATH_STDPATH instead of _PATH_DEFPATH
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 12 Jul 2010 22:07:52 +0000 (18:07 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 12 Jul 2010 22:07:52 +0000 (18:07 -0400)
pathnames.h.in
plugins/sudoers/env.c
plugins/sudoers/logging.c

index d6eb6e4661a8d09a78e3f2a8783c81803c08d541..4e6cc078df0fcb3413f96d85fc1291ce21d9d5f9 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 */
index 99ef0ff5777619fee287292804bfb2fd3fbabd79..c7562590c0bad67efe7753be73080941903bba10 100644 (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
index 071c84cd56cda22e1e894eaa98aace6760ba0621..0cacc92cbd804ccc5b1bc610edc68c0e1d806f7e 100644 (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",