OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man2 / getresuid.2
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" Copyright (C) 1997 Andries Brouwer (aeb@cwi.nl)
4 .\" and Copyright (c) 2007, Michael Kerrisk <mtk.manpages@gmail.com>
5 .\"
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.
9 .\"
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.
14 .\"
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
21 .\" professionally.
22 .\"
23 .\" Modified, 2003-05-26, Michael Kerrisk, <mtk.manpages@gmail.com>
24 .\"
25 .\" Formatted or processed versions of this manual, if unaccompanied by
26 .\" the source, must acknowledge the copyright and authors of this work.
27 .\"
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>
33 .\"
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
40 .\"
41 .TH GETRESUID 2 2007-12-28 "Linux" "Linux Programmer's Manual"
42 .\"O .SH NAME
43 .SH Ì¾Á°
44 .\"O getresuid, getresgid \- get real, effective and saved user/group ID
45 getresuid, getresgid \- ¼Â¡¢¼Â¸ú¡¢Êݸ¡¢¥æ¡¼¥¶¡¼ ID / ¥°¥ë¡¼¥× ID ¤ò¼èÆÀ¤¹¤ë
46 .\"O .SH SYNOPSIS
47 .SH ½ñ¼°
48 .B #define _GNU_SOURCE
49 .br
50 .B #include <unistd.h>
51 .sp
52 .BI "int getresuid(uid_t *" ruid ", uid_t *" euid ", uid_t *" suid );
53 .br
54 .BI "int getresgid(gid_t *" rgid ", gid_t *" egid ", gid_t *" sgid );
55 .\"O .SH DESCRIPTION
56 .SH ÀâÌÀ
57 .\"O .BR getresuid ()
58 .\"O returns the real UID, the effective UID, and the saved set-user-ID
59 .\"O of the calling process, in the arguments
60 .\"O .IR ruid ,
61 .\"O .IR euid ,
62 .\"O and
63 .\"O .IR suid ,
64 .\"O respectively.
65 .\"O .BR getresgid ()
66 .\"O performs the analogous task for the process's group IDs.
67 .BR getresuid ()
68 ¤Ï¡¢¸Æ¤Ó½Ð¤·¤¿¥×¥í¥»¥¹¤Î¼Â (real) UID¡¢¼Â¸ú (effective) UID¡¢
69 Êݸ (saved) set-user-ID
70 .RB ( getresgid
71 ¤Î¾ì¹ç¤Ï¥°¥ë¡¼¥× ID) ¤ò¡¢
72 ¤½¤ì¤¾¤ì°ú¤­¿ô
73 .IR ruid ,
74 .IR euid ,
75 .I suid
76 ¤Ë³ÊǼ¤·¤ÆÊÖ¤¹¡£
77 .BR getresgid ()
78 ¤Ï¡¢¸Æ¤Ó½Ð¤·¤¿¥×¥í¥»¥¹¤Î¥°¥ë¡¼¥× ID ¤Ë¤Ä¤¤¤ÆƱÍͤνèÍý¤ò¹Ô¤¦¡£
79 .\"O .SH "RETURN VALUE"
80 .SH ÊÖ¤êÃÍ
81 .\"O On success, zero is returned.
82 .\"O On error, \-1 is returned, and
83 .\"O .I errno
84 .\"O is set appropriately.
85 À®¸ù¤·¤¿¾ì¹ç¤Ï¥¼¥í¤òÊÖ¤¹¡£¥¨¥é¡¼¤Î¾ì¹ç¤Ï \-1 ¤òÊÖ¤·¡¢
86 .I errno
87 ¤¬Å¬ÀÚ¤ËÀßÄꤵ¤ì¤ë¡£
88 .\"O .SH ERRORS
89 .SH ¥¨¥é¡¼
90 .TP
91 .B EFAULT
92 .\"O One of the arguments specified an address outside the calling program's
93 .\"O address space.
94 »ØÄꤷ¤¿°ú¤­¿ô¤Î¤É¤ì¤«¤¬¡¢¸Æ¤Ó½Ð¤·¤¿¥×¥í¥°¥é¥à¤Î¥¢¥É¥ì¥¹¶õ´Ö¤Î³°¤Î
95 ¥¢¥É¥ì¥¹¤Ç¤¢¤ë¡£
96 .\"O .SH VERSIONS
97 .SH ¥Ð¡¼¥¸¥ç¥ó
98 .\"O These system calls appeared on Linux starting with kernel 2.1.44.
99 ¤³¤ì¤é¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï¥«¡¼¥Í¥ë 2.1.44 ¤«¤é Linux ¤ËÅо줷¤¿¡£
100
101 .\"O The prototypes are given by glibc since version 2.3.2
102 .\"O provided
103 .\"O .B _GNU_SOURCE
104 .\"O is defined.
105 ¥×¥í¥È¥¿¥¤¥×Àë¸À¤Ï 2.3.2 °Ê¹ß¤Î glibc ¤Ç¤Ï
106 .B _GNU_SOURCE
107 ¤òÄêµÁ¤·¤Æ¤¤¤ë¤ÈÆÀ¤é¤ì¤ë¡£
108 .\"O .SH "CONFORMING TO"
109 .SH ½àµò
110 .\"O These calls are nonstandard;
111 .\"O they also appear on HP-UX and some of the BSDs.
112 ¤³¤ì¤é¤Î¥³¡¼¥ë¤ÏÈóɸ½à¤Ç¤¢¤ë¡£
113 HP-UX ¤ä BSD ·Ï¤Î¤¤¤¯¤Ä¤«¤Ë¤â¸ºß¤¹¤ë¡£
114 .\"O .SH "SEE ALSO"
115 .SH ´ØÏ¢¹àÌÜ
116 .BR getuid (2),
117 .BR setresuid (2),
118 .BR setreuid (2),
119 .BR setuid (2),
120 .BR credentials (7),
121 .BR feature_test_macros (7)