diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2022-07-22 14:05:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-22 14:05:44 +0200 |
commit | 779853b52ba779798602a43e91c077b97d6e6858 (patch) | |
tree | 6a6851350eb17acb250121e40024deafcbc5e5a7 /nixos | |
parent | 75feaefc59ead1d5ecf5f993050c0d52c08cb9ce (diff) | |
parent | 93132dc09c36aefb3d2f883901493103e5af985f (diff) |
Merge pull request #182413 from NetaliDev/pam-mount-fix-refactor
nixos/pam: refactor pam_mount unmounting fix
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/security/pam.nix | 1 | ||||
-rw-r--r-- | nixos/modules/system/boot/systemd/user.nix | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/nixos/modules/security/pam.nix b/nixos/modules/security/pam.nix index ce18af9fbc951..a80312367d856 100644 --- a/nixos/modules/security/pam.nix +++ b/nixos/modules/security/pam.nix @@ -611,7 +611,6 @@ let session optional ${pkgs.ecryptfs}/lib/security/pam_ecryptfs.so '' + optionalString cfg.pamMount '' - session [success=1 default=ignore] ${pkgs.pam}/lib/security/pam_succeed_if.so service = systemd-user quiet session optional ${pkgs.pam_mount}/lib/security/pam_mount.so disable_interactive '' + optionalString use_ldap '' diff --git a/nixos/modules/system/boot/systemd/user.nix b/nixos/modules/system/boot/systemd/user.nix index 0b1e6277c2f5c..edfff5abaa9e3 100644 --- a/nixos/modules/system/boot/systemd/user.nix +++ b/nixos/modules/system/boot/systemd/user.nix @@ -145,6 +145,10 @@ in { { # Ensure that pam_systemd gets included. This is special-cased # in systemd to provide XDG_RUNTIME_DIR. startSession = true; + # Disable pam_mount in systemd-user to prevent it from being called + # multiple times during login, because it will prevent pam_mount from + # unmounting the previously mounted volumes. + pamMount = false; }; # Some overrides to upstream units. |