Bug#1017952: groupadd: invalid group ID '-1' when adding with --uid

2022-08-23 Thread Samuel Thibault
Marc Haber, le mar. 23 août 2022 15:02:04 +0200, a ecrit:
> thanks for spotting this. It was both a bug in the code and a big
> omission in our test suite. Both aspects are fixed now.
> 
> On Mon, Aug 22, 2022 at 10:11:24PM +0200, Samuel Thibault wrote:
> > Package: adduser
> > Version: 3.124
> > Severity: serious
> > Justification: Makes creating chroots fail
> 
> Do have the time to check the code from
> https://salsa.debian.org/debian/adduser/-/tree/debian-bug-1017952 ?

I tried it in my test case and it seems to work, thanks!

Samuel



Bug#1017952: groupadd: invalid group ID '-1' when adding with --uid

2022-08-23 Thread Marc Haber
Hi,

thanks for spotting this. It was both a bug in the code and a big
omission in our test suite. Both aspects are fixed now.

On Mon, Aug 22, 2022 at 10:11:24PM +0200, Samuel Thibault wrote:
> Package: adduser
> Version: 3.124
> Severity: serious
> Justification: Makes creating chroots fail

Do have the time to check the code from
https://salsa.debian.org/debian/adduser/-/tree/debian-bug-1017952 ?

The only file touched to fix the bug is the adduser executable, so you
probably don't even need to build the package.

Greetings
Marc

(MR is https://salsa.debian.org/debian/adduser/-/merge_requests/62 and
still pending team review)

-- 
-
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany|  lose things."Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature |  How to make an American Quilt | Fax: *49 6224 1600421



Bug#1017952: groupadd: invalid group ID '-1' when adding with --uid

2022-08-22 Thread Samuel Thibault
Package: adduser
Version: 3.124
Severity: serious
Justification: Makes creating chroots fail

Hello,

While creating a buildd chroot, I get:

+ sudo chroot /home/buildd/chroots/sid adduser --uid 1001 --disabled-password 
--gecos buildd buildd
Adding user `buildd' ...
Adding new group `buildd' (-1) ...
groupadd: invalid group ID '-1'

It seems that the new code for choosing a gid is broken in 3.124, while
it was fine in 3.123.

Samuel

-- System Information:
Debian Release: bookworm/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 
'testing-debug'), (500, 'stable-security'), (500, 'stable-debug'), (500, 
'proposed-updates-debug'), (500, 'proposed-updates'), (500, 
'oldstable-proposed-updates-debug'), (500, 'oldstable-proposed-updates'), (500, 
'oldoldstable'), (500, 'buildd-unstable'), (500, 'unstable'), (500, 'stable'), 
(500, 'oldstable'), (1, 'experimental-debug'), (1, 'buildd-experimental'), (1, 
'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, arm64

Kernel: Linux 5.19.0 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages adduser depends on:
ii  cdebconf [debconf-2.0]  0.263
ii  debconf [debconf-2.0]   1.5.79
ii  passwd  1:4.11.1+dfsg1-2

adduser recommends no packages.

Versions of packages adduser suggests:
ii  cron3.0pl1-149
ii  liblocale-gettext-perl  1.07-4+b2
ii  perl5.34.0-5

-- debconf information excluded

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.