Previous section.

DCE 1.1: Authentication and Security Services
Copyright © 1997 The Open Group

NAME

sec_rgy_unix_getgrgid-Returns a UNIX style group entry for the account matching the specified group ID

SYNOPSIS

#include <dce/rgynbase.h>

void sec_rgy_unix_getgrgid(
    sec_rgy_handle_t context,
    signed32 gid,
    signed32 max_number,
    sec_rgy_cursor_t *item_cursor,
    sec_rgy_unix_group_t *group_entry,
    signed32 *number_members,
    sec_rgy_member_t member_list[],
    error_status_t *status);

PARAMETERS

Input

context

An opaque handle bound to a registry server. Use sec_rgy_site_open() to acquire a bound handle.

gid

A 32-bit integer specifying the group ID to match.

max_number

The maximum number of members to be returned by the call. This must be no larger than the allocated size of the member_list array.

Input/Output

item_cursor

An opaque pointer indicating a specific PGO item entry in the registry database. The sec_rgy_unix_getgrgid() routine returns the PGO item indicated by item_cursor, and advances the cursor to point to the next item in the database. When the end of the list of entries is reached, the routine returns sec_rgy_no_more_entries. Use sec_rgy_cursor_reset() to refresh the cursor.

Output

group_entry

A UNIX style group entry structure returned with information about the account matching gid.

number_members

An signed 32-bit integer containing the total number of member names returned in the member_list array.

member_list[]

An array of character strings to receive the returned member names. The size allocated for the array is given by max_number. If this value is less than the total number of members in the membership list, multiple calls must be made to return all of the members.

status

On successful completion, the routine returns error_status_ok. Otherwise, it returns an error.

DESCRIPTION

The sec_rgy_unix_getgrgid() routine returns the next UNIX group structure that matches the input UNIX group ID. The structure is in the following form:

typedef struct {
    sec_rgy_name_t              name;
    signed32                    gid;
    sec_rgy_member_buf_t        members;
} sec_rgy_unix_group_t;


The structure includes

The routine also returns an array of member names, limited in size by the number_members parameter.

This call is supplied in source code form.

FILES

/usr/include/dce/rgynbase.idl

The idl file from which dce/rgynbase.h was derived.

ERRORS

error_status_ok

The call was successful.

sec_rgy_no_more_entries

The cursor is at the end of the list of entries.

sec_rgy_server_unavailable

The DCE Registry Server is unavailable.

Please note that the html version of this specification may contain formatting aberrations. The definitive version is available as an electronic publication on CD-ROM from The Open Group.

Contents Next section Index