* [musl] Inconsistent getent group output with empty groups
@ 2024-11-21 9:47 Iker Pedrosa
2024-11-21 10:58 ` Leah Neukirchen
0 siblings, 1 reply; 3+ messages in thread
From: Iker Pedrosa @ 2024-11-21 9:47 UTC (permalink / raw)
To: musl
[-- Attachment #1: Type: text/plain, Size: 1558 bytes --]
Dear Mailing List,
I've encountered an inconsistency in the output of getent group on Alpine
Linux when a group has no members.
*Issue:*
When a group doesn't contain any members, getent group omits the trailing
colon in the output, resulting in only three fields instead of the expected
four. This behavior differs from systems using glibc, where getent group
consistently includes the trailing colon, even for empty groups.
*Examples:*
Alpine Linux (musl-utils):
$ getent group test
test:!:1000 <- Missing the last colon
$ getent group root
root:x:0:root <- Colon present when members exist
glibc-based System:
$ getent group test
test:!:1000: <- Colon present even with no members
*Impact:*
This inconsistency causes issues when parsing the output of getent group
with tools like Python's jc library
<https://kellyjonbrazil.github.io/jc/docs/>, which expect a consistent
number of fields.
*Environment:*
Operating System: Alpine Linux
getent provider: musl-utils
*Possible Solution:*
Ensure getent group consistently includes the trailing colon in its output,
even for groups without members, to align with the behavior observed in
glibc-based systems.
Please let me know if you require any further information or clarification.
Thank you for your time and attention to this matter.
--
Iker Pedrosa
Senior Software Engineer, Identity Management team
Red Hat <https://www.redhat.com>
Txapela (gorria) buruan eta ibili munduan
(Red) hat on his head and walk the world
Basque proverb
<https://www.redhat.com>
[-- Attachment #2: Type: text/html, Size: 3677 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [musl] Inconsistent getent group output with empty groups
2024-11-21 9:47 [musl] Inconsistent getent group output with empty groups Iker Pedrosa
@ 2024-11-21 10:58 ` Leah Neukirchen
2024-11-21 11:52 ` Iker Pedrosa
0 siblings, 1 reply; 3+ messages in thread
From: Leah Neukirchen @ 2024-11-21 10:58 UTC (permalink / raw)
To: Iker Pedrosa; +Cc: musl
Iker Pedrosa <ipedrosa@redhat.com> writes:
> Dear Mailing List,
> I've encountered an inconsistency in the output of getent group on Alpine
> Linux when a group has no members.
This code is unrelated to the musl project itself, you should file a bug at
https://gitlab.alpinelinux.org/alpine/aports/-/issues instead.
cu,
--
Leah Neukirchen <leah@vuxu.org> https://leahneukirchen.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [musl] Inconsistent getent group output with empty groups
2024-11-21 10:58 ` Leah Neukirchen
@ 2024-11-21 11:52 ` Iker Pedrosa
0 siblings, 0 replies; 3+ messages in thread
From: Iker Pedrosa @ 2024-11-21 11:52 UTC (permalink / raw)
To: Leah Neukirchen; +Cc: musl
[-- Attachment #1: Type: text/plain, Size: 879 bytes --]
Hi Leah,
Thank you for the information. I opened
https://gitlab.alpinelinux.org/alpine/aports/-/issues/16633 to track it.
On Thu, Nov 21, 2024 at 11:59 AM Leah Neukirchen <leah@vuxu.org> wrote:
> Iker Pedrosa <ipedrosa@redhat.com> writes:
>
> > Dear Mailing List,
> > I've encountered an inconsistency in the output of getent group on Alpine
> > Linux when a group has no members.
>
> This code is unrelated to the musl project itself, you should file a bug at
> https://gitlab.alpinelinux.org/alpine/aports/-/issues instead.
>
> cu,
> --
> Leah Neukirchen <leah@vuxu.org> https://leahneukirchen.org/
>
>
--
Iker Pedrosa
Senior Software Engineer, Identity Management team
Red Hat <https://www.redhat.com>
Txapela (gorria) buruan eta ibili munduan
(Red) hat on his head and walk the world
Basque proverb
<https://www.redhat.com>
[-- Attachment #2: Type: text/html, Size: 3435 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-11-21 11:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-21 9:47 [musl] Inconsistent getent group output with empty groups Iker Pedrosa
2024-11-21 10:58 ` Leah Neukirchen
2024-11-21 11:52 ` Iker Pedrosa
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).