From b4f5dc2fb8763b959d2b3452be192d24a52ba1b4 Mon Sep 17 00:00:00 2001 From: Ivan Kozik Date: Wed, 30 Oct 2019 22:39:17 +0000 Subject: chromium: do not load .so files from current working directory Fixes #67234. --- pkgs/applications/networking/browsers/chromium/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'pkgs/applications/networking') diff --git a/pkgs/applications/networking/browsers/chromium/default.nix b/pkgs/applications/networking/browsers/chromium/default.nix index 8a3ae2a06a74..8329bf3ef550 100644 --- a/pkgs/applications/networking/browsers/chromium/default.nix +++ b/pkgs/applications/networking/browsers/chromium/default.nix @@ -156,7 +156,11 @@ in stdenv.mkDerivation { export CHROME_DEVEL_SANDBOX="$sandbox/bin/${sandboxExecutableName}" fi - export LD_LIBRARY_PATH="\$LD_LIBRARY_PATH:${libPath}" + '' + lib.optionalString (libPath != "") '' + # To avoid loading .so files from cwd, LD_LIBRARY_PATH here must not + # contain an empty section before or after a colon. + export LD_LIBRARY_PATH="\$LD_LIBRARY_PATH\''${LD_LIBRARY_PATH:+:}${libPath}" + '' + '' # libredirect causes chromium to deadlock on startup export LD_PRELOAD="\$(echo -n "\$LD_PRELOAD" | tr ':' '\n' | grep -v /lib/libredirect\\\\.so$ | tr '\n' ':')" -- cgit 1.4.1