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

NAME

6       getresuid, getresgid - get real, effective and saved user/group IDs
7

SYNOPSIS

9       #define _GNU_SOURCE
10       #include <unistd.h>
11
12       int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid);
13       int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid);
14

DESCRIPTION

16       getresuid() returns the real UID, the effective UID, and the saved set-
17       user-ID of the calling process, in the arguments ruid, euid, and  suid,
18       respectively.    getresgid()   performs  the  analogous  task  for  the
19       process's group IDs.
20

RETURN VALUE

22       On success, zero is returned.  On error, -1 is returned, and  errno  is
23       set appropriately.
24

ERRORS

26       EFAULT One  of  the  arguments specified an address outside the calling
27              program's address space.
28

VERSIONS

30       These system calls appeared on Linux starting with kernel 2.1.44.
31
32       The prototypes  are  given  by  glibc  since  version  2.3.2,  provided
33       _GNU_SOURCE is defined.
34

CONFORMING TO

36       These  calls are nonstandard; they also appear on HP-UX and some of the
37       BSDs.
38

SEE ALSO

40       getuid(2), setresuid(2), setreuid(2), setuid(2),  credentials(7),  fea‐
41       ture_test_macros(7)
42

COLOPHON

44       This  page  is  part of release 3.25 of the Linux man-pages project.  A
45       description of the project, and information about reporting  bugs,  can
46       be found at http://www.kernel.org/doc/man-pages/.
47
48
49
50Linux                             2007-12-28                      GETRESUID(2)
Impressum