Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

siad_get_groups(3) [osf1 man page]

siad_get_groups(3)					     Library Functions Manual						siad_get_groups(3)

NAME
siad_get_groups - mechanism-specific routine called from sia_get_groups to fill in a user's supplementary groups for SIA (Security Inte- gration Architecture) LIBRARY
Standard C library (libc.so and libc.a) SYNOPSIS
#include <sia.h> #include <siad.h> int siad_get_groups( struct sia_context *context const char *username gid_t *buffer int *ngroups int maxgroups) PARAMETERS
A thread-specific allocation context, shared with other group-related calls such as siad_getgrent. The name of the user whose supplemen- tary group list is desired. Pointer to storage for the list of groups. It may already have some entries in it, depending on the incoming value of ngroups. The number of slots in the buffer which are used. Read on input, and updated as groups are added by each mechanism. The maximum number of secondary groups for which buf has storage allocated. It is not an error to have ngroups equal to maxgroups, but if another (unique) group is found beyond that limit, the routine is expected to return SIADFAIL|SIADSTOP to halt any further scan for addi- tional group information. DESCRIPTION
This routine is responsible for ensuring that any group it adds to the list of GIDs found is not a duplicate. __sia_isagroup(3) is pro- vided specifically to make that determination simpler for the mechanism developer. It is not responsible for calling the mechanism-spe- cific siad_setgrent() routine, since sia_get_groups() makes that call. The sia_get_groups() routine will also make the call to the siad_endgrent() routine. This routine, unlike most of the SIA mechanism-dependent routines, is optional. If it is not provided, sia_get_groups() will use the mech- anism's siad_getgrent() routine instead. This routine is provided by mechanisms which have a faster method for finding the groups for a user than doing a simple getgrent() loop. RETURN VALUES
This routine should only return failure as described above or if the mechanism encounters an initialization error that prevents scanning for group information. In particular, it is not an error for a given mechanism to find no groups for a user. This routine returns SIADSUCCESS if group scanning was possible and the group list did not need additional storage. It returns SIAD- FAIL|SIADSTOP if the group list did need more than maxgroups entries. It returns SIADFAIL if the mechanism is unable to scan for groups at all. RELATED INFORMATION
sia_get_groups(3), siad_setgrent(3), siad_getgrent(3), siad_endgrent(3), matrix.conf(4), Security delim off siad_get_groups(3)

Check Out this Related Man Page

siad_getgrent(3)					     Library Functions Manual						  siad_getgrent(3)

NAME
siad_getgrent, siad_getgrgid, siad_getgrnam, siad_setgrent, siad_endgrent - group routines for SIA (Security Integration Architecture) LIBRARY
Standard C library (libc.so and libc.a) SYNOPSIS
#include <sia.h> #include <siad.h> int siad_getgrent( struct group *result, char *buffer, int buflen, FILE **context); int siad_getgrgid( gid_t gid, struct group *result, char *buffer, int buflen); int siad_getgrnam( char *name, struct group *result, char *buffer, int buflen); int siad_setgrent( FILE **context); int siad_endgrent( FILE **context); PARAMETERS
result The result parameter is used to provide a result. The actual result string is placed in the buffer provided and result points to the resultant struct group in the buffer. Values in the passwd structure may be changed by the siad_*gr* routines. buffer The buffer parameter is a pointer to a buffer which holds the resultant struct group. This parameter is read only. buflen The buflen parameter is the length of the buffer in chars. This parameter are read only. gid The gid parameter is the group identifier (GID) for the request. This parameter are read only. name The name parameter specifies the group name for the request. This parameter are read only. context A pointer to the location that records which I/O stream is to be used. DESCRIPTION
siad_getgrent() The siad_getgrent routine is called indirectly (by the sia_switch function) from the sia_getgroup() routine which is called from the libc and libc_r routines getgrent() and getgrent_r() respectively. The buffer for the group information is preallocated and a thread lock has been taken in the thread safe mode. siad_getgrgid() This routine is called indirectly (by the sia_switch function) from the sia_getgroup() routine which is called from the libc and libc_r routines getgrgid and getgrgid_r respectively. The buffer for the group information is preallocated and a thread lock has been taken in the thread safe mode. siad_getgrnam() This routine is called indirectly (by the sia_switch function) from the sia_getgroup() routine which is called from the libc and libc_r routines getgrnam and getgrnam_r respectively. The buffer for the group information is preallocated and a thread lock has been taken in the thread safe mode. siad_setgrent() This routine is called by the sia_getgroup() routine to start or initialize a series of getgrent calls. siad_endgrent() This routine is called to close or complete the processing of a getgrent() series of calls. RETURN VALUES
The siad_*gr*() routines return bitmapped values which indicate the following status: SIADSUCCESS Indicates unconditional success. All bits set to 0. SIADFAIL Indicates conditional failure. Lowest bit set to 1. If other security mechanism are in place, continue. SIADSTOP Indicates unconditional failure. Do not continue. Second lowest bit set to 1. ERRORS
The errno values are those returned from the dynamic loader interface, from the (siad_*) routines, or from malloc. Possible errors include resource constraints (no memory) and various authentication failures. FILES
/etc/group /etc/sia/matrix.conf RELATED INFORMATION
sia_getgroup(3), matrix.conf(4) Security delim off siad_getgrent(3)
Man Page