HP 3000 Manuals

getgrnam [ MPE/iX Developer's Kit Reference Manual Volume I ] MPE/iX 5.0 Documentation


MPE/iX Developer's Kit Reference Manual Volume I

getgrnam 

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:

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 name is invalid.  No matching entry was found in
                                  the group database.
                  ACTION          Specify a valid name.

ESYSERR           CAUSE           The system detected an unexpected error.
                  ACTION          Report circumstances to HP.

See Also 

getlogin(), POSIX.1



MPE/iX 5.0 Documentation