diff --git a/pressure-vessel/wrap.c b/pressure-vessel/wrap.c index b9c58e1be8229cfa06dc98e1595ceca45c3fea33..75a4342c57a54a5adabc9f1da0c2991dcb4e377b 100644 --- a/pressure-vessel/wrap.c +++ b/pressure-vessel/wrap.c @@ -2172,6 +2172,22 @@ main (int argc, adjusted_path = g_build_filename ("/run/parent", preload, NULL); g_debug ("%s -> %s", preload, adjusted_path); pv_search_path_append (adjusted, adjusted_path); + + if (g_str_has_suffix (preload, "/libshared-library-guard.so")) + { + /* We special case libshared-library-guard because usually + * its blockedlist file is located in `/app` and we need + * to change that to the `/run/parent` counterpart */ + const gchar *blockedlist = "/app/etc/freedesktop-sdk.ld.so.blockedlist"; + if (g_file_test (blockedlist, G_FILE_TEST_EXISTS)) + { + g_autofree gchar *adjusted_blockedlist = NULL; + adjusted_blockedlist = g_build_filename ("/run/parent", + blockedlist, NULL); + pv_environ_lock_env (container_env, "SHARED_LIBRARY_GUARD_CONFIG", + adjusted_blockedlist); + } + } } else {