|
Message-ID: <CAHc++QgbrEdREnMyYBtZwUV3zUeOu=xHVtd2eDzuLw7ubV4LmQ@mail.gmail.com>
Date: Thu, 21 Nov 2024 10:47:15 +0100
From: Iker Pedrosa <ipedrosa@...hat.com>
To: musl@...ts.openwall.com
Subject: Inconsistent getent group output with empty groups
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>
Content of type "text/html" skipped
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.