diff options
Diffstat (limited to 'include/sys')
-rw-r--r-- | include/sys/cred.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/sys/cred.h b/include/sys/cred.h index 1e7d3b7c9..47eeda2cb 100644 --- a/include/sys/cred.h +++ b/include/sys/cred.h @@ -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 |