getgrgid [ MPE/iX Developer's Kit Reference Manual Volume I ] MPE/iX 5.0 Documentation
MPE/iX Developer's Kit Reference Manual Volume I
getgrgid
Group data base access based on GID.
Syntax
#include <sys/types.h>
#include <grp.h>
struct group *getgrgid(gid_t gid);
Parameters
gid A value of a GID.
Return Values
Returns a pointer to an object of type struct group on success. The
return values may point to static data that is overwritten by each cell.
A null pointer is returned on error or if the requested entry is not
found.
Description
The getgrgid() function returns a pointer to an object of type struct
group containing an entry from the group database with a matching GID.
This structure, which is defined in <grp.h>, includes the members shown
below:
gr_name The name of the group.
gr_gid The numerical group ID.
gr_mem A null-terminated vector of pointers to the individual member
names.
Implementation Considerations
Currently, member gr-mem has not been implemented. It returns NULL.
Errors
If an error occurs, errno is set to one of the following values:
EFAULT CAUSE The system detected a NULL or bad address when
attempting to allocate or access a struct group
buffer.
ACTION Report circumstances to HP
EINVAL CAUSE The GID parameter is invalid. No matching entry was
found in the group database.
ACTION Specify a valid GID.
ESYSERR CAUSE The system detected an unexpected error.
ACTION Report circumstances to HP.
See Also
getlogin(),getgrnam() POSIX.1
MPE/iX 5.0 Documentation