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 .\" Modified, 2003-05-26, Michael Kerrisk, <mtk.manpages@gmail.com>
25 .\" Formatted or processed versions of this manual, if unaccompanied by
26 .\" the source, must acknowledge the copyright and authors of this work.
28 .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
29 .\" all rights reserved.
30 .\" Translated Sat Aug 30 14:47:25 JST 1997
31 .\" by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
32 .\" Updated Sun Oct 12 JST 2003 by Kentaro Shirakata <argrath@ub32.org>
34 .\"WORD: effective user ID ¼Â¸ú¥æ¡¼¥¶¡¼ID
35 .\"WORD: real user ID ¼Â¥æ¡¼¥¶¡¼ID
36 .\"WORD: saved user ID Êݸ¥æ¡¼¥¶¡¼ID
37 .\"WORD: effective group ID ¼Â¸ú¥°¥ë¡¼¥×ID
38 .\"WORD: real group ID ¼Â¥°¥ë¡¼¥×ID
39 .\"WORD: saved group ID Êݸ¥°¥ë¡¼¥×ID
41 .TH GETRESUID 2 2007-12-28 "Linux" "Linux Programmer's Manual"
44 .\"O getresuid, getresgid \- get real, effective and saved user/group ID
45 getresuid, getresgid \- ¼Â¡¢¼Â¸ú¡¢Êݸ¡¢¥æ¡¼¥¶¡¼ ID / ¥°¥ë¡¼¥× ID ¤ò¼èÆÀ¤¹¤ë
48 .B #define _GNU_SOURCE
50 .B #include <unistd.h>
52 .BI "int getresuid(uid_t *" ruid ", uid_t *" euid ", uid_t *" suid );
54 .BI "int getresgid(gid_t *" rgid ", gid_t *" egid ", gid_t *" sgid );
58 .\"O returns the real UID, the effective UID, and the saved set-user-ID
59 .\"O of the calling process, in the arguments
66 .\"O performs the analogous task for the process's group IDs.
68 ¤Ï¡¢¸Æ¤Ó½Ð¤·¤¿¥×¥í¥»¥¹¤Î¼Â (real) UID¡¢¼Â¸ú (effective) UID¡¢
69 Êݸ (saved) set-user-ID
71 ¤Î¾ì¹ç¤Ï¥°¥ë¡¼¥× ID) ¤ò¡¢
78 ¤Ï¡¢¸Æ¤Ó½Ð¤·¤¿¥×¥í¥»¥¹¤Î¥°¥ë¡¼¥× ID ¤Ë¤Ä¤¤¤ÆƱÍͤνèÍý¤ò¹Ô¤¦¡£
79 .\"O .SH "RETURN VALUE"
81 .\"O On success, zero is returned.
82 .\"O On error, \-1 is returned, and
84 .\"O is set appropriately.
85 À®¸ù¤·¤¿¾ì¹ç¤Ï¥¼¥í¤òÊÖ¤¹¡£¥¨¥é¡¼¤Î¾ì¹ç¤Ï \-1 ¤òÊÖ¤·¡¢
92 .\"O One of the arguments specified an address outside the calling program's
94 »ØÄꤷ¤¿°ú¤¿ô¤Î¤É¤ì¤«¤¬¡¢¸Æ¤Ó½Ð¤·¤¿¥×¥í¥°¥é¥à¤Î¥¢¥É¥ì¥¹¶õ´Ö¤Î³°¤Î
98 .\"O These system calls appeared on Linux starting with kernel 2.1.44.
99 ¤³¤ì¤é¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï¥«¡¼¥Í¥ë 2.1.44 ¤«¤é Linux ¤ËÅо줷¤¿¡£
101 .\"O The prototypes are given by glibc since version 2.3.2
105 ¥×¥í¥È¥¿¥¤¥×Àë¸À¤Ï 2.3.2 °Ê¹ß¤Î glibc ¤Ç¤Ï
107 ¤òÄêµÁ¤·¤Æ¤¤¤ë¤ÈÆÀ¤é¤ì¤ë¡£
108 .\"O .SH "CONFORMING TO"
110 .\"O These calls are nonstandard;
111 .\"O they also appear on HP-UX and some of the BSDs.
112 ¤³¤ì¤é¤Î¥³¡¼¥ë¤ÏÈóɸ½à¤Ç¤¢¤ë¡£
113 HP-UX ¤ä BSD ·Ï¤Î¤¤¤¯¤Ä¤«¤Ë¤â¸ºß¤¹¤ë¡£
121 .BR feature_test_macros (7)