From 0a58f69255f3d3e8f0b8e8dc83a7447939b234e1 Mon Sep 17 00:00:00 2001 From: Colin Date: Sat, 3 Aug 2024 23:52:43 +0000 Subject: [PATCH] nixos/pam: replace apparmor warnings with assertions see for details. --- nixos/modules/security/pam.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/nixos/modules/security/pam.nix b/nixos/modules/security/pam.nix index 2ff08cbfde81237..a301a9dfea83f98 100644 --- a/nixos/modules/security/pam.nix +++ b/nixos/modules/security/pam.nix @@ -1592,13 +1592,11 @@ in (lib.concatMap lib.attrValues) (lib.filter (rule: rule.enable)) (lib.catAttrs "modulePath") - # TODO(@uninsane): replace this warning + lib.filter with just an assertion - (map (modulePath: lib.warnIfNot + (map (modulePath: lib.throwIfNot (lib.hasPrefix "/" modulePath) - ''non-absolute PAM modulePath "${modulePath}" is unsupported by apparmor and will be treated as an error by future versions of nixpkgs; see '' + ''non-absolute PAM modulePath "${modulePath}" is unsupported by apparmor'' modulePath )) - (lib.filter (lib.hasPrefix "/")) lib.unique (map (module: "mr ${module},")) concatLines