Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ setgroups(2) — DG/UX 4.30

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getgroups(2)



     setgroups(2)               DG/UX 4.30                setgroups(2)



     NAME
          setgroups - Set group access list.

     SYNOPSIS
          #include <sys/param.h>
          #include <sys/types.h>

          int     setgroups (ngroups, gidset)
          int     ngroups;
          uid_t * gidset;

     PARAMETERS
          ngroups        This argument specifies the number of entries
                         in the array gidset that are to be used to
                         set the calling process's group access list.
                         This argument may take on any integer value
                         between 0 and NGROUPS, inclusive.

          gidset         This argument denotes an array of group ids;
                         the first ngroups entries in this array are
                         the group ids that are to become the calling
                         process's group access list.

     DESCRIPTION
          The setgroups system call sets the group access list of the
          calling process according to the array gidset.  The
          parameter ngroups indicates the number of entries in the
          array and must be no more than NGROUPS.

          The real-group-id of the calling process must be a member of
          a non-empty group list.  Furthermore, the entries in group
          list must be unique; if a value is listed in gidset twice,
          it will be placed in the group list only once.

          If an error occurs, the group list is not modified.

     ACCESS CONTROL
          The calling process must have an effective-user-id of
          superuser in order to perform this call.

          The argument gidset must point to an area in the calling
          process's address space which is valid and has read access.
          The area need only be large enough for the number of entries
          specified by the argument ngroups.

     RETURN VALUE
          0              Successful completion.

          -1             An error occurred.  Errno is set to indicate
                         the error.

     EXCEPTIONS



     Licensed material--property of copyright holder(s)         Page 1





     setgroups(2)               DG/UX 4.30                setgroups(2)



          Errno may be set to one of the following error codes:

          EPERM          The caller is not the super-user.

          EFAULT         The argument gidset points to an address
                         which is invalid or which does not have read
                         access.

          EINVAL         The value of arguments ngroups is greater
                         than NGROUPS; or the value of a group list
                         member is negative or greater than MAXUID; or
                         the given group list is non-empty and does
                         not contain the calling process's real-
                         group-id.

     SEE ALSO
          getgroups(2).






































     Licensed material--property of copyright holder(s)         Page 2



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