[Pkg-shadow-devel] [Git][debian/adduser][debian/latest] 5 commits: clarify adduser pool format documentation

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



Marc Haber pushed to branch debian/latest 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

- - - - -


3 changed files:

- AdduserCommon.pm
- adduser.conf
- 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.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/a7de708b76ae341c3a97c1ee62b625382456d4e1...87fdeaad272d2aaf353fc6e4fd0fe39b68d0ded1

-- 
View it on GitLab: https://salsa.debian.org/debian/adduser/-/compare/a7de708b76ae341c3a97c1ee62b625382456d4e1...87fdeaad272d2aaf353fc6e4fd0fe39b68d0ded1
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/21b29704/attachment-0001.htm>


More information about the Pkg-shadow-devel mailing list