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:
5
sudo.c
5
sudo.c
@@ -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 */
|
||||
|
Reference in New Issue
Block a user