diff options
author | Tobias Stenzel <ts@flyingcircus.io> | 2022-10-22 23:20:09 +0200 |
---|---|---|
committer | Tobias Stenzel <ts@flyingcircus.io> | 2022-10-22 23:20:09 +0200 |
commit | 8111e4f113b4a10b6093b231712cd943ca0bb6ff (patch) | |
tree | c8bf31dfc3c65df35991bab1a0a4a4ac563e3eb0 /nixos/modules/security | |
parent | 301aada7a64812853f2e2634a530ef5d34505048 (diff) |
nixos/pam: fix pam_tty_audit config
Escape the line breaks to render a valid config. Module arguments have to be at the same line or line endings have to be escaped with a backslash.
Diffstat (limited to 'nixos/modules/security')
-rw-r--r-- | nixos/modules/security/pam.nix | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/nixos/modules/security/pam.nix b/nixos/modules/security/pam.nix index c74f66d918295..dc145d8585154 100644 --- a/nixos/modules/security/pam.nix +++ b/nixos/modules/security/pam.nix @@ -615,12 +615,12 @@ let optionalString cfg.setLoginUid '' session ${if config.boot.isContainer then "optional" else "required"} pam_loginuid.so '' + - optionalString cfg.ttyAudit.enable '' - session required ${pkgs.pam}/lib/security/pam_tty_audit.so - open_only=${toString cfg.ttyAudit.openOnly} - ${optionalString (cfg.ttyAudit.enablePattern != null) "enable=${cfg.ttyAudit.enablePattern}"} - ${optionalString (cfg.ttyAudit.disablePattern != null) "disable=${cfg.ttyAudit.disablePattern}"} - '' + + optionalString cfg.ttyAudit.enable (concatStringsSep " \\\n " ([ + "session required ${pkgs.pam}/lib/security/pam_tty_audit.so" + ] ++ optional cfg.ttyAudit.openOnly "open_only" + ++ optional (cfg.ttyAudit.enablePattern != null) "enable=${cfg.ttyAudit.enablePattern}" + ++ optional (cfg.ttyAudit.disablePattern != null) "disable=${cfg.ttyAudit.disablePattern}" + )) + optionalString cfg.makeHomeDir '' session required ${pkgs.pam}/lib/security/pam_mkhomedir.so silent skel=${config.security.pam.makeHomeDir.skelDirectory} umask=0077 '' + |