[Pkg-shadow-devel] [Git][debian/adduser][wip/debian-bugs-1132881] 6 commits: clarify adduser pool format documentation

Marc Haber (@zugschlus) gitlab at salsa.debian.org
Mon Jun 1 05:07:01 BST 2026



Marc Haber pushed to branch wip/debian-bugs-1132881 at Debian / adduser


Commits:
259fed18 by Marc Haber at 2026-06-01T05:51:57+02:00
clarify adduser pool format documentation

Git-Dch: ignore

- - - - -
b979e1ef by Marc Haber at 2026-06-01T05:51:57+02:00
remove trailing slashes from example pool directories

Git-Dch: ignore

- - - - -
402b47dd by Marc Haber at 2026-06-01T05:51:57+02:00
ignore extra fields at the end of pool file lines

- - - - -
febb7a47 by Marc Haber at 2026-06-01T05:51:57+02:00
clarify pool file read warnings

Git-Dch: ignore

- - - - -
87fdeaad by Marc Haber at 2026-06-01T05:51:57+02:00
remove trailing slaehes from pool directories

Git-Dch: ignore

- - - - -
215f4b7b by Marc Haber at 2026-06-01T06:06:59+02:00
streamline log level names.

Closes: #1132881

- - - - -


4 changed files:

- AdduserCommon.pm
- adduser.conf
- doc/adduser.8
- doc/adduser.conf.5


Changes:

=====================================
AdduserCommon.pm
=====================================
@@ -268,11 +268,12 @@ sub read_configfile {
 #  -- a hash for the pool data
 sub read_pool {
     my ($pool_file, $type, $poolref) = @_;
-    my ($name, $id, $comment, $home, $shell);
+    my ($name, $id, $comment, $home, $shell, $rest);
     my %ids = ();
     my %new;
 
     $pool_file = decode($charset, $pool_file);
+    $pool_file =~ s{/?$}{};
     if (-d $pool_file) {
         my $dir;
         unless( opendir( $dir, $pool_file) ) {
@@ -307,10 +308,10 @@ sub read_pool {
         my $new;
 
         if ($type eq "uid") {
-            ($name, $id, $comment, $home, $shell) = split (/:/);
+            ($name, $id, $comment, $home, $shell, $rest) = split (/:/);
             if (!$name || $name !~ /^([_a-zA-Z0-9-]+)$/ ||
                 !defined($id) || $id !~ /^(\d+)$/) {
-                log_warn( mtx("Couldn't parse `%s', line %d."), $pool_file, $.);
+                    log_warn( mtx("Couldn't parse uid line `%s', line %d."), $pool_file, $.);
                 next;
             }
             if( defined $name ) {
@@ -335,10 +336,10 @@ sub read_pool {
                 'shell' => $shell
             };
         } elsif ($type eq "gid") {
-            ($name, $id) = split (/:/);
+            ($name, $id, $rest) = split (/:/);
             if (!$name || $name !~ /^([_a-zA-Z0-9-]+)$/ ||
                 !defined($id) || $id !~ /^(\d+)$/) {
-                log_warn( mtx("Couldn't parse `%s', line %d."), $pool_file, $. );
+                    log_warn( mtx("Couldn't parse gid line `%s', line %d."), $pool_file, $. );
                 next;
             }
             if( defined $name ) {


=====================================
adduser.conf
=====================================
@@ -49,9 +49,9 @@
 
 # Specify a file or a directory containing UID and GID pool.
 #UID_POOL=/etc/adduser-pool.conf
-#UID_POOL=/etc/adduser-pool.d/
+#UID_POOL=/etc/adduser-pool.d
 #GID_POOL=/etc/adduser-pool.conf
-#GID_POOL=/etc/adduser-pool.d/
+#GID_POOL=/etc/adduser-pool.d
 #RESERVE_UID_POOL=yes
 #RESERVE_GID_POOL=yes
 


=====================================
doc/adduser.8
=====================================
@@ -555,9 +555,9 @@ Every message that \fBadduser\fR prints has a priority value
 assigned by the authors.
 This priority can not be changed at run time.
 Available priority values are
-\fBcrit\fR,
+\fBfatal\fR,
 \fBerror\fR,
-\fBwarning\fR,
+\fBwarn\fR,
 \fBinfo\fR,
 \fBdebug\fR,
 and


=====================================
doc/adduser.conf.5
=====================================
@@ -203,6 +203,8 @@ shell (ditto).
 .PP
 It is possible to use the same file/directory for
 \fBUID_POOL\fP and \fBGID_POOL\fP.
+But you cannot copy lines from \fI/etc/passwd\fP or \fI/etc/group\fP
+since pool file lines have less fields.
 .PP
 If an account / group is created,
 \fBadduser\fP(8) searches in all UID/GID pool files



View it on GitLab: https://salsa.debian.org/debian/adduser/-/compare/2dd95db3d68a3622e3139c9f751c995eb2f4238b...215f4b7b45bccfa86ad32c02ecca799f729d3370

-- 
View it on GitLab: https://salsa.debian.org/debian/adduser/-/compare/2dd95db3d68a3622e3139c9f751c995eb2f4238b...215f4b7b45bccfa86ad32c02ecca799f729d3370
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-shadow-devel/attachments/20260601/2cce2e05/attachment-0001.htm>


More information about the Pkg-shadow-devel mailing list