Commit a6faca51 authored by David Fuhrmann's avatar David Fuhrmann Committed by Jean-Baptiste Kempf

library paths: Explicitly add /usr/local/lib

Hardened runtime prevents the program to load any libraries outside
of the application bundle by default. Specifically, it also ignores
DYLD_FALLBACK_PATH which would contain /usr/local/lib.
To allow usage of a library outside of the application bundle, add
/usr/local/lib explicitly.
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 12f0f3cb
Pipeline #5021 passed with stage
in 2 minutes and 36 seconds
...@@ -69,10 +69,11 @@ void *dl_dlopen(const char *path, const char *version) ...@@ -69,10 +69,11 @@ void *dl_dlopen(const char *path, const char *version)
@loader_path - location of current library/binary (ex. libbluray.dylib) @loader_path - location of current library/binary (ex. libbluray.dylib)
@executable_path - location of running binary (ex. /Applications/Some.app/Contents/MacOS) @executable_path - location of running binary (ex. /Applications/Some.app/Contents/MacOS)
@rpath - search rpaths of running binary (man install_name_path) @rpath - search rpaths of running binary (man install_name_path)
/usr/local/lib/ - explicitly added path, as runtime hardened programs ignore DYLD_FALLBACK_PATH now
*/ */
static const char *search_paths[] = {"", "@loader_path/lib/", "@loader_path/", "@executable_path/", static const char *search_paths[] = {"", "@loader_path/lib/", "@loader_path/", "@executable_path/",
"@executable_path/lib/", "@executable_path/../lib/", "@executable_path/lib/", "@executable_path/../lib/",
"@executable_path/../Resources/", "@rpath/", NULL}; "@executable_path/../Resources/", "@rpath/", "/usr/local/lib/", NULL};
version = NULL; version = NULL;
#else #else
static const char ext[] = ".so"; static const char ext[] = ".so";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment