Re: s6-envuidgid: Weird errors with GNU libc's getgrent() and endgrent()

2019-07-07 Thread Guillermo
El dom., 2 jun. 2019 a las 5:53, Laurent Bercot escribió: > > So I'd advise reporting the bug to the glibc maintainers. By the way, Gentoo's toolchain maintainers agreed, so this became upstream bug #24696. A fix, currently in its 8th iteration after several rounds of reviews, is in preparation,

Re: s6-envuidgid: Weird errors with GNU libc's getgrent() and endgrent()

2019-06-11 Thread Brett Neumeier
On Mon, Jun 10, 2019 at 9:10 PM Guillermo wrote: > El lun., 10 jun. 2019 a las 4:13, Casper Ti. Vector escribió: > > > /etc/nsswitch.conf, which I don't recall having ever modified, says: > > > group: db files > /etc/nsswitch.conf is 'owned' by sys-libs/glibc, and Gentoo's default > comes

Re: s6-envuidgid: Weird errors with GNU libc's getgrent() and endgrent()

2019-06-11 Thread Peter Pentchev
On Tue, Jun 11, 2019 at 04:49:04PM +0800, Casper Ti. Vector wrote: > On Tue, Jun 11, 2019 at 11:20:13AM +0300, Peter Pentchev wrote: > > Neither the glibc manual page nor the POSIX text say anything about > > endgrent() setting errno or leaving it alone, > > Well, it seems that the current POSIX

Re: s6-envuidgid: Weird errors with GNU libc's getgrent() and endgrent()

2019-06-10 Thread Casper Ti. Vector
On Mon, Jun 10, 2019 at 11:10:13PM -0300, Guillermo wrote: > /etc/nsswitch.conf is 'owned' by sys-libs/glibc, and Gentoo's default > comes directly from the libc's source package: So Gentoo follows the upstream more closely, and the upstream default would now result in the problem. I think this

Re: s6-envuidgid: Weird errors with GNU libc's getgrent() and endgrent()

2019-06-10 Thread Guillermo
El lun., 10 jun. 2019 a las 4:13, Casper Ti. Vector escribió: > > > /etc/nsswitch.conf, which I don't recall having ever modified, says: > > group: db files > > Try using `qfile -o' to find the owner, and subsequently how it should > originally have been? (I used Gentoo for several years before

Re: s6-envuidgid: Weird errors with GNU libc's getgrent() and endgrent()

2019-06-10 Thread Casper Ti. Vector
On Sun, Jun 09, 2019 at 05:28:49PM -0300, Guillermo wrote: > /etc/nsswitch.conf, which I don't recall having ever modified, says: > group: db files Try using `qfile -o' to find the owner, and subsequently how it should originally have been? (I used Gentoo for several years before migrating to

Re: s6-envuidgid: Weird errors with GNU libc's getgrent() and endgrent()

2019-06-09 Thread Laurent Bercot
But it turns out that, with this configuration, __nss_endent() *also* wants to call the implementation of endgrent(3) from each of these services. And the one from libnss_db.so, named _nss_db_endgrent(), is just a wrapper around a munmap(2) system call, via an intermediate internal_endent()

Re: s6-envuidgid: Weird errors with GNU libc's getgrent() and endgrent()

2019-06-03 Thread Laurent Bercot
Adelie (musl-posix) must be getting really close to replacing sysv/openrc with full s6. sysv is done: on Adélie, you can now choose between sysvinit and s6-linux-init as your init system. Both are supported. Providing a packaged alternative to OpenRC, however, will be much more difficult

Re: s6-envuidgid: Weird errors with GNU libc's getgrent() and endgrent()

2019-06-03 Thread Casper Ti. Vector
On Mon, Jun 03, 2019 at 08:36:00AM +, fungal-net wrote: > Void (both glibc and musl) have had the whole s6 suite and skarnet libs > on its repositories for all (xx) architectures. s6-rc doesn't work out > of the box though (tried and tried, I don't know enough to get it > working). I can

Re: s6-envuidgid: Weird errors with GNU libc's getgrent() and endgrent()

2019-06-03 Thread fungal-net
Brett Neumeier: > On Sun, Jun 2, 2019 at 10:02 AM Guillermo wrote: > >> El dom., 2 jun. 2019 a las 3:27, Casper Ti. Vector escribió: >>> >>> On my machine using Void with glibc 2.29 since 20190305 >> >> Yay! I thought chances of hearing from someone who uses a GNU >> libc-based distribution that

Re: s6-envuidgid: Weird errors with GNU libc's getgrent() and endgrent()

2019-06-02 Thread Guillermo
El dom., 2 jun. 2019 a las 12:21, Brett Neumeier escribió: > > FWIW, I compiled and ran your test program; the program output concludes with: > > name: ec2user members: (errno = Invalid argument) > End of file or error (errno = Success) > errno = Success Huh. So it looks like I've got a

Re: s6-envuidgid: Weird errors with GNU libc's getgrent() and endgrent()

2019-06-02 Thread Casper Ti. Vector
On Sun, Jun 02, 2019 at 12:02:04PM -0300, Guillermo wrote: > Do you happen to build skarnet.org packages statically linked to musl > on those Void machines, or do you let them link to the distribution's > libc? On both Alpine and Void, I use the stock packages for skaware from the distros, and

Re: s6-envuidgid: Weird errors with GNU libc's getgrent() and endgrent()

2019-06-02 Thread Laurent Bercot
Short version: For recent libc releases, and at least on Gentoo, getgrent() and endgrent() seem to magically set errno to EINVAL (I think), except when errno's value is actually meaningful. > (...) End of file or error (errno = Success) errno = Invalid argument POSIX says:

Re: s6-envuidgid: Weird errors with GNU libc's getgrent() and endgrent()

2019-06-02 Thread Casper Ti. Vector
On Sat, Jun 01, 2019 at 11:55:57PM -0300, Guillermo wrote: > Sooo... thoughts? Does anyone else use a sufficiently recent version > of GNU libc and experience the same? On my machine using Void with glibc 2.29 since 20190305, I never encountered this issue. I can confirm the behaviour you