Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/pam: replace apparmor warnings with assertions #332119

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions nixos/modules/security/pam.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/NixOS/nixpkgs/pull/314791>''
''non-absolute PAM modulePath "${modulePath}" is unsupported by apparmor''
modulePath
))
(lib.filter (lib.hasPrefix "/"))
lib.unique
(map (module: "mr ${module},"))
concatLines
Expand Down