[Pkg-shadow-devel] Bug#1004710: Bug#1004710: passwd: 4.11.1 breaks mmdebstrap testsuite by empty directories in /var/mail and /var/spool/mail

Bálint Réczey balint at balintreczey.hu
Thu Feb 10 21:46:50 GMT 2022


Control: reassign -1 adduser 3.118
Control: retitle -1 adduser: Please pass "-r" to useradd when creating
system users
Control: tags -1 patch

Hi Johannes,

Johannes Schauer Marin Rodrigues <josch at debian.org> ezt írta (időpont:
2022. febr. 10., Cs, 8:39):
>
> Hi Bálint,
>
> Quoting Bálint Réczey (2022-02-02 00:10:00)
> > > Is the creation of these empty directories intended?
> >
> > I'm not sure yet.
> >
> > > Do you have an explanation why they are only created with debootstrap?
> >
> > Not yet, but thank you for the bug report.
>
> thank you for looking into it! Did you already find out something? The
> mmdebstrap autopkgtests have now been broken for 10 days.

Sorry for the delay, I tried bumping the severity to buy myself some time.

It seems this is an adduser bug and the following patch fixes it:
--- adduser.orig    2018-09-15 21:12:39.000000000 +0200
+++ adduser    2022-02-10 22:27:05.759922091 +0100
@@ -434,7 +434,7 @@
     $shell = $special_shell || '/usr/sbin/nologin';
     $undouser = $new_name;
     my $useradd = &which('useradd');
-    &systemcall($useradd, '-d', $home_dir, '-g', $ingroup_name, '-s',
+    &systemcall($useradd, '-r', '-d', $home_dir, '-g', $ingroup_name, '-s',
         $shell, '-u', $new_uid, $new_name);
     if(!$disabled_login) {
         my $usermod = &which('usermod');

Apparently useradd correctly guessed system user ranges in the past,
but this is not something to rely on.

Cheers,
Balint



More information about the Pkg-shadow-devel mailing list