How to get a group id from its name in kernel extension?
How to get a group id from its name in kernel extension?
- Subject: How to get a group id from its name in kernel extension?
- From: Anatol Pomozov <email@hidden>
- Date: Thu, 30 Jun 2011 17:16:58 -0700
Hi,
I my kernel extension I need to check that a user is a member of some group ('admin' in my case). To check it I use kauth_cred_ismember_gid() function. This function accepts group_id as a parameter. So now I need to get the id of the group by its name. We cannot rely on the fact that id of the 'admin' group is always 80, right?
If it was userspace I would use getgrnam() function, but it is not available in the kernel.
What is the best way to get id of the 'admin' group in kext?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden