set_cmnd_path: apply runchroot if set when finding the command path
Previously we would prepend runchroot to the path we were checking but that does not properly handle symbolic links.
This commit is contained in:
@@ -147,7 +147,7 @@ resolve_editor(const char *ed, size_t edlen, int nfiles, char * const *files,
|
||||
goto oom;
|
||||
|
||||
/* If we can't find the editor in the user's PATH, give up. */
|
||||
if (find_path(editor, &editor_path, &user_editor_sb, getenv("PATH"), NULL,
|
||||
if (find_path(editor, &editor_path, &user_editor_sb, getenv("PATH"),
|
||||
0, allowlist) != FOUND) {
|
||||
errno = ENOENT;
|
||||
goto bad;
|
||||
|
Reference in New Issue
Block a user