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: Wed, 13 Jul 2022 19:48:27 +0000 [thread overview]
Message-ID: <0deb7c1a-60ee-66c2-c92a-333e1325f698@ipfire.org> (raw)
In-Reply-To: <f0374b07-323d-2796-7eac-f48a09a84bbc@ipfire.org>
[-- Attachment #1: Type: text/plain, Size: 1335 bytes --]
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-13 19:48 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 [this message]
2022-07-14 9:34 ` Michael Tremer
2022-07-14 10:15 ` Peter Müller
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=0deb7c1a-60ee-66c2-c92a-333e1325f698@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