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

Bring back the "secure_path" Defaults option now that Defaults take

effect before the path is searched.
This commit is contained in:
Todd C. Miller
2004-11-12 16:19:19 +00:00
parent 541908f1bd
commit a768dbc34f
11 changed files with 254 additions and 216 deletions

View File

@@ -92,11 +92,9 @@ find_path(infile, outfile, sbp, path)
}
/* Use PATH passed in unless SECURE_PATH is in effect. */
#ifdef SECURE_PATH
if (!user_is_exempt())
path = SECURE_PATH;
#endif /* SECURE_PATH */
if (path == NULL)
if (def_secure_path && !user_is_exempt())
path = def_secure_path;
else if (path == NULL)
return(NOT_FOUND);
path = estrdup(path);
origpath = path;