1SETUID(2) System Calls Manual SETUID(2)
2
3
4
6 setuid, setgid - set user and group ID
7
9 setuid(uid)
10
11 setgid(gid)
12
14 The user ID (group ID) of the current process is set to the argument.
15 Both the effective and the real ID are set. These calls are only per‐
16 mitted to the super-user or if the argument is the real ID.
17
19 getuid(2)
20
22 Zero is returned if the user (group) ID is set; -1 is returned other‐
23 wise.
24
26 (setuid = 23.)
27 (user ID in r0)
28 sys setuid
29
30 (setgid = 46.)
31 (group ID in r0)
32 sys setgid
33
34
35
36 SETUID(2)