Re: [PATCH] getusershell: Work around musl bugs.

2024-05-20 Thread Bruno Haible
Hi Collin, > >> It looks like the current code wants drive-prefixes accepted, i.e. > >> 'c:/ugly/windows/stuff'. > > > > ?? I don't see such code in gnulib/lib/getusershell.c. > > It is defined in the 'ADDITIONAL_DEFAULT_SHELLS' macro [1]: > > > #if ! defined ADDITIONAL_DEFAULT_SHELLS &&

Re: [PATCH] getusershell: Work around musl bugs.

2024-05-20 Thread Collin Funk
Hi Bruno, On 5/20/24 3:28 AM, Bruno Haible wrote: >> It looks like the current code wants drive-prefixes accepted, i.e. >> 'c:/ugly/windows/stuff'. > > ?? I don't see such code in gnulib/lib/getusershell.c. It is defined in the 'ADDITIONAL_DEFAULT_SHELLS' macro [1]: #if ! defined

Re: [PATCH] getusershell: Work around musl bugs.

2024-05-20 Thread Bruno Haible
Collin Funk wrote: > It looks like the current code wants drive-prefixes accepted, i.e. > 'c:/ugly/windows/stuff'. ?? I don't see such code in gnulib/lib/getusershell.c. > That sort of breaks the behavior of glibc and BSD where: > > input -> getusershell () output > 'bin/bash' ->

Re: [PATCH] getusershell: Work around musl bugs.

2024-05-19 Thread Collin Funk
On 5/19/24 7:17 PM, Bruno Haible wrote: > You don't need an Alpine Linux machine to debug this. You can debug it > on a glibc system like this: > 1. create a testdir for the module getusershell, > 2. configure through >ac_cv_func_getusershell=no ./configure > 3. use the unit test, or

Re: [PATCH] getusershell: Work around musl bugs.

2024-05-19 Thread Bruno Haible
Collin Funk wrote: > Sadly, it looks like this uncovered that the gnulib version is buggy > too. You don't need an Alpine Linux machine to debug this. You can debug it on a glibc system like this: 1. create a testdir for the module getusershell, 2. configure through

Re: [PATCH] getusershell: Work around musl bugs.

2024-05-19 Thread Collin Funk
Hi Bruno, On 5/19/24 5:03 PM, Bruno Haible wrote: > Perfect. Thanks a lot! Sadly, it looks like this uncovered that the gnulib version is buggy too. Given this etc/shells: # valid login shells /bin/sh # abc /bin/ash # 123 /bin/bash # def

Re: [PATCH] getusershell: Work around musl bugs.

2024-05-19 Thread Bruno Haible
Collin Funk wrote: > + getusershell: Work around musl bugs. > + Reported by Bruno Haible in > + . > + * doc/glibc-functions/getusershell.texi: Mention the musl bug. > + * lib/unistd.in.h (getusershell,

[PATCH] getusershell: Work around musl bugs.

2024-05-19 Thread Collin Funk
Reported by Bruno Haible in . * doc/glibc-functions/getusershell.texi: Mention the musl bug. * lib/unistd.in.h (getusershell, setusershell, endusershell): Allow the functions to be declared with the rpl_ prefix. *