1GETUID(2)                  Linux Programmer's Manual                 GETUID(2)
2
3
4

NAME

6       getuid, geteuid - get user identity
7

SYNOPSIS

9       #include <unistd.h>
10       #include <sys/types.h>
11
12       uid_t getuid(void);
13       uid_t geteuid(void);
14

DESCRIPTION

16       getuid() returns the real user ID of the calling process.
17
18       geteuid() returns the effective user ID of the calling process.
19

ERRORS

21       These functions are always successful.
22

CONFORMING TO

24       POSIX.1-2001, POSIX.1-2008, 4.3BSD.
25

NOTES

27   History
28       In  UNIX V6  the  getuid()  call  returned  (euid << 8) + uid.  UNIX V7
29       introduced separate calls getuid() and geteuid().
30
31       The original Linux getuid() and geteuid() system calls  supported  only
32       16-bit   user  IDs.   Subsequently,  Linux  2.4  added  getuid32()  and
33       geteuid32(), supporting 32-bit IDs.  The glibc getuid()  and  geteuid()
34       wrapper  functions transparently deal with the variations across kernel
35       versions.
36

SEE ALSO

38       getresuid(2), setreuid(2), setuid(2), credentials(7)
39

COLOPHON

41       This page is part of release 4.16 of the Linux  man-pages  project.   A
42       description  of  the project, information about reporting bugs, and the
43       latest    version    of    this    page,    can     be     found     at
44       https://www.kernel.org/doc/man-pages/.
45
46
47
48Linux                             2017-09-15                         GETUID(2)
Impressum