summaryrefslogtreecommitdiffstats
path: root/upstream/debian-unstable/man2/getresuid.2
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:43:11 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:43:11 +0000
commitfc22b3d6507c6745911b9dfcc68f1e665ae13dbc (patch)
treece1e3bce06471410239a6f41282e328770aa404a /upstream/debian-unstable/man2/getresuid.2
parentInitial commit. (diff)
downloadmanpages-l10n-fc22b3d6507c6745911b9dfcc68f1e665ae13dbc.tar.xz
manpages-l10n-fc22b3d6507c6745911b9dfcc68f1e665ae13dbc.zip
Adding upstream version 4.22.0.upstream/4.22.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'upstream/debian-unstable/man2/getresuid.2')
-rw-r--r--upstream/debian-unstable/man2/getresuid.270
1 files changed, 70 insertions, 0 deletions
diff --git a/upstream/debian-unstable/man2/getresuid.2 b/upstream/debian-unstable/man2/getresuid.2
new file mode 100644
index 00000000..d5cadd73
--- /dev/null
+++ b/upstream/debian-unstable/man2/getresuid.2
@@ -0,0 +1,70 @@
+.\" Copyright (C) 1997 Andries Brouwer (aeb@cwi.nl)
+.\" and Copyright (c) 2007, Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" SPDX-License-Identifier: Linux-man-pages-copyleft
+.\"
+.\" Modified, 2003-05-26, Michael Kerrisk, <mtk.manpages@gmail.com>
+.\"
+.TH getresuid 2 2023-03-30 "Linux man-pages 6.05.01"
+.SH NAME
+getresuid, getresgid \- get real, effective, and saved user/group IDs
+.SH LIBRARY
+Standard C library
+.RI ( libc ", " \-lc )
+.SH SYNOPSIS
+.nf
+.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
+.B #include <unistd.h>
+.PP
+.BI "int getresuid(uid_t *" ruid ", uid_t *" euid ", uid_t *" suid );
+.BI "int getresgid(gid_t *" rgid ", gid_t *" egid ", gid_t *" sgid );
+.fi
+.SH DESCRIPTION
+.BR getresuid ()
+returns the real UID, the effective UID, and the saved set-user-ID
+of the calling process, in the arguments
+.IR ruid ,
+.IR euid ,
+and
+.IR suid ,
+respectively.
+.BR getresgid ()
+performs the analogous task for the process's group IDs.
+.SH RETURN VALUE
+On success, zero is returned.
+On error, \-1 is returned, and
+.I errno
+is set to indicate the error.
+.SH ERRORS
+.TP
+.B EFAULT
+One of the arguments specified an address outside the calling program's
+address space.
+.SH STANDARDS
+None.
+These calls also appear on HP-UX and some of the BSDs.
+.SH HISTORY
+Linux 2.1.44,
+glibc 2.3.2.
+.PP
+The original Linux
+.BR getresuid ()
+and
+.BR getresgid ()
+system calls supported only 16-bit user and group IDs.
+Subsequently, Linux 2.4 added
+.BR getresuid32 ()
+and
+.BR getresgid32 (),
+supporting 32-bit IDs.
+The glibc
+.BR getresuid ()
+and
+.BR getresgid ()
+wrapper functions transparently deal with the variations across kernel versions.
+.SH SEE ALSO
+.BR getuid (2),
+.BR setresuid (2),
+.BR setreuid (2),
+.BR setuid (2),
+.BR credentials (7)