setuid-wrappers : Prepare permissions for running wrappers
The new setuid-wrappers in /run cannot be executed by users due to:
1) the temporary directory does not allow access
2) the /run is mounted nosuid
commit8d977ead386cf29b8b395caca536bfaec9c36efe
authorKarn Kallio <kkallio@skami.org>
dateSat 3 Sep 2016, 16:42 (10 years ago)
parentd3ee483
nixos/modules/security/setuid-wrappers.nix+1
@@ -117,6 +117,7 @@ in
117117
118118 mkdir -p /run/setuid-wrapper-dirs
119119 wrapperDir=$(mktemp --directory --tmpdir=/run/setuid-wrapper-dirs setuid-wrappers.XXXXXXXXXX)
120+ chmod a+rx $wrapperDir
120121
121122 ${concatMapStrings makeSetuidWrapper setuidPrograms}
122123
nixos/modules/tasks/filesystems.nix+1−1
@@ -287,7 +287,7 @@ in
287287 boot.specialFileSystems = {
288288 "/proc" = { fsType = "proc"; options = [ "nosuid" "noexec" "nodev" ]; };
289289 "/sys" = { fsType = "sysfs"; options = [ "nosuid" "noexec" "nodev" ]; };
290− "/run" = { fsType = "tmpfs"; options = [ "nosuid" "nodev" "strictatime" "mode=755" "size=${config.boot.runSize}" ]; };
290+ "/run" = { fsType = "tmpfs"; options = [ "nodev" "strictatime" "mode=755" "size=${config.boot.runSize}" ]; };
291291 "/dev" = { fsType = "devtmpfs"; options = [ "nosuid" "strictatime" "mode=755" "size=${config.boot.devSize}" ]; };
292292 "/dev/shm" = { fsType = "tmpfs"; options = [ "nosuid" "nodev" "strictatime" "mode=1777" "size=${config.boot.devShmSize}" ]; };
293293 "/dev/pts" = { fsType = "devpts"; options = [ "nosuid" "noexec" "mode=620" "gid=${toString config.ids.gids.tty}" ]; };