Roger Leigh <rle...@codelibre.net> writes:
> On Sat, May 15, 2010 at 02:34:57PM -0700, Russ Allbery wrote:

>> That's a good idea.  I'm not sure if all UNIX group systems allow one
>> to ask how many users are a member of a particular group, but if
>> there's a way to ask that question at least in those group systems that
>> support it, the implementation should be fairly straightforward.

> The standard getgrnam/getgrgid (or the _r variants) are competely
> portable and give you the list of users who are group members (so a
> simple check through the user list is quick and easy).  From the shell
> "getent group $group" should return an empty user list.

I was thinking more in terms of access restrictions than APIs.  Being able
to ask who is a member of a particular group is a potential privacy
violation, so I wasn't sure if there were group systems in widespread use
that would refuse to tell you any information about anyone other than
yourself unless you had root or similar elevated credentials.

-- 
Russ Allbery (r...@debian.org)               <http://www.eyrie.org/~eagle/>


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/87bpcgpxkg....@windlord.stanford.edu

Reply via email to