Debian Bug report logs - #900354
lintian: warn against guarding adduser/addgroup calls

Package: lintian; Maintainer for lintian is Debian Lintian Maintainers <[email protected]>; Source for lintian is src:lintian (PTS, buildd, popcon).

Reported by: Julien Cristau <[email protected]>

Date: Tue, 29 May 2018 12:27:02 UTC

Severity: wishlist

Tags: moreinfo

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], Debian Lintian Maintainers <[email protected]>:
Bug#900354; Package lintian. (Tue, 29 May 2018 12:27:04 GMT) (full text, mbox, link).


Acknowledgement sent to Julien Cristau <[email protected]>:
New Bug report received and forwarded. Copy sent to Debian Lintian Maintainers <[email protected]>. (Tue, 29 May 2018 12:27:04 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: Julien Cristau <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: lintian: warn against guarding adduser/addgroup calls
Date: Tue, 29 May 2018 14:22:31 +0200
Package: lintian
Severity: wishlist

<@weasel> not that I'd file a bug about this, but I don't like this pattern:
<@weasel>     if ! getent group "$REPRO_GROUP" >/dev/null; then
<@weasel>         addgroup --system "$REPRO_GROUP" || exit 1
<@weasel>     fi
<@weasel> the goal of --system is to a) not fail if the group exists and
is a system group
<@weasel> but also, to b) fail if the group exists and isn't a system group
<@jcristau> ack
<@weasel> since in that case we don't want to use that group as it might
be for whoknowswhat.
<@weasel> maybe this is something that should be brought to the
attention of qa, release, or the developers at large.
<@weasel> "guarding adduser calls considered harmful"
<@jcristau> seems like something lintian could catch
<@weasel> yup

Cheers,
Julien



Information forwarded to [email protected], Debian Lintian Maintainers <[email protected]>:
Bug#900354; Package lintian. (Tue, 29 May 2018 14:30:12 GMT) (full text, mbox, link).


Acknowledgement sent to Chris Lamb <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian Lintian Maintainers <[email protected]>. (Tue, 29 May 2018 14:30:12 GMT) (full text, mbox, link).


Message #10 received at [email protected] (full text, mbox, reply):

From: Chris Lamb <[email protected]>
To: Julien Cristau <[email protected]>, [email protected]
Subject: Re: Bug#900354: lintian: warn against guarding adduser/addgroup calls
Date: Tue, 29 May 2018 15:28:11 +0100
tags 900354 + moreinfo
thanks

Hi Julien,

Thanks for the report.

> <@weasel> "guarding adduser calls considered harmful"

… regardless of --system or? oh, some concrete examples of "good" and
"bad" would be really helpful here in ensuring we implement exactly
what you after if you could spend a couple of seconds on that?


Best wishes,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      [email protected] / chris-lamb.co.uk
       `-



Added tag(s) moreinfo. Request was from Chris Lamb <[email protected]> to [email protected]. (Tue, 29 May 2018 14:30:13 GMT) (full text, mbox, link).


Information forwarded to [email protected], Debian Lintian Maintainers <[email protected]>:
Bug#900354; Package lintian. (Tue, 29 May 2018 14:36:02 GMT) (full text, mbox, link).


Acknowledgement sent to Julien Cristau <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian Lintian Maintainers <[email protected]>. (Tue, 29 May 2018 14:36:03 GMT) (full text, mbox, link).


Message #17 received at [email protected] (full text, mbox, reply):

From: Julien Cristau <[email protected]>
To: Chris Lamb <[email protected]>, [email protected], Peter Palfrader <[email protected]>
Subject: Re: Bug#900354: lintian: warn against guarding adduser/addgroup calls
Date: Tue, 29 May 2018 16:33:21 +0200
On 05/29/2018 04:28 PM, Chris Lamb wrote:
> tags 900354 + moreinfo
> thanks
> 
> Hi Julien,
> 
> Thanks for the report.
> 
>> <@weasel> "guarding adduser calls considered harmful"
> 
> … regardless of --system or? oh, some concrete examples of "good" and
> "bad" would be really helpful here in ensuring we implement exactly
> what you after if you could spend a couple of seconds on that?
> 
I would think adduser/addgroup without --system in maintainer scripts
should be verboten altogether.  I'll try to poke through codesearch to
find other examples later.

Cheers,
Julien



Information forwarded to [email protected], Debian Lintian Maintainers <[email protected]>:
Bug#900354; Package lintian. (Fri, 01 Jun 2018 08:27:03 GMT) (full text, mbox, link).


Acknowledgement sent to Chris Lamb <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian Lintian Maintainers <[email protected]>. (Fri, 01 Jun 2018 08:27:03 GMT) (full text, mbox, link).


Message #22 received at [email protected] (full text, mbox, reply):

From: Chris Lamb <[email protected]>
To: Julien Cristau <[email protected]>, [email protected], Peter Palfrader <[email protected]>
Subject: Re: Bug#900354: lintian: warn against guarding adduser/addgroup calls
Date: Fri, 01 Jun 2018 09:22:44 +0100
Dear Julien,

> >> <@weasel> "guarding adduser calls considered harmful"
> > 
> > … regardless of --system or? oh, some concrete examples of "good" and
> > "bad" would be really helpful here in ensuring we implement exactly
> > what you after if you could spend a couple of seconds on that?
> > 
> I would think adduser/addgroup without --system in maintainer scripts
> should be verboten altogether.  I'll try to poke through codesearch to
> find other examples later.

Great stuff — looking forward to receiving these. :)


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      [email protected] / chris-lamb.co.uk
       `-



Information forwarded to [email protected], Debian Lintian Maintainers <[email protected]>:
Bug#900354; Package lintian. (Mon, 14 Jan 2019 23:57:02 GMT) (full text, mbox, link).


Acknowledgement sent to Chris Lamb <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian Lintian Maintainers <[email protected]>. (Mon, 14 Jan 2019 23:57:03 GMT) (full text, mbox, link).


Message #27 received at [email protected] (full text, mbox, reply):

From: Chris Lamb <[email protected]>
To: Julien Cristau <[email protected]>, [email protected], Peter Palfrader <[email protected]>
Subject: Re: Bug#900354: lintian: warn against guarding adduser/addgroup calls
Date: Mon, 14 Jan 2019 23:52:30 +0000
Chris Lamb wrote:

> > >> <@weasel> "guarding adduser calls considered harmful"
> > > 
> > > … regardless of --system or? oh, some concrete examples of "good" and
> > > "bad" would be really helpful here in ensuring we implement exactly
> > > what you after if you could spend a couple of seconds on that?
> > > 
> > I would think adduser/addgroup without --system in maintainer scripts
> > should be verboten altogether.  I'll try to poke through codesearch to
> > find other examples later.
> 
> Great stuff — looking forward to receiving these. :)

Gentle ping on this, Julien?


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      [email protected] / chris-lamb.co.uk
       `-



Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Tue May 13 09:06:16 2025; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.