Gentoo Archives: gentoo-dev

From: David Seifert <soap@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH 2/3] qmail.eclass: remove magic to query root group
Date: Sat, 14 Aug 2021 10:43:32
Message-Id: bdd52ccb246cf3963fbaba1f2181e8435937122b.camel@gentoo.org
In Reply to: Re: [gentoo-dev] [PATCH 2/3] qmail.eclass: remove magic to query root group by Rolf Eike Beer
1 On Fri, 2021-08-13 at 12:31 +0200, Rolf Eike Beer wrote:
2 > Am Freitag, 13. August 2021, 11:06:09 CEST schrieb Ulrich Mueller:
3 > > > > > > > On Fri, 13 Aug 2021, Rolf Eike Beer wrote:
4 > > > Am Donnerstag, 12. August 2021, 19:39:08 CEST schrieb Michael
5 > > > Orlitzky:
6 > > > > On Thu, 2021-08-12 at 17:22 +0200, Rolf Eike Beer wrote:
7 > > > > > The default owner is root:root anyway.
8 > > > >
9 > > > > This is only true of you don't call insopts earlier with some
10 > > > > other
11 > > > > value. I see "insopts -o root -g qmail -m 700" in there so you
12 > > > > might
13 > > > > want to double check.
14 > > >
15 > > > Not my day.
16 > > >
17 > > > Ok, given that there are several places that change users and
18 > > > groups
19 > > > and the subfunctions are not always called it would be very few
20 > > > places
21 > > > where I can remove the root:root (about 3) and be sure that
22 > > > everything
23 > > > works. For that reason I would just keep them all and go back to
24 > > > the
25 > > > initial patch 2.
26 > >
27 > > I believe the method of choice would be to execute the offending
28 > > insopts/doins pair in a subshell, i.e. put a ( ) pair around them.
29 >
30 > I will just do it the other way: explicitly reset it to defaults in
31 > the 2
32 > functions that actually set something special.
33
34 Please us subshells instead, it makes local reasoning about the side-
35 effects much easier.