Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ setgroups(2P) — Interactive 2.2

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getgroups(2P)

initgroups(3P)



          setgroups(2P)    INTERACTIVE UNIX System (POSIX)    setgroups(2P)



          NAME
               setgroups - set group access list

          SYNOPSIS
               #include <sys/types.h>
               int setgroups (ngroups,gidset)
               int ngroups;
               gid_t gidset [];

          DESCRIPTION
               setgroups sets the group access list of the current user
               process according to the array gidset.  The parameter
               ngroups indicates the number of entries in the array and
               must be no more than NGROUPS_MAX.

               Only the superuser (root) can set new groups.

          RETURN VALUE
               A zero value is returned on success, and a -1 is returned on
               error, with an error code stored in errno.

          ERROR MESSAGES
               The setgroups call will fail if:

               [EPERM]
                    The caller is not the superuser.

               [EFAULT]
                    The address specified for gidset is outside the process
                    address space.

               [EINVAL]
                    The value of ngroups is larger than the currently con-
                    figured NGROUPS_MAX.

          SEE ALSO
               getgroups(2P), initgroups(3P).


















          Rev. 1.1                                                   Page 1



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