From: "Peter Müller" <peter.mueller@ipfire.org>
To: development@lists.ipfire.org
Subject: Re: [PATCH v2] ipblocklist: Both "settings" and "modify" need to be writable for "nobody"
Date: Thu, 01 Sep 2022 20:34:47 +0000 [thread overview]
Message-ID: <da5257e2-9775-23d8-c777-6e8462b8390b@ipfire.org> (raw)
In-Reply-To: <A0A4D056-599F-4739-986B-53C0C5F40BAE@ipfire.org>
[-- Attachment #1: Type: text/plain, Size: 2755 bytes --]
Hello Michael,
thanks for your reply and apologies for my belated response.
Stefan pointed out to me that if we would create these files in ipblocklist itself,
they would have became part of the component's rootfile (which was also not updated
in the patch). This would have caused user settings for ipblocklist to be overwritten,
if ipblocklist is updated in a future Core Update.
configroot is the better place, since we must never ship this, and this is where
all the other settings files are created already. Also, file permissions are already
taken care of there.
Version 3 should _finally_ solve the issue. Please let me know if it doesn't.
All the best,
Peter Müller
> Hello,
>
> I was told that this patch isn’t solving the problem it is supposed to solve.
>
> However, I do not see why. Could someone explain to my little brain why?
>
> -Michael
>
>> On 22 Aug 2022, at 21:11, Peter Müller <peter.mueller(a)ipfire.org> wrote:
>>
>> The second version of this patch avoids being generous with file
>> permissions, as Stefan pointed out that /var/ipfire/ipblocklist/sources
>> must not be writable to "nobody".
>>
>> Therefore, the needed files ("settings" and "modify") are prepared
>> during the Core Upgrade and LFS file, and equipped with appropriate
>> permissions.
>>
>> Fixes: #12917
>> Cc: Stefan Schantl <stefan.schantl(a)ipfire.org>
>> Signed-off-by: Peter Müller <peter.mueller(a)ipfire.org>
>> ---
>> config/rootfiles/core/170/update.sh | 4 ++++
>> lfs/ipblocklist-sources | 2 ++
>> 2 files changed, 6 insertions(+)
>>
>> diff --git a/config/rootfiles/core/170/update.sh b/config/rootfiles/core/170/update.sh
>> index b6b66f3f1..9d16f4a32 100644
>> --- a/config/rootfiles/core/170/update.sh
>> +++ b/config/rootfiles/core/170/update.sh
>> @@ -164,6 +164,10 @@ ldconfig
>> mkdir -pv /var/lib/ipblocklist
>> chown nobody:nobody /var/lib/ipblocklist
>>
>> +# Create necessary files for IPBlocklist and set their ownership accordingly (#12917)
>> +touch /var/ipfire/ipblocklist/{settings,modified}
>> +chown nobody:nobody /var/ipfire/ipblocklist/{settings,modified}
>> +
>> # Rebuild fcrontab from scratch
>> /usr/bin/fcrontab -z
>>
>> diff --git a/lfs/ipblocklist-sources b/lfs/ipblocklist-sources
>> index 30b9e94a4..d0ce30350 100644
>> --- a/lfs/ipblocklist-sources
>> +++ b/lfs/ipblocklist-sources
>> @@ -49,5 +49,7 @@ $(TARGET) :
>> @$(PREBUILD)
>> mkdir -p /var/ipfire/ipblocklist
>> install -v -m 0644 $(DIR_SRC)/config/ipblocklist/sources /var/ipfire/ipblocklist
>> + touch /var/ipfire/ipblocklist/{settings,modified}
>> + chown nobody:nobody /var/ipfire/ipblocklist/{settings,modified}
>>
>> @$(POSTBUILD)
>> --
>> 2.35.3
>
next prev parent reply other threads:[~2022-09-01 20:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-22 6:30 [PATCH] ipblocklist: Ensure /var/ipfire/ipblocklist is owned and writable by "nobody" Peter Müller
2022-08-22 8:00 ` Bernhard Bitsch
2022-08-22 20:08 ` Peter Müller
2022-08-22 20:11 ` [PATCH v2] ipblocklist: Both "settings" and "modify" need to be writable for "nobody" Peter Müller
2022-08-25 15:49 ` Michael Tremer
2022-09-01 20:34 ` Peter Müller [this message]
2022-08-22 21:03 ` [PATCH] ipblocklist: Ensure /var/ipfire/ipblocklist is owned and writable by "nobody" Rob Brewer
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=da5257e2-9775-23d8-c777-6e8462b8390b@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