Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ setregid(2) — DG/UX 4.30

Media Vault

Software Library

Restoration Projects

Artifacts Sought



     setregid(2)                DG/UX 4.30                 setregid(2)



     NAME
          setregid - Set the real-, effective-, and saved-group-ids.

     SYNOPSIS
          int     setregid (rgid, egid)
          int     rgid;
          int     egid;

     PARAMETERS
          rgid           The value to which the real-group-id should
                         be set.


          egid           The value to which the effective-group-id
                         should be set.

     DESCRIPTION
          The real-group-id and effective-group-id's of the calling
          process are set according to the arguments.  If <rgid> or
          <egid> is -1, the current value of the real-group-id is
          used.  If the caller is not the superuser, he may only set
          the effective-group-id to the real-group-id or the saved-
          group-id.  Only the superuser may make other changes.  If
          after changing the real- and effective-group-id's, the
          calling process's effective-group-id no longer matches
          either its real- or saved-group-id's, its saved-group-id is
          set to the value of its effective-group-id.  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.

          Note that since the effective-group-id is implicitly a part
          of the group list, if this call changes the effective-
          group-id it also changes the group list.

     ACCESS CONTROL
          If the calling process has effective-user-id of superuser,
          setting of the real- and effective-user-ids is not
          restricted.

          Otherwise, the effective-user-id may be set only to its
          current value or to the current value of the real-user-id or
          to the saved-user-id value.  The real-user-id may be set
          only to its current value.

     RETURN VALUE
          0              Successful completion.


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




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





     setregid(2)                DG/UX 4.30                 setregid(2)



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


          EPERM          The above specified access check failed.


          EINVAL         The supplied value of <rgid> or <egid> was
                         less than -1 or greater than MAXUID.

     SEE ALSO
          The related system calls:  getuid, geteuid, getgid, getegid,
          setuid, setgid, setreuid.










































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



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