From 533cfb1b7752aacf6fa735511b8c580dacb4feee Mon Sep 17 00:00:00 2001 From: =?utf8?q?Peter=20M=C3=BCller?= Date: Wed, 13 Jul 2022 19:46:38 +0000 Subject: [PATCH] Core Update 170: Harden mount options of /boot on existing installations MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The second version of this patch uses @ instead of / for sed delimiters, which makes the command less hard to read. Since Core Update 170 already requires a reboot at this point, the respective directive is omitted. Signed-off-by: Peter Müller --- config/rootfiles/core/170/update.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/rootfiles/core/170/update.sh b/config/rootfiles/core/170/update.sh index 8dc99e5d8e..9e96e34671 100644 --- a/config/rootfiles/core/170/update.sh +++ b/config/rootfiles/core/170/update.sh @@ -123,6 +123,9 @@ sed -i /etc/collectd.conf \ /etc/init.d/rc.d/unbound start /etc/init.d/rc.d/suricata restart +# Harden mount options of /boot +sed -e -i "s@[[:space:]]*\/boot[[:space:]]*auto[[:space:]]*defaults[[:space:]]*@ \/boot auto defaults,nodev,noexec,nosuid @g" /etc/fstab + # This update needs a reboot... touch /var/run/need_reboot -- 2.39.5