tor-browser-bundle-bin: deprecate useHardenedMalloc
Set useHardenedMalloc to false by default & add deprecation warning. graphene-hardened-malloc cannot fully replace Tor Browser's statically linked jemalloc & can cause issues.
This commit is contained in:
parent
9047000354
commit
4823d1bf38
@ -47,7 +47,7 @@
|
|||||||
# Hardening
|
# Hardening
|
||||||
, graphene-hardened-malloc
|
, graphene-hardened-malloc
|
||||||
# Whether to use graphene-hardened-malloc
|
# Whether to use graphene-hardened-malloc
|
||||||
, useHardenedMalloc ? true
|
, useHardenedMalloc ? null
|
||||||
|
|
||||||
# Whether to disable multiprocess support
|
# Whether to disable multiprocess support
|
||||||
, disableContentSandbox ? false
|
, disableContentSandbox ? false
|
||||||
@ -56,7 +56,10 @@
|
|||||||
, extraPrefs ? ""
|
, extraPrefs ? ""
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
lib.warnIf (useHardenedMalloc != null)
|
||||||
|
"tor-browser-bundle-bin: useHardenedMalloc is deprecated and enabling it can cause issues"
|
||||||
|
|
||||||
|
(let
|
||||||
libPath = lib.makeLibraryPath libPkgs;
|
libPath = lib.makeLibraryPath libPkgs;
|
||||||
|
|
||||||
libPkgs = [
|
libPkgs = [
|
||||||
@ -268,7 +271,7 @@ stdenv.mkDerivation rec {
|
|||||||
GeoIPv6File $TBB_IN_STORE/TorBrowser/Data/Tor/geoip6
|
GeoIPv6File $TBB_IN_STORE/TorBrowser/Data/Tor/geoip6
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
WRAPPER_LD_PRELOAD=${lib.optionalString useHardenedMalloc
|
WRAPPER_LD_PRELOAD=${lib.optionalString (useHardenedMalloc == true)
|
||||||
"${graphene-hardened-malloc}/lib/libhardened_malloc.so"}
|
"${graphene-hardened-malloc}/lib/libhardened_malloc.so"}
|
||||||
|
|
||||||
WRAPPER_XDG_DATA_DIRS=${lib.concatMapStringsSep ":" (x: "${x}/share") [
|
WRAPPER_XDG_DATA_DIRS=${lib.concatMapStringsSep ":" (x: "${x}/share") [
|
||||||
@ -477,4 +480,4 @@ stdenv.mkDerivation rec {
|
|||||||
license = licenses.free;
|
license = licenses.free;
|
||||||
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user