nixos/samba: add mount.cifs +s wrapper (#328901)

This commit is contained in:
Doron Behar 2024-09-04 07:55:39 +00:00 committed by GitHub
commit 024357143a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -239,6 +239,15 @@ in
security.pam.services.samba = {};
environment.systemPackages = [ cfg.package ];
# Like other mount* related commands that need the setuid bit, this is
# required too.
security.wrappers."mount.cifs" = {
program = "mount.cifs";
source = "${lib.getBin pkgs.cifs-utils}/bin/mount.cifs";
owner = "root";
group = "root";
setuid = true;
};
networking.firewall.allowedTCPPorts = mkIf cfg.openFirewall [ 139 445 ];
networking.firewall.allowedUDPPorts = mkIf cfg.openFirewall [ 137 138 ];