1GETUID(3P)                 POSIX Programmer's Manual                GETUID(3P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10

NAME

12       getuid - get a real user ID
13

SYNOPSIS

15       #include <unistd.h>
16
17       uid_t getuid(void);
18
19

DESCRIPTION

21       The getuid() function shall return the real  user  ID  of  the  calling
22       process.
23

RETURN VALUE

25       The getuid() function shall always be successful and no return value is
26       reserved to indicate the error.
27

ERRORS

29       No errors are defined.
30
31       The following sections are informative.
32

EXAMPLES

34   Setting the Effective User ID to the Real User ID
35       The following example sets the effective user ID and the real  user  ID
36       of the current process to the real user ID of the caller.
37
38
39              #include <unistd.h>
40              #include <sys/types.h>
41              ...
42              setreuid(getuid(), getuid());
43              ...
44

APPLICATION USAGE

46       None.
47

RATIONALE

49       None.
50

FUTURE DIRECTIONS

52       None.
53

SEE ALSO

55       getegid(),   geteuid(),   getgid(),   setegid(),  seteuid(),  setgid(),
56       setregid(),  setreuid(),  setuid(),  the  Base  Definitions  volume  of
57       IEEE Std 1003.1-2001, <sys/types.h>, <unistd.h>
58
60       Portions  of  this text are reprinted and reproduced in electronic form
61       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
62       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
63       Specifications Issue 6, Copyright (C) 2001-2003  by  the  Institute  of
64       Electrical  and  Electronics  Engineers, Inc and The Open Group. In the
65       event of any discrepancy between this version and the original IEEE and
66       The  Open Group Standard, the original IEEE and The Open Group Standard
67       is the referee document. The original Standard can be  obtained  online
68       at http://www.opengroup.org/unix/online.html .
69
70
71
72IEEE/The Open Group                  2003                           GETUID(3P)
Impressum