Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Sep 2025 10:54:43 +0200
From:      Olivier Certner <olce@freebsd.org>
To:        Yasuhiro Kimura <yasu@freebsd.org>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Possible incompatible change with initgroups(3)?
Message-ID:  <3124332.hHqAuc6tWs@ravel>
In-Reply-To: <20250920.080248.183796883139076827.yasu@FreeBSD.org>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
Hi Yasuhiro,

> I checked commit log between b0e7b55a0e90 and b3468202994f, and found
> following one.
> 
> ----------------------------------------------------------------------
> commit 0b018cfd81d8
> Author:     Olivier Certner <olce@FreeBSD.org>
> AuthorDate: Tue Sep 16 17:52:20 2025 +0200
> Commit:     Olivier Certner <olce@FreeBSD.org>
> CommitDate: Wed Sep 17 14:16:06 2025 +0200
> 
>     initgroups(3): Fix return value on allocation failure
>     
> (snip)
> ----------------------------------------------------------------------
> 
> According to commit message, it is likely that the commit introduces
> some incompatibility with initgroups(3) and that it causes error
> messages of Postfix.

This commit has absolutely nothing to do with what you are observing:
----------------------------------------------------------------------
Sep 20 03:00:11 rolling-vm-freebsd1 postfix/qmgr[2634]: fatal: initgroups: Socket operation on non-socket
Sep 20 03:00:11 rolling-vm-freebsd1 postfix/pickup[2635]: fatal: initgroups: Socket operation on non-socket
Sep 20 03:01:00 rolling-vm-freebsd1 postfix/showq[66274]: fatal: initgroups: Socket operation on non-socket
----------------------------------------------------------------------
There is no sign of out-of-memory anywhere here.  It is true that this commit introduces a slight incompatibility, but we sometimes do that for bug fixes and in this case there should be only benefits (programs test for failure either with 'error != 0', which hasn't changed, or 'error == -1', which now will work correctly, preventing the program to continue without the expected credentials, or 'error < 0', same).

The culprit is without doubt https://cgit.freebsd.org/src/commit/?id=9dc1ac8691966480, whose purpose is precisely to restore initgroups(3) compatibility that was lost after getgroups(2)/setgroups(2) semantics change.

Why the symbol versioning mechanisms we are leveraging there don't work as intended isn't yet clear (to me at least), but this is clearly a bug as our intent is precisely that nobody has to recompile anything for things to continue working as before.  FYI, we are pursuing that in https://reviews.freebsd.org/D52641.

Thanks and regards.

-- 
Olivier Certner
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----

iQIzBAABCQAdFiEEmNCxHjkosai0LYIujKEwQJceJicFAmjOa9MACgkQjKEwQJce
Jif0BxAAtMyLZZxXf6IWA8LNuaxFJV9ugNb8rQ5eYYYB2niEDdn+RfN2sxBFMlLv
Yz/Of52+KPXh0/KYsnVr4oY0NFm7rAbOJvFKAH1sr+uZrbjKJXt1nmSqi3R9LEIA
Ug6G7nSl8AfQmasqBvKVDw66LkpUnXUCPtWGGWSbLOJ3iEVbUYrKZM/W63wQPgS9
zDYlw3kWrnySBDeLK5P/nzZUHe6bolEtkjx2pwAGtCb2uNv6DntPDn6v9glfWC4M
UUUi2p5u4uy4B9xmi0esEugPJQsl0tHBicTFQS9ZS2WU59paVMCAMJBOeC+tlxDD
JQv4k0Hz/G9gvpe7Rl6lMPQB8pj97RcYTajxrKYonMqAaeOOfcWW4IkmJetVx722
fBWZ1Gw2s9NrUqq3BMdpd5GDYXBc6SjyByMEhHthboiR2kfimu35Y2CEWuo3Wbyd
iRdRJAeIvD22NtMC4dBlLWYr19WBflnSm4Xwvq000OEbTAQio+NLss+P6zKDK8S0
fkRg4dYQaDSLSVb8Rtg5pwHZW4Ef/8P4deOi1QkrUa/mUPJlIhRuTC0nospNr0aI
1g62v+5w2ur7bv9GtIbBmLsqNEwKyeipUp0aQC6xrgExqyzglOkZEqKqr6j6Ng0a
HQk3J1QeSp9wi+907DANRnSVjGG4WP13Wl7szFLc8aa/SsFEG4c=
=0Hzo
-----END PGP SIGNATURE-----
help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3124332.hHqAuc6tWs>