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