MyWebUniversity.com Home Page
 



Darwin Mac OS X man pages main menu
MBRCHECKMEMBERSHIP(3)   BSD Library Functions Manual   MBRCHECKMEMBERSHIP(3)

NAME
     mbrcheckmembership -- check whether a user is a member of a group

LIBRARY
     Standard C Library (libc, -lc)

SYNOPSIS
     ##include <>

     int
     mbrcheckmembership(uuidt user, uuidt group, int* ismember);

DESCRIPTION
     mbruidtouuid() 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.  ismember 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 ismember is
     set to 1.  If the group uuid is equal to the reserved "everyone" uuid
     (ABCDEFAB-CDEF-ABCD-EFAB-CDEF0000000C), then ismember will be set to 1
     for any valid user.

RETURN VALUES
     mbruidtouuid() will return EIO if it is unable to talk to memberd.  If
     user cannot be found it will return ENOENT.  Note that it makes no
     attempt to determine whether group exists or not.  Querying membership
     about a nonexistant group will simply return the user is not a member.

SEE ALSO
     mbruidtouuid(3)

BSD                            February 3, 2005                            BSD
Darwin Mac OS X man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™