Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ setreuid(2) — OSF/1 1.0 (TIN) MIPS

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getuid(2)

setgid(2)

setregid(2)

setruid(3)

setreuid(2)  —  System Calls

OSF

NAME

setreuid − Sets real and effective user ID’s

SYNOPSIS

setreuid(
int ruid,
int euid );

PARAMETERS

ruidSpecifies the new real user ID. 

euidSpecifies the new effective user ID. 

DESCRIPTION

The setreuid() function sets the real and effective user ID’s of the current process to the values specified by the ruid and euid parameters.  If ruid or euid is −1, the current uid is filled in by the system. 

Unprivileged users may change the effective user ID to the real user ID; only processes with superuser privilege may make other changes.  This is normally done by the system’s authentication program (for example, login), but is not done for system daemons. 

RETURN VALUES

Upon successful completion, a value of 0 (zero) is returned.  Otherwise, a value of −1 is returned and errno is set to indicate the error. 

ERRORS

If the setreuid() function fails, errno may be set to the following value:

[EPERM]The current process is not the superuser and a change other than changing the effective user ID to the real user ID was specified. 

RELATED INFORMATION

Functions: getuid(2), setgid(2), setregid(2), setruid(3)

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