Merge pull request #174951 from dpausp/fix-pam-tty-audit
This commit is contained in:
commit
814628a45d
|
@ -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
|
||||
'' +
|
||||
|
|
Loading…
Reference in a new issue