mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +02:00
system/helpers.cpp: add more possible exexutable paths
Origin commit data
------------------
Commit: 6fc8d1bb9f
Author: Thilo Graf <dbt@novatux.de>
Date: 2014-11-24 (Mon, 24 Nov 2014)
This commit is contained in:
@@ -340,7 +340,7 @@ std::string find_executable(const char *name)
|
|||||||
if (tmpPath)
|
if (tmpPath)
|
||||||
path = strdupa(tmpPath);
|
path = strdupa(tmpPath);
|
||||||
else
|
else
|
||||||
path = strdupa("/bin:/usr/bin:/sbin:/usr/sbin");
|
path = strdupa("/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin");
|
||||||
if (name[0] == '/') { /* full path given */
|
if (name[0] == '/') { /* full path given */
|
||||||
if (!access(name, X_OK) && !stat(name, &s) && S_ISREG(s.st_mode))
|
if (!access(name, X_OK) && !stat(name, &s) && S_ISREG(s.st_mode))
|
||||||
return std::string(name);
|
return std::string(name);
|
||||||
|
Reference in New Issue
Block a user