convert to use DEFS.h in ../../vax
[unix-history] / usr / src / lib / libc / compat-43 / setreuid.2
... / ...
CommitLineData
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.\"
5.\" @(#)setreuid.2 6.2 (Berkeley) %G%
6.\"
7.TH SETREUID 2 ""
8.UC 4
9.SH NAME
10setreuid \- set real and effective user ID's
11.SH SYNOPSIS
12.ft B
13.nf
14setreuid(ruid, euid)
15int ruid, euid;
16.fi
17.ft R
18.SH DESCRIPTION
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.
26Unprivileged users may change the real user
27ID to the effective user ID and vice-versa; only the super-user may
28make other changes.
29.SH "RETURN VALUE
30Upon successful completion, a value of 0 is returned. Otherwise,
31a value of \-1 is returned and \fIerrno\fP is set to indicate the error.
32.SH "ERRORS
33.TP 15
34[EPERM]
35The current process is not the super-user and a change
36other than changing the effective user-id to the real user-id
37was specified.
38.SH "SEE ALSO"
39getuid(2), setregid(2), setuid(3)