1getresuid(2)                  System Calls Manual                 getresuid(2)
2
3
4

NAME

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

LIBRARY

9       Standard C library (libc, -lc)
10

SYNOPSIS

12       #define _GNU_SOURCE         /* See feature_test_macros(7) */
13       #include <unistd.h>
14
15       int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid);
16       int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid);
17

DESCRIPTION

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

RETURN VALUE

25       On success, zero is returned.  On error, -1 is returned, and  errno  is
26       set to indicate the error.
27

ERRORS

29       EFAULT One  of  the  arguments specified an address outside the calling
30              program's address space.
31

STANDARDS

33       None.  These calls also appear on HP-UX and some of the BSDs.
34

HISTORY

36       Linux 2.1.44, glibc 2.3.2.
37
38       The original Linux getresuid() and getresgid() system  calls  supported
39       only  16-bit  user and group IDs.  Subsequently, Linux 2.4 added getre‐
40       suid32() and getresgid32(), supporting 32-bit IDs.   The  glibc  getre‐
41       suid()  and  getresgid()  wrapper functions transparently deal with the
42       variations across kernel versions.
43

SEE ALSO

45       getuid(2), setresuid(2), setreuid(2), setuid(2), credentials(7)
46
47
48
49Linux man-pages 6.04              2023-03-30                      getresuid(2)
Impressum