manual page distributed with 4.2BSD
[unix-history] / usr / src / lib / libc / compat-43 / setreuid.2
CommitLineData
96750fe6
KM
1.\" Copyright (c) 1980 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
085d7c51 5.\" @(#)setreuid.2 5.1 (Berkeley) %G%
96750fe6 6.\"
085d7c51 7.TH SETREUID 2 "12 February 1983"
96750fe6
KM
8.UC 4
9.SH NAME
085d7c51 10setreuid \- set real and effective user ID's
96750fe6 11.SH SYNOPSIS
085d7c51
KM
12.ft B
13.nf
14setreuid(ruid, euid)
15int ruid, euid;
16.fi
17.ft R
96750fe6 18.SH DESCRIPTION
085d7c51
KM
19The real and effective user ID's of the
20current process are set according to the arguments.
21If
22.I ruid
23or
24.I euid
25is \-1, the current uid is filled in by the system.
26Only the super-user may modify the real uid of
27a process. Users other than the super-user may
28change the effective uid of a process only to the
29real uid.
30.SH "RETURN VALUE
31Upon successful completion, a value of 0 is returned. Otherwise,
32a value of \-1 is returned and \fIerrno\fP is set to indicate the error.
33.SH "ERRORS
34.TP 15
35[EPERM]
36The current process is not the super-user and a change
37other than changing the effective user-id to the real user-id
38was specified.
96750fe6 39.SH "SEE ALSO"
085d7c51 40getuid(2), setregid(2), setuid(3)