mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
[Backport release-26.05] nixos/malloc: check legacy scudo options exist before use (#533463)
This commit is contained in:
commit
de5a80f930
1 changed files with 8 additions and 4 deletions
|
|
@ -142,10 +142,14 @@ in
|
|||
# so we can warn the user about the change.
|
||||
legacyOptionsUsed = lib.lists.filter (opt: lib.strings.hasInfix opt scudoOpts) legacyOptionNames;
|
||||
in
|
||||
lib.optional (cfg.provider == "scudo" && legacyOptionsUsed != [ ]) ''
|
||||
environment.variables.SCUDO_OPTIONS: ${lib.concatStringsSep ", " legacyOptionsUsed} is/are no longer valid Scudo options.
|
||||
Use snake_case instead of CamelCase: https://llvm.org/docs/ScudoHardenedAllocator.html#options
|
||||
'';
|
||||
lib.optional
|
||||
(
|
||||
config.environment.variables ? SCUDO_OPTIONS && cfg.provider == "scudo" && legacyOptionsUsed != [ ]
|
||||
)
|
||||
''
|
||||
environment.variables.SCUDO_OPTIONS: ${lib.concatStringsSep ", " legacyOptionsUsed} is/are no longer valid Scudo options.
|
||||
Use snake_case instead of CamelCase: https://llvm.org/docs/ScudoHardenedAllocator.html#options
|
||||
'';
|
||||
|
||||
environment.etc."ld-nix.so.preload".text = ''
|
||||
${providerLibPath}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue