Commit | Line | Data |
---|---|---|
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 | .\" | |
5 | .\" @(#)setreuid.2 4.1 (Berkeley) %G% | |
6 | .\" | |
7 | .TH SETUID 2 | |
8 | .UC 4 | |
9 | .SH NAME | |
10 | setuid, setgid \- set user and group ID | |
11 | .SH SYNOPSIS | |
12 | .B setuid(uid) | |
13 | .PP | |
14 | .B setgid(gid) | |
15 | .SH DESCRIPTION | |
16 | The user ID (group ID) of the current process is set to | |
17 | the argument. | |
18 | Both the effective and the real ID are set. | |
19 | These calls are only permitted to the super-user | |
20 | or if the argument is the real or effective ID. | |
21 | .SH "SEE ALSO" | |
22 | getuid(2) | |
23 | .SH DIAGNOSTICS | |
24 | Zero is returned if the user (group) ID is set; | |
25 | \-1 is returned otherwise. | |
26 | .SH "ASSEMBLER (PDP-11)" | |
27 | (setuid = 23.) | |
28 | .br | |
29 | (user ID in r0) | |
30 | .br | |
31 | .B sys setuid | |
32 | .PP | |
33 | (setgid = 46.) | |
34 | .br | |
35 | (group ID in r0) | |
36 | .br | |
37 | .B sys setgid |