From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: Re: [PATCH v2] Core Update 170: Harden mount options of /boot on existing installations Date: Thu, 14 Jul 2022 11:17:17 +0100 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4613776391725843390==" List-Id: --===============4613776391725843390== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello, Yes, it isn=E2=80=99t great to edit such files with sed, but there are no oth= er options. I would however prefer to merge it only together with the changes to the inst= aller. Otherwise we are shipping a small change over the course of three upda= tes. -Michael > On 14 Jul 2022, at 11:15, Peter M=C3=BCller wr= ote: >=20 > Hello Michael, >=20 > gee, thank you. :-) >=20 > Are you otherwise fine with this patch? >=20 > Thanks, and best regards, > Peter M=C3=BCller >=20 >=20 >> Hello, >>=20 >> The pointer: https://git.ipfire.org/?p=3Dipfire-2.x.git;a=3Dblob;f=3Dsrc/i= nstaller/hw.c;h=3D12f8e793de49b65afb4d271f10d6d7717e8a8145;hb=3DHEAD#l1125 >>=20 >> -Michael >>=20 >>> On 13 Jul 2022, at 20:48, Peter M=C3=BCller = wrote: >>>=20 >>> Hello *, >>>=20 >>> additionally, we need to ensure /boot mount options are already written w= ith these flags >>> into /etc/fstab on new installations. For flash-images, this is already d= one in C169, but >>> I have yet to investigate where to change things for the ISO files. >>>=20 >>> Any hints would be appreciated. :-) >>>=20 >>> Thanks, and best regards, >>> Peter M=C3=BCller >>>=20 >>>=20 >>>> 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= /170/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[[:s= pace:]]*@ \/boot auto defaults,nodev,noexec,nosuid @g" /etc/fstab >>>> + >>>> # This update needs a reboot... >>>> touch /var/run/need_reboot >>>>=20 >>=20 --===============4613776391725843390==--