1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 19:51:17 +00:00

Merge pull request #248040 from felschr/tor-browser-malloc

tor-browser-bundle-bin: deprecate useHardenedMalloc
This commit is contained in:
Franz Pletz 2023-08-25 20:12:38 +02:00 committed by GitHub
commit fb6f1934a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -47,7 +47,7 @@
# Hardening
, graphene-hardened-malloc
# Whether to use graphene-hardened-malloc
, useHardenedMalloc ? true
, useHardenedMalloc ? null
# Whether to disable multiprocess support
, disableContentSandbox ? false
@ -56,7 +56,10 @@
, extraPrefs ? ""
}:
let
lib.warnIf (useHardenedMalloc != null)
"tor-browser-bundle-bin: useHardenedMalloc is deprecated and enabling it can cause issues"
(let
libPath = lib.makeLibraryPath libPkgs;
libPkgs = [
@ -268,7 +271,7 @@ stdenv.mkDerivation rec {
GeoIPv6File $TBB_IN_STORE/TorBrowser/Data/Tor/geoip6
EOF
WRAPPER_LD_PRELOAD=${lib.optionalString useHardenedMalloc
WRAPPER_LD_PRELOAD=${lib.optionalString (useHardenedMalloc == true)
"${graphene-hardened-malloc}/lib/libhardened_malloc.so"}
WRAPPER_XDG_DATA_DIRS=${lib.concatMapStringsSep ":" (x: "${x}/share") [
@ -477,4 +480,4 @@ stdenv.mkDerivation rec {
license = licenses.free;
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
};
}
})