mirror of
https://github.com/clearlinux/linux-steam-integration.git
synced 2026-09-06 22:01:27 +00:00
shim: When using native runtime, load liblsi-intercept in LD_AUDIT
liblsi-intercept has a simple job of stopping Steam from trying to replace all of the system libraries in a mish-mash approach. Even when we have STEAM_RUNTIME=0, and even with the advent of the new "prefer host libraries" system, the internal replacements and pinning system actually break massively. To counteract this issue, we use our own rtld-audit implementation when launching the real Steam, which will severely restrict which libraries the main Steam binaries are actually allowed to load. This is on a whitelist basis and ensures that the host libraries will be used where appropriate, i.e. SDL, X11, etc. This prevents compatibility issues as well as the random crashes we're now seeing with Steam beta. Signed-off-by: Ikey Doherty <ikey@solus-project.com>
This commit is contained in:
@@ -26,6 +26,12 @@
|
||||
*/
|
||||
#define EMUL32BIN "linux32"
|
||||
|
||||
/**
|
||||
* Audit path is used for the libintercept library to ensure Steam only uses the
|
||||
* host SDL, etc.
|
||||
*/
|
||||
#define AUDIT_PATH "/usr/\$LIB/liblsi-intercept.so"
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
LsiConfig config = { 0 };
|
||||
@@ -59,6 +65,7 @@ int main(int argc, char **argv)
|
||||
if (config.use_native_runtime) {
|
||||
/* Explicitly disable the runtime */
|
||||
setenv("STEAM_RUNTIME", "0", 1);
|
||||
setenv("LD_AUDIT", AUDIT_PATH, 1);
|
||||
} else {
|
||||
/* Only preload when needed. */
|
||||
if (lsi_system_requires_preload()) {
|
||||
|
||||
Reference in New Issue
Block a user