GNU bug report logs - #45570
operating-system definitions allow duplicate passwd and group entries

Previous Next

Package: guix;

Reported by: Jason Conroy <conjaroy <at> gmail.com>

Date: Thu, 31 Dec 2020 18:15:02 UTC

Severity: normal

Done: Leo Prikler <leo.prikler <at> student.tugraz.at>

Bug is archived. No further changes may be made.

Full log


Message #41 received at 45570 <at> debbugs.gnu.org (full text, mbox):

From: Leo Prikler <leo.prikler <at> student.tugraz.at>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 45570 <at> debbugs.gnu.org, conjaroy <at> gmail.com
Subject: Re: [PATCH v2] system: Assert, that user and group names are unique.
Date: Thu, 07 Jan 2021 12:13:31 +0100
Am Donnerstag, den 07.01.2021, 09:35 +0100 schrieb Ludovic Courtès:
> Leo Prikler <leo.prikler <at> student.tugraz.at> skribis:
> 
> > *gnu/system/shadow.scm (find-duplicates): New variable.
> > (assert-unique-account-names, assert-unique-group-names): New
> > variables.
> > (account-activation): Use them here.
> 
> Final nitpicks!  :-)
> 
> > +(define (find-duplicates list)
> 
> Please add a docstring.
Done, see v3.

> > +  (let loop ((table (make-hash-table))
> > +             (list list))
> 
> You can move ‘table’ out of the ‘loop’ arguments since it’s mutated
> anyway.
I don't see any benefit from doing so, however.  It'd be an additional
layer of mutation and if we ever wanted to change to vhashes or alists
we'd have to refactor that.  

Regards,
Leo





This bug report was last modified 4 years and 217 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.