<phoebos>
ehawkvu: I've been preoccupied so haven't worked on it for a few weeks.
<illiliti>
/etc/passwd is not portable either
<illiliti>
see nss if you wonder why
<illiliti>
strictly speaking there is no simple portable way
<illiliti>
that's something posix need to fix actually
<ehawkvu>
On the upside, the 3 systems that I care about (linux, freebsd, and openbsd) all have the same /etc/passwd format
<ehawkvu>
I'm surprised that it isn't standard as of yet
<ehawkvu>
(the way to retrieve the info, not /etc/passwd)
<illiliti>
all these systems support nss in more-or-less way, so /etc/passwd won't work
traidare has quit [Ping timeout: 246 seconds]
<illiliti>
... no matter which format it has. I would rather use non-portable getent utility than deal with this tbh
<illiliti>
because getent is guaranteed to work. parsing /etc/passwd by hand - never
<midfavila`>
can also just target unix systems specifically instead of posix autism
<illiliti>
unix systems support nss since ages
<illiliti>
and/or nscd
<illiliti>
i'm gonna investigate what options would be suitable for posix standardization
<illiliti>
the first obvious option is id -un <id>, but I afraid we lost it since its behavior varies between implementations. some of them always expect username(as standard says), so mandating that id should be supported would be breaking change
<illiliti>
i believe that simplest option would adding a new flag to id to treat username as uid.
<illiliti>
that would allow implementations to implement new behavior while not breaking current
<illiliti>
but another flag means another decade to actually become portable