Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ getgrgid(3C) — posix — mips UMIPS RISC/os 4.52

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getlogin(3C)

getpwnam(3C)

group(4)



GETGRGID(3C-POSIX)  RISC/os Reference Manual   GETGRGID(3C-POSIX)



NAME
     getgrgid, getgrnam - get group file entry

SYNOPSIS
     #include <grp.h>

     struct group *getgrgid (gid)
     gidt gid;

     struct group *getgrnam (name)
     char *name;

DESCRIPTION
     getgrgid and getgrnam each return a pointer to an object
     with the following structure, containing the broken-out
     fields of a line in the /etc/group file.  Each line contains
     a ``group'' structure, defined in the <grp.h> header file.

     struct  group {
             char    *gr_name;     /* the name of the group */
             char    *gr_passwd;   /* the encrypted group password */
             gid_t   gr_gid;       /* the numerical group ID */
             char    **gr_mem;     /* vector of pointers to member names */
     };

     getgrgid searches from the beginning of the file until a
     numerical group id matching gid is found and returns a
     pointer to the particular structure in which it was found.

     getgrnam searches from the beginning of the file until a
     group name matching name is found and returns a pointer to
     the particular structure in which it was found.

     If an end-of-file or an error is encountered on reading,
     these functions return a NULL pointer.

RETURN VALUES
     A NULL pointer is returned on EOF or error.

FILES
     /etc/group

SEE ALSO
     getlogin(3C), getpwnam(3C), group(4).

WARNING
     The above routines use <stdio.h>, which causes them to
     increase the size of programs, not otherwise using standard
     I/O, more than might be expected.

CAVEAT
     All information is contained in a static area, so it must be



                         Printed 1/15/91                   Page 1





GETGRGID(3C-POSIX)  RISC/os Reference Manual   GETGRGID(3C-POSIX)



     copied if it is to be saved.






















































 Page 2                  Printed 1/15/91



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026