From e184e5987f7630e3783a60bfc11093ee54d1fa0c Mon Sep 17 00:00:00 2001 From: Arkadiusz Hiler Date: Sun, 30 Sep 2018 15:11:24 +0300 Subject: [PATCH] Add support for installing binaries with DT_RPATH It's better to use DT_RPATH dynamic section of the elf binary to store the paths of libraries to load instead of overwriting LD_LIBRARY_PATH for the whole environment, causing surprises. This solution is much more transparent and perfectly suitable for running contained installations of wayland/wlroots/sway. The code unsetting the LD_LIBRARY_PATH/LD_PRELOAD was also deleted as it's a placebo security at best - we should trust the execution path that leads us to running sway, and it's way too late to care about those variables since we already started executing our compositor, thus we would be compromised anyway. --- meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/meson.build b/meson.build index 6c87d17..6605340 100644 --- a/meson.build +++ b/meson.build @@ -33,6 +33,7 @@ executable('swaylock', include_directories: [sway_inc], dependencies: dependencies, link_with: [lib_sway_common, lib_sway_client], + install_rpath : rpathdir, install: true )