From 22e52be3b35cb48d90ec76b6accdc243ee7c9714 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Sun, 6 Jun 2021 17:30:45 +0200 Subject: [PATCH] nixos/apparmor: allow closure of selected mallocLib, fixes #125415 --- nixos/modules/config/malloc.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nixos/modules/config/malloc.nix b/nixos/modules/config/malloc.nix index fc35993b5a81..ffcf4d24221a 100644 --- a/nixos/modules/config/malloc.nix +++ b/nixos/modules/config/malloc.nix @@ -91,7 +91,10 @@ in "abstractions/base" = '' r /etc/ld-nix.so.preload, r ${config.environment.etc."ld-nix.so.preload".source}, - mr ${providerLibPath}, + include "${pkgs.apparmorRulesFromClosure { + name = "mallocLib"; + baseRules = ["mr $path/lib/**.so*"]; + } [ mallocLib ] }" ''; }; };