]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man2/getresuid.2
Consistent use of "saved set-user-ID" and "saved set-group-ID".
[thirdparty/man-pages.git] / man2 / getresuid.2
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" Copyright (C) 1997 Andries Brouwer (aeb@cwi.nl)
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 .\" Modified, 2003-05-26, Michael Kerrisk, <mtk-manpages@gmx.net>
26 .TH GETRESUID 2 2003-05-26 "Linux 2.4" "Linux Programmer's Manual"
27 .SH NAME
28 getresuid, getresgid \- get real, effective and saved user or group ID
29 .SH SYNOPSIS
30 .B #define _GNU_SOURCE
31 .br
32 .B #include <unistd.h>
33 .sp
34 .BI "int getresuid(uid_t *" ruid ", uid_t *" euid ", uid_t *" suid );
35 .br
36 .BI "int getresgid(gid_t *" rgid ", gid_t *" egid ", gid_t *" sgid );
37 .SH DESCRIPTION
38 .B getresuid
39 and
40 .B getresgid
41 (both introduced in Linux 2.1.44)
42 get the real UID, effective UID, and saved set-user-ID (resp. group ID's)
43 of the current process.
44
45 .SH "RETURN VALUE"
46 On success, zero is returned. On error, \-1 is returned, and
47 .I errno
48 is set appropriately.
49 .SH ERRORS
50 .TP
51 .B EFAULT
52 One of the arguments specified an address outside the calling program's
53 address space.
54 .SH "CONFORMING TO"
55 This call is Linux-specific.
56 The prototype is given by glibc since version 2.3.2
57 provided _GNU_SOURCE is defined.
58 .SH "SEE ALSO"
59 .BR getuid (2),
60 .BR setresuid (2),
61 .BR setreuid (2),
62 .BR setuid (2)