diff --git a/config.def.h b/config.def.h index 577833e..257cfac 100644 --- a/config.def.h +++ b/config.def.h @@ -1,6 +1,5 @@ /* See LICENSE file for copyright and license details. */ -#define ENV_SUPATH "/bin" #define ENV_PATH "/bin" #define PW_CIPHER "$6$" /* SHA-512 */ #undef UTMP_PATH diff --git a/su.c b/su.c index 0f16637..eb8bea7 100644 --- a/su.c +++ b/su.c @@ -9,7 +9,6 @@ #include #include -#include "config.h" #include "passwd.h" #include "util.h" @@ -103,10 +102,6 @@ main(int argc, char *argv[]) newargv[0] = shell; newargv[1] = NULL; } - if (strcmp(pw->pw_name, "root") == 0) - setenv("PATH", ENV_SUPATH, 1); - else - setenv("PATH", ENV_PATH, 1); execve(shell, newargv, environ); weprintf("execve %s:", shell); return (errno == ENOENT) ? 127 : 126;