summary refs log tree commit diff
diff options
context:
space:
mode:
authorDoron Behar <doron.behar@gmail.com>2020-08-14 20:38:11 +0300
committerDoron Behar <doron.behar@gmail.com>2020-08-15 21:57:16 +0300
commita854b77b08f5fe82efeaca9f819b92308968ca96 (patch)
treed05cd8380702591cdd49b612db0df54813ba74d0
parent7acb961c670c49ccc5cd15774f7a205947f5efbc (diff)
downloadnixpkgs-a854b77b08f5fe82efeaca9f819b92308968ca96.tar
nixpkgs-a854b77b08f5fe82efeaca9f819b92308968ca96.tar.gz
nixpkgs-a854b77b08f5fe82efeaca9f819b92308968ca96.tar.bz2
nixpkgs-a854b77b08f5fe82efeaca9f819b92308968ca96.tar.lz
nixpkgs-a854b77b08f5fe82efeaca9f819b92308968ca96.tar.xz
nixpkgs-a854b77b08f5fe82efeaca9f819b92308968ca96.tar.zst
nixpkgs-a854b77b08f5fe82efeaca9f819b92308968ca96.zip
nixos/wrappers: make (u)mount have the +s bit.
See
https://discourse.nixos.org/t/how-to-make-a-derivations-executables-have-the-s-permission/8555
and:
https://www.linuxquestions.org/questions/slackware-14/must-be-superuser-to-use-mount-fstab-is-correct-however-144932/
-rw-r--r--nixos/modules/security/wrappers/default.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/nixos/modules/security/wrappers/default.nix b/nixos/modules/security/wrappers/default.nix
index a0fadb018ec..2def74f8535 100644
--- a/nixos/modules/security/wrappers/default.nix
+++ b/nixos/modules/security/wrappers/default.nix
@@ -160,8 +160,11 @@ in
   config = {
 
     security.wrappers = {
+      # These are mount related wrappers that require the +s permission.
       fusermount.source = "${pkgs.fuse}/bin/fusermount";
       fusermount3.source = "${pkgs.fuse3}/bin/fusermount3";
+      mount.source = "${lib.getBin pkgs.utillinux}/bin/mount";
+      umount.source = "${lib.getBin pkgs.utillinux}/bin/umount";
     };
 
     boot.specialFileSystems.${parentWrapperDir} = {