2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +00:00

Call clean_env very early in main() for paranoia's sake. Idea from

Marc Esipovich.
This commit is contained in:
Todd C. Miller
2000-05-12 20:55:35 +00:00
parent fc15c3dbd1
commit 7a2dfb77fb

5
sudo.c
View File

@@ -193,6 +193,9 @@ main(argc, argv)
# endif
#endif /* HAVE_GETPRPWNAM && HAVE_SET_AUTH_PARAMETERS */
/* Get rid of any nasty bits in the environment. */
clean_env(environ, badenv_table);
Argv = argv;
Argc = argc;
@@ -272,8 +275,6 @@ main(argc, argv)
if (user_cmnd == NULL && NewArgc == 0)
usage(1);
clean_env(environ, badenv_table);
cmnd_status = init_vars(sudo_mode);
/* At this point, ruid == euid == 0 */