From 0adbf8feb4a0c1efd8f0ab8b6f05c182077d504a Mon Sep 17 00:00:00 2001 From: Jenny Date: Thu, 25 May 2023 22:45:59 +0200 Subject: [PATCH] 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 --- nixos/modules/security/pam_mount.nix | 6 ++++-- 1 file 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 - ${pkgs.fuse}/bin/mount.fuse %(VOLUME) %(MNTPT) -o ${concatStringsSep "," (cfg.fuseMountOptions ++ [ "%(OPTIONS)" ])} + + ${pkgs.fuse}/bin/mount.fuse %(VOLUME) %(MNTPT) -o ,${concatStringsSep "," (cfg.fuseMountOptions ++ [ "%(OPTIONS)" ])}' ${pkgs.fuse}/bin/fusermount -u %(MNTPT) - ${pkgs.pam_mount}/bin/mount.crypt -o ${concatStringsSep "," (cfg.cryptMountOptions ++ [ "%(OPTIONS)" ])} %(VOLUME) %(MNTPT) + + ${pkgs.pam_mount}/bin/mount.crypt -o ,${concatStringsSep "," (cfg.cryptMountOptions ++ [ "%(OPTIONS)" ])} %(VOLUME) %(MNTPT) ${pkgs.pam_mount}/bin/umount.crypt %(MNTPT) ${pkgs.pam_mount}/bin/pmvarrun -u %(USER) -o %(OPERATION) ${optionalString oflRequired "${fake_ofl}/bin/fake_ofl %(SIGNAL) %(MNTPT)"}