OSDN Git Service

(split) LDP: Translation snapshots for ja.po.
[linuxjm/LDP_man-pages.git] / draft / man2 / setresuid.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@gmail.com>
26 .\"
27 .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
28 .\"         all rights reserved.
29 .\" Translated 1997-08-30, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
30 .\" Updated & Modified 2004-05-22, Yuichi SATO <ysato444@yahoo.co.jp>
31 .\" Updated & Modified 2005-01-04, Yuichi SATO
32 .\" Updated & Modified 2005-09-03, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
33 .\" Updated & Modified 2005-11-04, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
34 .\"
35 .\"WORD:        effective user ID       実効ユーザーID
36 .\"WORD:        real user ID            実ユーザーID
37 .\"WORD:        saved set-user-ID       保存セットユーザーID
38 .\"WORD:        effective group ID      実効グループID
39 .\"WORD:        real group ID           実グループID
40 .\"WORD:        saved group ID          保存グループID
41 .\"
42 .TH SETRESUID 2 2007-07-26 "Linux" "Linux Programmer's Manual"
43 .\"O .SH NAME
44 .SH 名前
45 .\"O setresuid, setresgid \- set real, effective and saved user or group ID
46 setresuid, setresgid \- ユーザやグループの 実、実効、保存 ID を設定する
47 .\"O .SH SYNOPSIS
48 .SH 書式
49 .\"O .BR "#define _GNU_SOURCE" "         /* See feature_test_macros(7) */"
50 .BR "#define _GNU_SOURCE" "         /* feature_test_macros(7) 参照 */"
51 .br
52 .B #include <unistd.h>
53 .sp
54 .BI "int setresuid(uid_t " ruid ", uid_t " euid ", uid_t " suid );
55 .br
56 .BI "int setresgid(gid_t " rgid ", gid_t " egid ", gid_t " sgid );
57 .\"O .SH DESCRIPTION
58 .SH 説明
59 .\"O .BR setresuid ()
60 .\"O sets the real user ID, the effective user ID, and the
61 .\"O saved set-user-ID of the calling process.
62 .BR setresuid ()
63 は呼び出し元のプロセスの実 (real) ユーザーID、実効 (effective) ユーザーID、
64 保存 set-user-ID を設定する。
65
66 .\"O Unprivileged user processes
67 .\"O may change the real UID,
68 .\"O effective UID and saved set-user-ID, each to one of:
69 .\"O the current real UID, the current effective UID or the
70 .\"O current saved set-user-ID.
71 非特権ユーザーのプロセスは、その実 UID、実効 UID、保存 set-user-ID を、
72 現在の実 UID、現在の実効 UID、現在の保存 set-user-ID
73 のどれかに変更することができる:
74
75 .\"O Privileged processes (on Linux, those having the \fBCAP_SETUID\fP capability)
76 .\"O may set the real UID, effective UID, and
77 .\"O saved set-user-ID to arbitrary values.
78 特権プロセス (Linux では \fBCAP_SETUID\fP ケーパビリティ (capability) を持つ
79 プロセス) は、実 UID、実効 UID、保存 set-user-ID を任意の値に設定できる。
80
81 .\"O If one of the arguments equals \-1, the corresponding value is not changed.
82 引き数のどれかが \-1 の場合はその値は変更されずに残される。
83
84 .\"O Regardless of what changes are made to the real UID, effective UID,
85 .\"O and saved set-user-ID, the file system UID is always set to the same
86 .\"O value as the (possibly new) effective UID.
87 実 UID、実効 UID、保存 set-user-ID にどんな変更が行われたかに関わらず、
88 ファイルシステム UID は常に実効 UID (可能であれば変更後の新しい実効 UID)
89 と同じ値に設定される。
90
91 .\"O Completely analogously,
92 .\"O .BR setresgid ()
93 .\"O sets the real GID, effective GID, and saved set-group-ID
94 .\"O of the calling process (and always modifies the file system GID
95 .\"O to be the same as the effective GID),
96 .\"O with the same restrictions for unprivileged processes.
97 全く同じように、
98 .BR setresgid ()
99 は呼び出し元のプロセスの実 GID、実効 GID、保存 set-group-ID を設定する
100 (さらにファイルシステム GID を実効 GID と同じ値に修正する)。
101 非特権プロセスは同様の制限を受ける。
102 .\"O .SH "RETURN VALUE"
103 .SH 返り値
104 .\"O On success, zero is returned.
105 .\"O On error, \-1 is returned, and
106 .\"O .I errno
107 .\"O is set appropriately.
108 成功した場合は 0 が返される。エラーの場合は \-1 が返され、
109 .I errno
110 が適切に設定される。
111 .\"O .SH ERRORS
112 .SH エラー
113 .TP
114 .B EAGAIN
115 .\"O .I uid
116 .\"O does not match the current UID and this call would
117 .\"O bring that user ID over its
118 .\"O .B RLIMIT_NPROC
119 .\"O resource limit.
120 .I uid
121 が現在のユーザー ID と違う値で、
122 この呼び出しにより ユーザー ID が
123 リソース上限
124 .B RLIMIT_NPROC
125 を超えてしまう。
126 .TP
127 .B EPERM
128 .\"O The calling process is not privileged (did not have the \fBCAP_SETUID\fP
129 .\"O capability) and tried to change the IDs to values that are not permitted.
130 呼び出したプロセスが特権を持たないのに
131 (\fBCAP_SETUID\fP ケーパビリティを持たないのに)、
132 ID を許されていない値に変更しようとした。
133 .\"O .SH VERSIONS
134 .SH バージョン
135 .\"O It is available under Linux since Linux 2.1.44.
136 Linux ではバージョン 2.1.44 より利用可能になった。
137 .\"O .SH "CONFORMING TO"
138 .SH 準拠
139 .\"O These calls are nonstandard;
140 .\"O they also appear on HP-UX and some of the BSDs.
141 これらのコールは非標準である。
142 HP-UX や BSD 系のいくつかにも存在する。
143 .\"O .SH NOTES
144 .SH 注意
145 .\"O Under HP-UX and FreeBSD the prototype is found in
146 .\"O .IR <unistd.h> .
147 HP-UX や FreeBSD では
148 .I <unistd.h>
149 にプロトタイプが存在する。
150 .\"O Under Linux the prototype is provided by glibc since version 2.3.2.
151 Linux では、glibc 2.3.2 以降で
152 プロトタイプが提供されている。
153 .\"O .SH "SEE ALSO"
154 .SH 関連項目
155 .BR getresuid (2),
156 .BR getuid (2),
157 .BR setfsgid (2),
158 .BR setfsuid (2),
159 .BR setreuid (2),
160 .BR setuid (2),
161 .BR capabilities (7),
162 .BR credentials (7)