pressure-vessel: Remap preloadable modules better
Compare changes
- Simon McVittie authored
When pressure-vessel maps LD_PRELOAD options into a container, it's not completely obvious what to do with a plain basename. If it's LD_PRELOAD=libMangoHud.so, then we'll want to import that library into the container and load it. However, if it's something like LD_PRELOAD=libcurl.so.4, then arbitrarily deciding that we will load the one from the host system seems like it defeats the object of the predictable runtime environment. We can avoid this by assuming that if a particular SONAME exists in the container, then we should probably interpret LD_PRELOADing it as meaning use the container's version, even if the version from the provider (host system) appears newer. The if-not-in-container flag makes this implementable. If the library has dependencies, they are compared between container and provider as usual. Signed-off-by:
Simon McVittie <smcv@collabora.com>
@@ -285,6 +285,9 @@ static void usage (int code)
@@ -285,6 +285,9 @@ static void usage (int code)
@@ -314,6 +317,7 @@ typedef enum
@@ -314,6 +317,7 @@ typedef enum
@@ -502,6 +506,14 @@ capture_one( const char *soname, const capture_options *options,
@@ -502,6 +506,14 @@ capture_one( const char *soname, const capture_options *options,
@@ -996,6 +1008,15 @@ capture_pattern( const char *pattern, const capture_options *options,
@@ -996,6 +1008,15 @@ capture_pattern( const char *pattern, const capture_options *options,