Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getgroups(2)

getgrent(3)



  initgroups(3)                       CLIX                       initgroups(3)



  NAME

    initgroups - Initializes supplementary group IDs

  LIBRARY

    Standard C Library (libc.a)

  SYNOPSIS

    initgroups(
      char *name ,
      gid_t basegid );

  PARAMETERS

    name      The login name of the user for which initgroups() is being
              called.

    basegid   The initial group id number of the user from the /etc/passwd
              file.

  DESCRIPTION

    The initgroups() function reads through the group file and sets up, using
    the setgroups() call, the supplementary group IDs for the user specified
    in name.   The group id number obtained with the basegid parameter is
    automatically included in the supplementary group IDs.  Typically, this
    value is given as the group number from the /etc/passwd file.

  FILES

    /etc/group    List of groups and users who can be a part of each group.

    /etc/passwd   Password file.  The baseid parameter checks this file for
                  additional groups to which the user belongs.

  CAUTIONS

    The initgroups() function uses the routines based on the getgrent()
    function.  If the invoking program uses any of these routines, the group
    structure will be overwritten in the call to initgroups().

  RETURN VALUES

    The initgroups() function returns a value of -1 if it was not invoked by
    the  super-user.

  RELATED INFORMATION

    Functions: getgroups(2), getgrent(3)



  2/94 - Intergraph Corporation                                              1




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