sec_rgy_pgo_get_members-Returns the membership list for a specified group or organization or returns the set of groups in which the specified principal is a member
An opaque handle bound to a secd server. Use sec_rgy_site_open() to acquire a bound handle.
This variable specifies whether go_name identifies a principal, group, or organization. The valid values are as follows:
The go_name parameter identifies a group.
The go_name parameter identifies an organization.
The go_name parameter identifies an principal.
A character string (type sec_rgy_name_t) that contains the name of a group, organization, or principal. If go_name is the name of a group or organization, the call returns the group's or organization's member list. If go_name is the name of a principal, the call returns a list of all groups in which the principal is a member. (Contrast this with the sec_rgy_acct_get_proj() call, which returns only those groups in which the principal is a member and that have been marked to be included in the principal's project list.)
A signed32 variable containing the allocated dimension of the member_list array. This is the maximum number of members or groups that can be returned by a single call.
An opaque pointer to a specific entry in the membership list or list of groups. The returned list begins with the entry specified by member_cursor. Upon return, the cursor points to the next entry after the last one returned. If there are no more entries, the routine returns the value sec_rgy_no_more_entries in the status parameter. Use sec_rgy_cursor_reset() to reset the cursor to the beginning of the list.
An array of character strings to receive the returned member or group names. The size allocated for the array is given by max_number. If this value is less than the total number of members or group names, multiple calls must be made to return all of the members or groups.
A pointer to a signed32 variable to receive the number of members or groups actually returned in member_list.
A pointer to a signed32 variable to receive the total number of members or groups. If this number is greater than number_supplied, multiple calls to sec_rgy_pgo_get_members() are necessary. Use the member_cursor parameter to coordinate successive calls.
A pointer to the completion status. On successful completion, status is assigned error_status_ok. Otherwise, it returns an error.
The sec_rgy_pgo_get_members() routine returns a list of the members in the specified group or organization, or a list of groups in which a specified principal is a member.
The member_cursor parameter specifies the starting point for the search through the registry database. It provides an automatic place holder in the database. The routine automatically updates member_cursor to point to the next member or group (if any) after the returned list. If not all of the members or groups are returned, the updated cursor can be supplied on successive calls to return the remainder of the list.
Permissions RequiredThe sec_rgy_pgo_get_members() routine requires the r (read) permission on the group, organization, or principal object specified by go_name.
There are several different types of cursors used in the registry API. Some cursors point to PGO items, others point to members in a membership list, and others point to account data. Do not use a cursor for one sort of object in a call expecting another sort of object. For example, you cannot use the same cursor on a call to sec_rgy_acct_get_projlist() and sec_rgy_pgo_get_next(). The behavior in this case is undefined.
Furthermore, cursors are specific to a server. A cursor pointing into one replica of the registry database is useless as a pointer into another replica.
Use sec_rgy_cursor_reset() to renew a cursor for use with another call or for another server.
The routine returns:
- The names of the groups or members in member_list
- The number of members or groups returned by the call in number_supplied
- The total number of members in the group or organization, or the total number of groups in which the principal is a member in number_members
The idl file from which dce/pgo.h was derived.
The call was successful.
The cursor points to the end of the membership list for a group or organization or to the end of the list of groups for a principal.
The specified group, organization, or principal could not be found.
The DCE Registry Server is unavailable.
sec_rgy_pgo_add_member(), sec_rgy_cursor_reset(), sec_rgy_pgo_is_member(), sec_rgy_acct_get_proj().