Skip to content

Commit bae79ab

Browse files
DaanDeMeyerbehrmann
authored andcommitted
Reduce the number of filesystems we remount noexec/nosuid/nodev when root
For mkosi-initrd, /etc might very well contain executable scripts which we should allow to run, so let's only mount /boot and /efi nodev/nosuid/noexec.
1 parent c0eac7d commit bae79ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mkosi/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4894,7 +4894,7 @@ def run_build(
48944894
continue
48954895

48964896
attrs = MOUNT_ATTR_RDONLY
4897-
if d not in ("/usr", "/opt"):
4897+
if d in ("/boot", "/efi"):
48984898
attrs |= MOUNT_ATTR_NOSUID | MOUNT_ATTR_NODEV | MOUNT_ATTR_NOEXEC
48994899

49004900
mount_rbind(d, d, attrs)

0 commit comments

Comments
 (0)