Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions etc/default/grub.d/40_secure-mount.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# tmp and api file systems
GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX systemd.mount-extra=tmpfs:/tmp:[:tmpfs[:defaults,nodev,nosuid,noexec]]"
GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX systemd.mount-extra=udev:/dev:[:devtmpfs[:defaults,nosuid,noexec]]"
GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX systemd.mount-extra=tmpfs:/dev/shm:[:tmpfs[:defaults,nodev,nosuid,noexec]]"
GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX systemd.mount-extra=tmpfs:/run:[:tmpfs[:defaults,nodev,nosuid,noexec]]"
#
#
## Also binds can be done in this manner
## But how do know for sure that we can bind for example var to itself? We can't do it if var has a dedicated partitoin on disk.
## Have to find a way to make sure there is no partition before binding anything
## Possible to use if else in kernel command line?
2 changes: 2 additions & 0 deletions etc/systemd/system/boot-efi.mount.d/50_security-misc.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[Mount]
Options=nodev,nosuid,noexec
2 changes: 2 additions & 0 deletions etc/systemd/system/boot.mount.d/50_security-misc.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[Mount]
Options=nodev,nosuid,noexec
2 changes: 2 additions & 0 deletions etc/systemd/system/home.mount.d/50_security-misc.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[Mount]
Options=nodev,nosuid
2 changes: 2 additions & 0 deletions etc/systemd/system/tmp.mount.d/50_security-misc.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[Mount]
Options=nodev,nosuid,noexec
2 changes: 2 additions & 0 deletions etc/systemd/system/usr-share.mount.d/50_security-misc.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[Mount]
Options=nodev,nosuid
2 changes: 2 additions & 0 deletions etc/systemd/system/usr.mount.d/50_security-misc.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[Mount]
Options=nodev
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[Mount]
Options=nodev,nosuid,noexec
2 changes: 2 additions & 0 deletions etc/systemd/system/var-log.mount.d/50_security-misc.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[Mount]
Options=nodev,nosuid,noexec
2 changes: 2 additions & 0 deletions etc/systemd/system/var-tmp.mount.d/50_security-misc.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[Mount]
Options=nodev,nosuid,noexec
2 changes: 2 additions & 0 deletions etc/systemd/system/var.mount.d/50_security-misc.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[Mount]
Options=nodev,nosuid