Skip to content

Commit

Permalink
Don't use (DY)LD_LIBRARY_PATH as plugin search paths (AcademySoftware…
Browse files Browse the repository at this point in the history
…Foundation#4245)

Only use the OIIO_LIBRARY_PATH environment variable by default.

Searching through such system paths has some risk loading plugins
installed for another purpose or that may be incompatible.

If the previous behavior is desired, applications can add these
environment variables to the plugin search path manually.

Signed-off-by: Brecht Van Lommel <[email protected]>
  • Loading branch information
brechtvl committed Apr 26, 2024
1 parent 8d7f25b commit 9f62336
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/libOpenImageIO/imageioplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -469,12 +469,6 @@ pvt::catalog_all_plugins(std::string searchpath)

std::unique_lock<std::recursive_mutex> lock(imageio_mutex);
append_if_env_exists(searchpath, "OIIO_LIBRARY_PATH", true);
#ifdef __APPLE__
append_if_env_exists(searchpath, "DYLD_LIBRARY_PATH");
#endif
#if defined(__linux__) || defined(__FreeBSD__)
append_if_env_exists(searchpath, "LD_LIBRARY_PATH");
#endif

size_t patlen = pattern.length();
std::vector<std::string> dirs;
Expand Down

0 comments on commit 9f62336

Please sign in to comment.