mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-01-27 02:14:28 +03:00
Add basic groupmember() function, not sup groups.
This commit is contained in:
parent
d3126abe75
commit
06dea10380
@ -61,6 +61,18 @@ crgetgroups(cred_t *cr)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static __inline__ int
|
||||
groupmember(gid_t gid, const cred_t *cr)
|
||||
{
|
||||
/* Primary group check */
|
||||
if ((cr) && (gid == cr->cr_gid))
|
||||
return 1;
|
||||
|
||||
/* Supplemental group check (unsupported) */
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user