mbr_check_membership.3 [plain text]
.Dd February 3, 2005
.Dt MBR_CHECKMEMBERSHIP 3
.Nd check whether a user is a member of a group
.Fn mbr_check_membership "uuid_t user" "uuid_t group" "int* ismember"
eliminates the 16 group limit inherent in getgroups(3). It will always return if
a given user is a member of a given group, even if the membership is due to nesting of groups.
is set to 1 if the user is a member of the group, and 0 otherwise.
There are two special cases. If the two uuids are equal, then
is set to 1. If the
uuid is equal to the reserved "everyone" uuid (ABCDEFAB-CDEF-ABCD-EFAB-CDEF0000000C), then
will be set to 1 for any valid user.
.Sh RETURN VALUES
will return EIO if it is unable to talk to memberd. If
cannot be found it will return ENOENT. Note that it makes no attempt to determine whether
exists or not. Querying membership about a nonexistant group will simply return the user is not a
.Sh SEE ALSO
.Xr mbr_uid_to_uuid 3