VMS Help  —  CRTL  getgrnam
    Gets a group database entry for a name.

    This function is OpenVMS Alpha and Integrity servers only.

    Format

      #include  <types.h>

      #include  <grp.h>

      struct group *getgrnam  (const char *name);

1  –  Argument

 name

    The group name of the group for which the group database entry is
    to be retrieved.

2  –  Description

    The getgrnam function searches the group database for an
    entry with a matching name, and returns a pointer to the group
    structure containing the matching entry.

3  –  Return Values

    x                  Pointer to a valid group structure containing
                       a matching entry.
    NULL               Indicates an error.

                       Note: The return value points to a static area
                       which is overwritten by subsequent calls to
                       getgrent, getgrgid, or getgrnam.

                       On error, the function sets the return value
                       to one of the following:

                       o  EACCES - The user process does not have
                          appropriate privileges enabled to access
                          the user authorization file.

                       o  EIO - An I/O error has occurred.

                       o  EINTR - A signal was intercepted during
                          getgrnam.

                       o  EMFILE - OPEN_MAX file descriptors are
                          currently open in the calling process.

                       o  ENFILE - The maximum allowable number of
                          files is currently open in the system.

                       Applications wishing to check for error
                       situations should set errno to 0 before
                       calling getgrnam. If errno is set on return,
                       an error occurred.
Close Help