From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter =?utf-8?q?M=C3=BCller?= To: development@lists.ipfire.org Subject: Re: [PATCH v2] Core Update 170: Harden mount options of /boot on existing installations Date: Wed, 13 Jul 2022 19:48:27 +0000 Message-ID: <0deb7c1a-60ee-66c2-c92a-333e1325f698@ipfire.org> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4016176215246631434==" List-Id: --===============4016176215246631434== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello *, additionally, we need to ensure /boot mount options are already written with = these flags into /etc/fstab on new installations. For flash-images, this is already done = in C169, but I have yet to investigate where to change things for the ISO files. Any hints would be appreciated. :-) Thanks, and best regards, Peter M=C3=BCller > 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. >=20 > Signed-off-by: Peter M=C3=BCller > --- > config/rootfiles/core/170/update.sh | 3 +++ > 1 file changed, 3 insertions(+) >=20 > diff --git a/config/rootfiles/core/170/update.sh b/config/rootfiles/core/17= 0/update.sh > index 7dde03060..78a4709bc 100644 > --- a/config/rootfiles/core/170/update.sh > +++ b/config/rootfiles/core/170/update.sh > @@ -110,6 +110,9 @@ chown nobody:nobody /var/lib/ipblocklist > # Start services > /etc/init.d/rc.d/unbound start > =20 > +# Harden mount options of /boot > +sed -e -i "s@[[:space:]]*\/boot[[:space:]]*auto[[:space:]]*defaults[[:spac= e:]]*@ \/boot auto defaults,nodev,noexec,nosuid @g" /etc/fstab > + > # This update needs a reboot... > touch /var/run/need_reboot > =20 --===============4016176215246631434==--