From: "Peter Müller" <peter.mueller@ipfire.org>
To: development@lists.ipfire.org
Subject: Re: [PATCH] Core Update 170: Harden mount options of /boot on existing installations
Date: Thu, 07 Jul 2022 14:44:47 +0000 [thread overview]
Message-ID: <23602f69-4d51-93b2-9eae-7fe431c3a305@ipfire.org> (raw)
In-Reply-To: <02519BDF-823F-43F9-8A13-9D3D657E963C@ipfire.org>
[-- Attachment #1: Type: text/plain, Size: 1817 bytes --]
Hello Michael,
thanks for your reply.
> Hello,
>
>> On 6 Jul 2022, at 20:36, Peter Müller <peter.mueller(a)ipfire.org> wrote:
>>
>> Signed-off-by: Peter Müller <peter.mueller(a)ipfire.org>
>> ---
>> config/rootfiles/core/170/update.sh | 5 ++++-
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/config/rootfiles/core/170/update.sh b/config/rootfiles/core/170/update.sh
>> index 8edb5ff2e..c9744f5f5 100644
>> --- a/config/rootfiles/core/170/update.sh
>> +++ b/config/rootfiles/core/170/update.sh
>> @@ -49,8 +49,11 @@ ldconfig
>>
>> # Start services
>>
>> +# 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 is probably longer than it needs to. To keep regular expressions more readable, I would suggest the following:
>
> * Use \s instead of [[:space:]]. The latter is probably easier if you are not familiar with \s, but very hard to read.
I would prefer that too, but sed does not understand PCRE (tested on C168, did not work).
> * If you know that you are going to have slashes, use a different delimiter character. So instead of s/A\/B/C\/D/ you could also write s(a)A/B(a)C/D@ which is a lot easier to read.
ACK, good point.
> * I am not convinced editing /etc/fstab like this is a good idea, but we don’t seem to have any other option.
>
>> +
>> # This update needs a reboot...
>> -#touch /var/run/need_reboot
>> +touch /var/run/need_reboot
>
> Why do we need to reboot? Can we not remount?
Indeed. At this point, all the other stuff in C170 does not require a reboot yet.
Thanks, and best regards,
Peter Müller
>
>>
>> # Finish
>> /etc/init.d/fireinfo start
>> --
>> 2.35.3
>
prev parent reply other threads:[~2022-07-07 14:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-06 18:36 Peter Müller
2022-07-07 14:39 ` Michael Tremer
2022-07-07 14:44 ` Peter Müller [this message]
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=23602f69-4d51-93b2-9eae-7fe431c3a305@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