diff options
author | Jenny <me@netali.de> | 2023-05-25 22:45:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-25 22:45:59 +0200 |
commit | 0adbf8feb4a0c1efd8f0ab8b6f05c182077d504a (patch) | |
tree | 3a80621cd6ff4ff310da73d1651740d3ca646b62 /nixos | |
parent | 6911dd246ff081a42da526cd9830a9bd7b88c5ce (diff) | |
download | nixlib-0adbf8feb4a0c1efd8f0ab8b6f05c182077d504a.tar nixlib-0adbf8feb4a0c1efd8f0ab8b6f05c182077d504a.tar.gz nixlib-0adbf8feb4a0c1efd8f0ab8b6f05c182077d504a.tar.bz2 nixlib-0adbf8feb4a0c1efd8f0ab8b6f05c182077d504a.tar.lz nixlib-0adbf8feb4a0c1efd8f0ab8b6f05c182077d504a.tar.xz nixlib-0adbf8feb4a0c1efd8f0ab8b6f05c182077d504a.tar.zst nixlib-0adbf8feb4a0c1efd8f0ab8b6f05c182077d504a.zip |
nixos/pam_mount: fix mounts without options (#234026)
This commit adds a comma in front of the given options, which makes the mounts still succeed even if no options are given. Fixes #233946
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/security/pam_mount.nix | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/nixos/modules/security/pam_mount.nix b/nixos/modules/security/pam_mount.nix index a17f38f93325..ad78f38b0866 100644 --- a/nixos/modules/security/pam_mount.nix +++ b/nixos/modules/security/pam_mount.nix @@ -167,9 +167,11 @@ in <!-- create mount point if not present --> <mkmountpoint enable="${if cfg.createMountPoints then "1" else "0"}" remove="${if cfg.removeCreatedMountPoints then "true" else "false"}" /> <!-- specify the binaries to be called --> - <fusemount>${pkgs.fuse}/bin/mount.fuse %(VOLUME) %(MNTPT) -o ${concatStringsSep "," (cfg.fuseMountOptions ++ [ "%(OPTIONS)" ])}</fusemount> + <!-- the comma in front of the options is necessary for empty options --> + <fusemount>${pkgs.fuse}/bin/mount.fuse %(VOLUME) %(MNTPT) -o ,${concatStringsSep "," (cfg.fuseMountOptions ++ [ "%(OPTIONS)" ])}'</fusemount> <fuseumount>${pkgs.fuse}/bin/fusermount -u %(MNTPT)</fuseumount> - <cryptmount>${pkgs.pam_mount}/bin/mount.crypt -o ${concatStringsSep "," (cfg.cryptMountOptions ++ [ "%(OPTIONS)" ])} %(VOLUME) %(MNTPT)</cryptmount> + <!-- the comma in front of the options is necessary for empty options --> + <cryptmount>${pkgs.pam_mount}/bin/mount.crypt -o ,${concatStringsSep "," (cfg.cryptMountOptions ++ [ "%(OPTIONS)" ])} %(VOLUME) %(MNTPT)</cryptmount> <cryptumount>${pkgs.pam_mount}/bin/umount.crypt %(MNTPT)</cryptumount> <pmvarrun>${pkgs.pam_mount}/bin/pmvarrun -u %(USER) -o %(OPERATION)</pmvarrun> ${optionalString oflRequired "<ofl>${fake_ofl}/bin/fake_ofl %(SIGNAL) %(MNTPT)</ofl>"} |