]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man2/getuid.2
s/current process/calling process/
[thirdparty/man-pages.git] / man2 / getuid.2
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu)
4 .\"
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
8 .\"
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
13 .\"
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date. The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein. The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
20 .\" professionally.
21 .\"
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
24 .\"
25 .\" Historical remark, aeb, 2004-06-05
26 .TH GETUID 2 1993-07-23 "Linux" "Linux Programmer's Manual"
27 .SH NAME
28 getuid, geteuid \- get user identity
29 .SH SYNOPSIS
30 .B #include <unistd.h>
31 .br
32 .B #include <sys/types.h>
33 .sp
34 .B uid_t getuid(void);
35 .br
36 .B uid_t geteuid(void);
37 .SH DESCRIPTION
38 .BR getuid ()
39 returns the real user ID of the calling process.
40
41 .BR geteuid ()
42 returns the effective user ID of the calling process.
43 .SH ERRORS
44 These functions are always successful.
45 .SH "CONFORMING TO"
46 POSIX.1-2001, 4.3BSD.
47 .SH NOTES
48 .SS History
49 In Unix V6 the
50 .BR getuid ()
51 call returned (euid << 8) + uid.
52 Unix V7 introduced separate calls
53 .BR getuid ()
54 and
55 .BR geteuid ().
56 .SH "SEE ALSO"
57 .BR getresuid (2),
58 .BR setreuid (2),
59 .BR setuid (2),
60 .BR credentials (7)