Commit | Line | Data |
---|---|---|
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 | 11 | setreuid \- set real and effective user ID's |
96750fe6 | 12 | .SH SYNOPSIS |
085d7c51 KM |
13 | .ft B |
14 | .nf | |
15 | setreuid(ruid, euid) | |
16 | int ruid, euid; | |
17 | .fi | |
18 | .ft R | |
96750fe6 | 19 | .SH DESCRIPTION |
085d7c51 KM |
20 | The real and effective user ID's of the |
21 | current process are set according to the arguments. | |
22 | If | |
23 | .I ruid | |
24 | or | |
25 | .I euid | |
26 | is \-1, the current uid is filled in by the system. | |
5abf252e KM |
27 | Unprivileged users may change the real user |
28 | ID to the effective user ID and vice-versa; only the super-user may | |
29 | make other changes. | |
085d7c51 KM |
30 | .SH "RETURN VALUE |
31 | Upon successful completion, a value of 0 is returned. Otherwise, | |
32 | a value of \-1 is returned and \fIerrno\fP is set to indicate the error. | |
33 | .SH "ERRORS | |
34 | .TP 15 | |
35 | [EPERM] | |
36 | The current process is not the super-user and a change | |
37 | other than changing the effective user-id to the real user-id | |
38 | was specified. | |
96750fe6 | 39 | .SH "SEE ALSO" |
085d7c51 | 40 | getuid(2), setregid(2), setuid(3) |