From: "Peter Müller" <peter.mueller@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 10:15:50 +0000 [thread overview]
Message-ID: <e9fc7a97-c975-e32b-e234-e83b3ba6e6dc@ipfire.org> (raw)
In-Reply-To: <DE49EB57-0E24-455A-91D2-B767B8ED8576@ipfire.org>
[-- Attachment #1: Type: text/plain, Size: 1794 bytes --]
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:15 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 [this message]
2022-07-14 10:17 ` Michael Tremer
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=e9fc7a97-c975-e32b-e234-e83b3ba6e6dc@ipfire.org \
--to=peter.mueller@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