From: Michael Tremer <michael.tremer@ipfire.org>
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 [thread overview]
Message-ID: <A048CA91-B272-4A68-ACAB-88C7E2F6965C@ipfire.org> (raw)
In-Reply-To: <e9fc7a97-c975-e32b-e234-e83b3ba6e6dc@ipfire.org>
[-- Attachment #1: Type: text/plain, Size: 2223 bytes --]
Hello,
Yes, it isn’t great to edit such files with sed, but there are no other options.
I would however prefer to merge it only together with the changes to the installer. Otherwise we are shipping a small change over the course of three updates.
-Michael
> On 14 Jul 2022, at 11:15, Peter Müller <peter.mueller(a)ipfire.org> wrote:
>
> Hello Michael,
>
> gee, thank you. :-)
>
> Are you otherwise fine with this patch?
>
> Thanks, and best regards,
> Peter Müller
>
>
>> Hello,
>>
>> The pointer: https://git.ipfire.org/?p=ipfire-2.x.git;a=blob;f=src/installer/hw.c;h=12f8e793de49b65afb4d271f10d6d7717e8a8145;hb=HEAD#l1125
>>
>> -Michael
>>
>>> On 13 Jul 2022, at 20:48, Peter Müller <peter.mueller(a)ipfire.org> wrote:
>>>
>>> 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üller
>>>
>>>
>>>> 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 <peter.mueller(a)ipfire.org>
>>>> ---
>>>> 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 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
>>>>
>>>> +# 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
>>>>
>>
next prev parent reply other threads:[~2022-07-14 10:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-13 19:46 Peter Müller
2022-07-13 19:48 ` Peter Müller
2022-07-14 9:34 ` Michael Tremer
2022-07-14 10:15 ` Peter Müller
2022-07-14 10:17 ` Michael Tremer [this message]
2022-07-14 10:19 ` Peter Müller
2022-07-28 13:29 ` Peter Müller
2022-07-28 19:41 ` Michael Tremer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=A048CA91-B272-4A68-ACAB-88C7E2F6965C@ipfire.org \
--to=michael.tremer@ipfire.org \
--cc=development@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox