Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ setgroups(2) — DG/UX 4.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought



                                                             setgroups(2)



        _________________________________________________________________
        setgroups                                             System Call
        Set group access list.
        _________________________________________________________________


        SYNTAX

        #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

        Setgroups 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.




        DG/UX 4.00                                                 Page 1
               Licensed material--property of copyright holder(s)





                                                             setgroups(2)



        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

        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.


        EINVAL         The value of a group list member is negative or
                       greater than MAXUID.


        EINVAL         The given group list is non-empty and does not
                       contain the calling process's real-group-id.


        SEE ALSO

        The related system call:  getgroups.












        DG/UX 4.00                                                 Page 2
               Licensed material--property of copyright holder(s)



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