Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
MPE/iX Developer's Kit Reference Manual Volume I: HP 3000 MPE/iX Computer Systems > Chapter 4  POSIX/iX Library Function Descriptions

getgrnam

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

Group data base access.

Syntax

   #include <sys/types.h>

   #include <grp.h> 

   struct group *getgrnam(const char *name);

Parameters

name

A character-string value.

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 getgrnam() routine returns a pointer to an object of type struct group containing an entry from the group database with a matching name. 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-nam has not been implemented. It returns NULL.

Errors

If an error occurs, errno is set to one of the following values:

EFAULTCAUSE The system detected a NULL or bad address when attempting to allocate or access a struct group buffer.
 ACTION Report circumstances to HP
EINVALCAUSE The name is invalid. No matching entry was found in the group database.
 ACTION Specify a valid name.
ESYSERRCAUSE The system detected an unexpected error.
 ACTION Report circumstances to HP.

See Also

getlogin(), POSIX.1

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.