Re: Is there a way to retrieve UNIX groups from PAM?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Feb 14, 2004 at 09:10:49PM -0600, Steven Ong wrote:
> I'm currently coding a no interactive PAM application. I try to find a way
> to retrieve the UNIX groups through PAM library function (i.e. pam_setcred()
> ) unsuccessfully. I wonder is there a way to retrieve the UNIX groups that
> belongs to a particular user through PAM? That is, after this user has been
> authenticated.

It's not really a PAM thing.  You probably just want to use getgroups(2)
(assuming that your supplementary groups have been set up already,
probably by initgroups(3) or moral equivalent.)  If you are writing the
part that sets the supplementary group list and you for some reason do
not want to use initgroups(3), then you can either use getgrouplist,
which is not available on all systems, or you'll need to cycle through
all groups with getgrent(3) to find the ones that the user in question
is a member of.

-- 
Ed Schmollinger - schmolli@xxxxxxxxxxxxxx

Attachment: pgp00136.pgp
Description: PGP signature


[Index of Archives]     [Fedora Users]     [Kernel]     [Red Hat Install]     [Linux for the blind]     [Gimp]

  Powered by Linux