Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ setuid(2) — sys5 — Apollo Domain/IX SR9.5

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getuid(2)



SETUID(2)                DOMAIN/IX SYS5                 SETUID(2)



NAME
     setuid, setgid - set user and group IDs

USAGE
     int setuid(uid)
     int uid;

     int setgid(gid)
     int gid;


DESCRIPTION
     Setuid (setgid) is used to set the real user (group) ID and
     effective user (group) ID of the calling process.

     If the effective user ID of the calling process is super-
     user, the real user (group) ID and effective user (group) ID
     are set to uid (gid).

     If the effective user ID of the calling process is not
     super-user, but its real user (group) ID is equal to uid
     (gid), the effective user (group) ID is set to uid (gid).

     If the effective user ID of the calling process is not
     super-user, but the saved set-user (group) ID from exec(2)
     is equal to uid (gid), the effective user (group) ID is set
     to uid (gid).

     Setuid (setgid) will fail if the real user (group) ID of the
     calling process is not equal to uid (gid) and its effective
     user ID is not super-user.

RETURN VALUE
     A successful call returns zero.  A failed call returns -1
     and sets errno as indicated below.

ERRORS
     [EPERM]   The uid is out of range.

RELATED INFORMATION
     getuid(2)












Printed 12/4/86                                          SETUID-1





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