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

Unset "secure_path" if user_is_exempt()

This commit is contained in:
Todd C. Miller
2001-12-14 06:26:55 +00:00
parent 2cbd965d63
commit f590093e46
2 changed files with 7 additions and 1 deletions

6
sudo.c
View File

@@ -245,6 +245,12 @@ main(argc, argv, envp)
/* Validate the user but don't search for pseudo-commands. */
validated = sudoers_lookup(pwflag);
/* Exempt users aren't affected by secure paths. */
if (user_is_exempt() && def_str(I_SECURE_PATH)) {
free(def_str(I_SECURE_PATH));
def_str(I_SECURE_PATH) = NULL;
}
/*
* Look up runas user passwd struct. If we are given a uid then
* there may be no corresponding passwd(5) entry (which is OK).