convert to use DEFS.h in ../../vax
[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.\"
770a91db 5.\" @(#)setreuid.2 6.2 (Berkeley) %G%
96750fe6 6.\"
5abf252e 7.TH SETREUID 2 ""
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.
5abf252e
KM
26Unprivileged users may change the real user
27ID to the effective user ID and vice-versa; only the super-user may
28make other changes.
085d7c51
KM
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.
96750fe6 38.SH "SEE ALSO"
085d7c51 39getuid(2), setregid(2), setuid(3)