1GETUID(2) System Calls Manual GETUID(2)
2
3
4
6 getuid, getgid, geteuid, getegid - get user and group identity
7
9 getuid( )
10
11 geteuid( )
12
13 getgid( )
14
15 getegid( )
16
18 Getuid returns the real user ID of the current process, geteuid the
19 effective user ID. The real user ID identifies the person who is
20 logged in, in contradistinction to the effective user ID, which deter‐
21 mines his access permission at the moment. It is thus useful to pro‐
22 grams which operate using the `set user ID' mode, to find out who
23 invoked them.
24
25 Getgid returns the real group ID, getegid the effective group ID.
26
28 setuid(2)
29
31 (getuid = 24.)
32 sys getuid
33 (real user ID in r0, effective user ID in r1)
34
35 (getgid = 47.)
36 sys getgid
37 (real group ID in r0, effective group ID in r1)
38
39
40
41 GETUID(2)