core: use X_OK when looking for executables
Other tools silently ignore non-executable names found in path. By checking F_OK, we would could pick non-executable path even though there is an executable one later.
This commit is contained in:
parent
598c47c86e
commit
831d57953e
|
@ -808,7 +808,7 @@ int config_parse_exec(
|
|||
if (!fullpath)
|
||||
return log_oom();
|
||||
|
||||
if (access(fullpath, F_OK) >= 0) {
|
||||
if (access(fullpath, X_OK) >= 0) {
|
||||
free_and_replace(path, fullpath);
|
||||
found = true;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue