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;
|
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
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue