[Bug libc/23680] Feature Request: Add functions to convert between UID and group name
carlos at redhat dot com
sourceware-bugzilla@sourceware.org
Wed Sep 19 15:32:00 GMT 2018
https://sourceware.org/bugzilla/show_bug.cgi?id=23680
--- Comment #4 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to Dylan Stephano-Shachter from comment #2)
> Does getgrent not still fetch all group members? This seems like it would
> take just as long as getgrgid. I may not be understanding the function
> correctly.
Yes, you are right, I thought there was a way to prevent that, but it doesn't
seem there is any way to distinguish just the iteration from filling in the
group list.
In general the steps that would be needed here are:
* Explain the use case clearly for this need.
* Gather existing examples from other operating systems to show it has utility.
* Define a new API for applications to use, avoiding the mistakes of other
similar OS interfaces and learning from previous attempts.
* Extend the NSS interfaces and define the API again at the NSS level (this
allows the backends to provide the data you need).
* Start patching all NSS service providers to try to fill in just the
information that is required to implement the interface. Some service provides
themselves may not have APIs that do this, and so you may face an iterative
problem plumbing gid<->[group name] conversion without group membership.
You might only implement this at first for the <files> NSS provider, and leave
it up to others to implement for their own providers, falling back to
setent/getent/endent if they don't provide the new interface.
Not to scare you, but this could take a senior project developer years to
finish.
I think it would be an acceptable change, but it's a lot of work.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list