1 .\" Hey Emacs! This file is -*- nroff -*- source.
3 .\" Copyright (C) 1997 Andries Brouwer (aeb@cwi.nl)
4 .\" and Copyright (c) 2007, Michael Kerrisk <mtk.manpages@gmail.com>
6 .\" Permission is granted to make and distribute verbatim copies of this
7 .\" manual provided the copyright notice and this permission notice are
8 .\" preserved on all copies.
10 .\" Permission is granted to copy and distribute modified versions of this
11 .\" manual under the conditions for verbatim copying, provided that the
12 .\" entire resulting derived work is distributed under the terms of a
13 .\" permission notice identical to this one.
15 .\" Since the Linux kernel and libraries are constantly changing, this
16 .\" manual page may be incorrect or out-of-date. The author(s) assume no
17 .\" responsibility for errors or omissions, or for damages resulting from
18 .\" the use of the information contained herein. The author(s) may not
19 .\" have taken the same level of care in the production of this manual,
20 .\" which is licensed free of charge, as they might when working
23 .\" Formatted or processed versions of this manual, if unaccompanied by
24 .\" the source, must acknowledge the copyright and authors of this work.
26 .\" Modified, 2003-05-26, Michael Kerrisk, <mtk.manpages@gmail.com>
27 .TH GETRESUID 2 2007-12-28 "Linux" "Linux Programmer's Manual"
29 getresuid, getresgid \- get real, effective and saved user/group IDs
31 .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
33 .B #include <unistd.h>
35 .BI "int getresuid(uid_t *" ruid ", uid_t *" euid ", uid_t *" suid );
37 .BI "int getresgid(gid_t *" rgid ", gid_t *" egid ", gid_t *" sgid );
40 returns the real UID, the effective UID, and the saved set-user-ID
41 of the calling process, in the arguments
48 performs the analogous task for the process's group IDs.
50 On success, zero is returned.
51 On error, \-1 is returned, and
57 One of the arguments specified an address outside the calling program's
60 These system calls appeared on Linux starting with kernel 2.1.44.
62 The prototypes are given by glibc since version 2.3.2,
67 These calls are nonstandard;
68 they also appear on HP-UX and some of the BSDs.