typo
[unix-history] / usr / src / lib / libc / compat-43 / setreuid.2
CommitLineData
88b3ccf2
KB
1.\" Copyright (c) 1980 The Regents of the University of California.
2.\" All rights reserved.
3.\"
91cff1e1 4.\" %sccs.include.redist.man%
96750fe6 5.\"
91cff1e1 6.\" @(#)setreuid.2 6.3 (Berkeley) %G%
96750fe6 7.\"
5abf252e 8.TH SETREUID 2 ""
96750fe6
KM
9.UC 4
10.SH NAME
085d7c51 11setreuid \- set real and effective user ID's
96750fe6 12.SH SYNOPSIS
085d7c51
KM
13.ft B
14.nf
15setreuid(ruid, euid)
16int ruid, euid;
17.fi
18.ft R
96750fe6 19.SH DESCRIPTION
085d7c51
KM
20The real and effective user ID's of the
21current process are set according to the arguments.
22If
23.I ruid
24or
25.I euid
26is \-1, the current uid is filled in by the system.
5abf252e
KM
27Unprivileged users may change the real user
28ID to the effective user ID and vice-versa; only the super-user may
29make other changes.
085d7c51
KM
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)