Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ setgid(2) — DG/UX 4.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought



                                                                setgid(2)



        _________________________________________________________________
        setgid                                                System Call
        Set the real-, effective-, and saved-group-ids.
        _________________________________________________________________


        SYNTAX

        int     setgid (gid)
        int     gid;


        PARAMETERS

        gid            The value to which the calling process's group-ids
                       are to be set.


        DESCRIPTION

        Setgid sets the real-group-id, effective-group-id, and saved-
        group-id of the calling process to <gid>, subject to the access
        control constraints described below.  If the real-group-id is
        changed and the calling process's group list is not empty, the
        old real-group-id is deleted from the group list and the new
        real-group-id is added.

        The value of <gid> must always be non-negative and less than
        MAXUID.


        ACCESS CONTROL

        If the effective-user-id of the calling process is superuser the
        real-group-id, effective-group-id, and saved_group_id values are
        all set to <gid>.

        If the effective-user-id of the calling process is not superuser,
        but its real-group-id or its saved_group_id is equal to <gid>,
        the effective-group-id is set to <gid>.  The real-group-id and
        saved_group_id are unchanged.


        RETURN VALUE

        0              Successful completion.


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




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





                                                                setgid(2)



        EXCEPTIONS

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


        EPERM          An attempt was made to set the effective-group-id
                       to a value not permitted by the access control
                       restrictions described above.


        EINVAL         The supplied value of <gid> was negative or
                       greater than MAXUID.


        SEE ALSO

        The related system calls:  getuid, geteuid, getgid, getegid,
        setuid, setregid, setreuid.




































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



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