OSDN Git Service

並列表記以外の「・」を削除
[linuxjm/LDP_man-pages.git] / po4a / process / po / ja.po
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 msgid ""
7 msgstr ""
8 "Project-Id-Version: PACKAGE VERSION\n"
9 "POT-Creation-Date: 2015-01-23 22:25+0900\n"
10 "PO-Revision-Date: 2015-01-25 06:35+0900\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
13 "Language: \n"
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
17
18 #. type: TH
19 #: build/C/man2/acct.2:31 build/C/man5/acct.5:25
20 #, no-wrap
21 msgid "ACCT"
22 msgstr "ACCT"
23
24 #. type: TH
25 #: build/C/man2/acct.2:31
26 #, no-wrap
27 msgid "2008-06-16"
28 msgstr "2008-06-16"
29
30 #. type: TH
31 #: build/C/man2/acct.2:31 build/C/man5/acct.5:25
32 #: build/C/man7/capabilities.7:48 build/C/man2/capget.2:15
33 #: build/C/man7/cpuset.7:25 build/C/man7/credentials.7:27
34 #: build/C/man2/getgid.2:25 build/C/man2/getgroups.2:31
35 #: build/C/man2/getpid.2:25 build/C/man2/getpriority.2:45
36 #: build/C/man2/getresuid.2:28 build/C/man2/getrlimit.2:64
37 #: build/C/man2/getrusage.2:39 build/C/man2/getsid.2:26
38 #: build/C/man2/getuid.2:26 build/C/man2/iopl.2:33
39 #: build/C/man2/ioprio_set.2:24 build/C/man2/ipc.2:25
40 #: build/C/man7/namespaces.7:27 build/C/man7/pid_namespaces.7:27
41 #: build/C/man2/seteuid.2:29 build/C/man2/setfsgid.2:31
42 #: build/C/man2/setfsuid.2:31 build/C/man2/setgid.2:29
43 #: build/C/man2/setpgid.2:48 build/C/man2/setresuid.2:26
44 #: build/C/man2/setreuid.2:45 build/C/man2/setsid.2:31
45 #: build/C/man2/setuid.2:30 build/C/man7/svipc.7:40 build/C/man3/ulimit.3:27
46 #: build/C/man7/user_namespaces.7:27 build/C/man2/seccomp.2:27
47 #, no-wrap
48 msgid "Linux"
49 msgstr "Linux"
50
51 #. type: TH
52 #: build/C/man2/acct.2:31 build/C/man5/acct.5:25
53 #: build/C/man7/capabilities.7:48 build/C/man2/capget.2:15
54 #: build/C/man7/cpuset.7:25 build/C/man7/credentials.7:27
55 #: build/C/man2/getgid.2:25 build/C/man2/getgroups.2:31
56 #: build/C/man2/getpid.2:25 build/C/man2/getpriority.2:45
57 #: build/C/man2/getresuid.2:28 build/C/man2/getrlimit.2:64
58 #: build/C/man2/getrusage.2:39 build/C/man2/getsid.2:26
59 #: build/C/man2/getuid.2:26 build/C/man3/group_member.3:25
60 #: build/C/man2/iopl.2:33 build/C/man2/ioprio_set.2:24 build/C/man2/ipc.2:25
61 #: build/C/man7/namespaces.7:27 build/C/man7/pid_namespaces.7:27
62 #: build/C/man2/seteuid.2:29 build/C/man2/setfsgid.2:31
63 #: build/C/man2/setfsuid.2:31 build/C/man2/setgid.2:29
64 #: build/C/man2/setpgid.2:48 build/C/man2/setresuid.2:26
65 #: build/C/man2/setreuid.2:45 build/C/man2/setsid.2:31
66 #: build/C/man2/setuid.2:30 build/C/man7/svipc.7:40 build/C/man3/ulimit.3:27
67 #: build/C/man7/user_namespaces.7:27 build/C/man2/seccomp.2:27
68 #, no-wrap
69 msgid "Linux Programmer's Manual"
70 msgstr "Linux Programmer's Manual"
71
72 #. type: SH
73 #: build/C/man2/acct.2:32 build/C/man5/acct.5:26
74 #: build/C/man7/capabilities.7:49 build/C/man2/capget.2:16
75 #: build/C/man7/cpuset.7:26 build/C/man7/credentials.7:28
76 #: build/C/man2/getgid.2:26 build/C/man2/getgroups.2:32
77 #: build/C/man2/getpid.2:26 build/C/man2/getpriority.2:46
78 #: build/C/man2/getresuid.2:29 build/C/man2/getrlimit.2:65
79 #: build/C/man2/getrusage.2:40 build/C/man2/getsid.2:27
80 #: build/C/man2/getuid.2:27 build/C/man3/group_member.3:26
81 #: build/C/man2/iopl.2:34 build/C/man2/ioprio_set.2:25 build/C/man2/ipc.2:26
82 #: build/C/man7/namespaces.7:28 build/C/man7/pid_namespaces.7:28
83 #: build/C/man2/seteuid.2:30 build/C/man2/setfsgid.2:32
84 #: build/C/man2/setfsuid.2:32 build/C/man2/setgid.2:30
85 #: build/C/man2/setpgid.2:49 build/C/man2/setresuid.2:27
86 #: build/C/man2/setreuid.2:46 build/C/man2/setsid.2:32
87 #: build/C/man2/setuid.2:31 build/C/man7/svipc.7:41 build/C/man3/ulimit.3:28
88 #: build/C/man7/user_namespaces.7:28 build/C/man2/seccomp.2:28
89 #, no-wrap
90 msgid "NAME"
91 msgstr "名前"
92
93 #. type: Plain text
94 #: build/C/man2/acct.2:34
95 msgid "acct - switch process accounting on or off"
96 msgstr "acct - プロセスアカウントのオンとオフを切り換える"
97
98 #. type: SH
99 #: build/C/man2/acct.2:34 build/C/man5/acct.5:28 build/C/man2/capget.2:18
100 #: build/C/man2/getgid.2:28 build/C/man2/getgroups.2:34
101 #: build/C/man2/getpid.2:28 build/C/man2/getpriority.2:48
102 #: build/C/man2/getresuid.2:31 build/C/man2/getrlimit.2:67
103 #: build/C/man2/getrusage.2:42 build/C/man2/getsid.2:29
104 #: build/C/man2/getuid.2:29 build/C/man3/group_member.3:28
105 #: build/C/man2/iopl.2:36 build/C/man2/ioprio_set.2:27 build/C/man2/ipc.2:28
106 #: build/C/man2/seteuid.2:32 build/C/man2/setfsgid.2:34
107 #: build/C/man2/setfsuid.2:34 build/C/man2/setgid.2:32
108 #: build/C/man2/setpgid.2:51 build/C/man2/setresuid.2:29
109 #: build/C/man2/setreuid.2:48 build/C/man2/setsid.2:34
110 #: build/C/man2/setuid.2:33 build/C/man7/svipc.7:43 build/C/man3/ulimit.3:30
111 #: build/C/man2/seccomp.2:30
112 #, no-wrap
113 msgid "SYNOPSIS"
114 msgstr "書式"
115
116 #. type: Plain text
117 #: build/C/man2/acct.2:38
118 #, no-wrap
119 msgid "B<#include E<lt>unistd.hE<gt>>\n"
120 msgstr "B<#include E<lt>unistd.hE<gt>>\n"
121
122 #. type: Plain text
123 #: build/C/man2/acct.2:40
124 #, no-wrap
125 msgid "B<int acct(const char *>I<filename>B<);>\n"
126 msgstr "B<int acct(const char *>I<filename>B<);>\n"
127
128 #. type: Plain text
129 #: build/C/man2/acct.2:46 build/C/man2/getgroups.2:48
130 #: build/C/man2/getrlimit.2:84 build/C/man2/getsid.2:37
131 #: build/C/man3/group_member.3:36 build/C/man2/seteuid.2:44
132 #: build/C/man2/setpgid.2:71 build/C/man2/setreuid.2:60
133 msgid "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
134 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
135
136 #. type: Plain text
137 #: build/C/man2/acct.2:50
138 msgid "B<acct>(): _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\\ E<lt>\\ 500)"
139 msgstr "B<acct>(): _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\\ E<lt>\\ 500)"
140
141 #. type: SH
142 #: build/C/man2/acct.2:50 build/C/man5/acct.5:30
143 #: build/C/man7/capabilities.7:51 build/C/man2/capget.2:24
144 #: build/C/man7/cpuset.7:28 build/C/man7/credentials.7:30
145 #: build/C/man2/getgid.2:36 build/C/man2/getgroups.2:52
146 #: build/C/man2/getpid.2:36 build/C/man2/getpriority.2:56
147 #: build/C/man2/getresuid.2:39 build/C/man2/getrlimit.2:88
148 #: build/C/man2/getrusage.2:48 build/C/man2/getsid.2:50
149 #: build/C/man2/getuid.2:37 build/C/man3/group_member.3:40
150 #: build/C/man2/iopl.2:40 build/C/man2/ioprio_set.2:35 build/C/man2/ipc.2:34
151 #: build/C/man7/namespaces.7:30 build/C/man7/pid_namespaces.7:30
152 #: build/C/man2/seteuid.2:53 build/C/man2/setfsgid.2:38
153 #: build/C/man2/setfsuid.2:38 build/C/man2/setgid.2:38
154 #: build/C/man2/setpgid.2:100 build/C/man2/setresuid.2:37
155 #: build/C/man2/setreuid.2:70 build/C/man2/setsid.2:41
156 #: build/C/man2/setuid.2:39 build/C/man7/svipc.7:49 build/C/man3/ulimit.3:34
157 #: build/C/man7/user_namespaces.7:30 build/C/man2/seccomp.2:43
158 #, no-wrap
159 msgid "DESCRIPTION"
160 msgstr "説明"
161
162 #. type: Plain text
163 #: build/C/man2/acct.2:60
164 msgid "The B<acct>()  system call enables or disables process accounting.  If called with the name of an existing file as its argument, accounting is turned on, and records for each terminating process are appended to I<filename> as it terminates.  An argument of NULL causes accounting to be turned off."
165 msgstr "B<acct>()  システムコールは、プロセスアカウントの有効・無効を切り替える。 既存のファイルの名前を引き数に指定して呼び出されたら、 アカウント (account) が有効になり、 終了したプロセスの記録が I<filename> に追記される。 NULL を引き数として呼び出されたらアカウントをオフにする。"
166
167 #. type: SH
168 #: build/C/man2/acct.2:60 build/C/man2/capget.2:160
169 #: build/C/man2/getgroups.2:92 build/C/man2/getpriority.2:104
170 #: build/C/man2/getresuid.2:50 build/C/man2/getrlimit.2:461
171 #: build/C/man2/getrusage.2:188 build/C/man2/getsid.2:58
172 #: build/C/man3/group_member.3:48 build/C/man2/iopl.2:66
173 #: build/C/man2/ioprio_set.2:149 build/C/man2/seteuid.2:67
174 #: build/C/man2/setfsgid.2:68 build/C/man2/setfsuid.2:68
175 #: build/C/man2/setgid.2:53 build/C/man2/setpgid.2:195
176 #: build/C/man2/setresuid.2:64 build/C/man2/setreuid.2:93
177 #: build/C/man2/setsid.2:54 build/C/man2/setuid.2:70 build/C/man3/ulimit.3:67
178 #: build/C/man2/seccomp.2:342
179 #, no-wrap
180 msgid "RETURN VALUE"
181 msgstr "返り値"
182
183 #. type: Plain text
184 #: build/C/man2/acct.2:65 build/C/man2/capget.2:165
185 #: build/C/man2/getresuid.2:55 build/C/man2/getrusage.2:193
186 #: build/C/man2/iopl.2:71 build/C/man2/seteuid.2:72 build/C/man2/setgid.2:58
187 #: build/C/man2/setresuid.2:69 build/C/man2/setreuid.2:98
188 #: build/C/man2/setuid.2:75
189 msgid "On success, zero is returned.  On error, -1 is returned, and I<errno> is set appropriately."
190 msgstr "成功した場合は 0 が返される。エラーの場合は -1 が返され、 I<errno> が適切に設定される。"
191
192 #. type: SH
193 #: build/C/man2/acct.2:65 build/C/man2/capget.2:179 build/C/man7/cpuset.7:1100
194 #: build/C/man2/getgid.2:42 build/C/man2/getgroups.2:106
195 #: build/C/man2/getpid.2:44 build/C/man2/getpriority.2:117
196 #: build/C/man2/getresuid.2:55 build/C/man2/getrlimit.2:466
197 #: build/C/man2/getrusage.2:193 build/C/man2/getsid.2:63
198 #: build/C/man2/getuid.2:43 build/C/man2/iopl.2:71
199 #: build/C/man2/ioprio_set.2:169 build/C/man2/seteuid.2:79
200 #: build/C/man2/setgid.2:58 build/C/man2/setpgid.2:216
201 #: build/C/man2/setresuid.2:76 build/C/man2/setreuid.2:105
202 #: build/C/man2/setsid.2:61 build/C/man2/setuid.2:82 build/C/man3/ulimit.3:74
203 #: build/C/man2/seccomp.2:358
204 #, no-wrap
205 msgid "ERRORS"
206 msgstr "エラー"
207
208 #. type: TP
209 #: build/C/man2/acct.2:66 build/C/man7/cpuset.7:1116
210 #: build/C/man7/cpuset.7:1123 build/C/man7/cpuset.7:1129
211 #: build/C/man7/cpuset.7:1137 build/C/man7/cpuset.7:1144
212 #: build/C/man2/getpriority.2:137 build/C/man2/setpgid.2:217
213 #, no-wrap
214 msgid "B<EACCES>"
215 msgstr "B<EACCES>"
216
217 #. type: Plain text
218 #: build/C/man2/acct.2:77
219 msgid "Write permission is denied for the specified file, or search permission is denied for one of the directories in the path prefix of I<filename> (see also B<path_resolution>(7)), or I<filename> is not a regular file."
220 msgstr "指定したファイルへの書き込み許可がなく、書き込みが拒否された。 または I<filename> のディレクトリ部分の何れかのディレクトリに検索許可がなく拒否された (B<path_resolution>(7)  も参照すること)。 または I<filename> が通常 (regular) のファイルでない。"
221
222 #. type: TP
223 #: build/C/man2/acct.2:77 build/C/man2/capget.2:180 build/C/man7/cpuset.7:1172
224 #: build/C/man2/getgroups.2:107 build/C/man2/getresuid.2:56
225 #: build/C/man2/getrlimit.2:467 build/C/man2/getrusage.2:194
226 #: build/C/man2/seccomp.2:369
227 #, no-wrap
228 msgid "B<EFAULT>"
229 msgstr "B<EFAULT>"
230
231 #. type: Plain text
232 #: build/C/man2/acct.2:81
233 msgid "I<filename> points outside your accessible address space."
234 msgstr "アクセスできるアドレス空間の外を I<filename> が指している。"
235
236 #. type: TP
237 #: build/C/man2/acct.2:81 build/C/man7/cpuset.7:1238
238 #: build/C/man7/cpuset.7:1246
239 #, no-wrap
240 msgid "B<EIO>"
241 msgstr "B<EIO>"
242
243 #. type: Plain text
244 #: build/C/man2/acct.2:85
245 msgid "Error writing to the file I<filename>."
246 msgstr "I<filename> への書き込みにエラーが発生した。"
247
248 #. type: TP
249 #: build/C/man2/acct.2:85
250 #, no-wrap
251 msgid "B<EISDIR>"
252 msgstr "B<EISDIR>"
253
254 #. type: Plain text
255 #: build/C/man2/acct.2:89
256 msgid "I<filename> is a directory."
257 msgstr "I<filename> がディレクトリである。"
258
259 #. type: TP
260 #: build/C/man2/acct.2:89
261 #, no-wrap
262 msgid "B<ELOOP>"
263 msgstr "B<ELOOP>"
264
265 #. type: Plain text
266 #: build/C/man2/acct.2:93
267 msgid "Too many symbolic links were encountered in resolving I<filename>."
268 msgstr "I<filename> の実体にたどり着くまでのシンボリックリンクの数が多すぎる。"
269
270 #. type: TP
271 #: build/C/man2/acct.2:93 build/C/man7/cpuset.7:1251
272 #: build/C/man7/cpuset.7:1258 build/C/man7/cpuset.7:1263
273 #, no-wrap
274 msgid "B<ENAMETOOLONG>"
275 msgstr "B<ENAMETOOLONG>"
276
277 #. type: Plain text
278 #: build/C/man2/acct.2:97
279 msgid "I<filename> was too long."
280 msgstr "I<filename> が長すぎる。"
281
282 #. type: TP
283 #: build/C/man2/acct.2:97
284 #, no-wrap
285 msgid "B<ENFILE>"
286 msgstr "B<ENFILE>"
287
288 #. type: Plain text
289 #: build/C/man2/acct.2:100
290 msgid "The system limit on the total number of open files has been reached."
291 msgstr "オープンされたファイルの総数がシステム制限に達した。"
292
293 #. type: TP
294 #: build/C/man2/acct.2:100 build/C/man7/cpuset.7:1275
295 #: build/C/man7/cpuset.7:1280
296 #, no-wrap
297 msgid "B<ENOENT>"
298 msgstr "B<ENOENT>"
299
300 #. type: Plain text
301 #: build/C/man2/acct.2:103
302 msgid "The specified filename does not exist."
303 msgstr "指定されたファイルが存在しない。"
304
305 #. type: TP
306 #: build/C/man2/acct.2:103 build/C/man7/cpuset.7:1287
307 #: build/C/man2/getgroups.2:127 build/C/man2/seccomp.2:413
308 #: build/C/man2/seccomp.2:416
309 #, no-wrap
310 msgid "B<ENOMEM>"
311 msgstr "B<ENOMEM>"
312
313 #. type: Plain text
314 #: build/C/man2/acct.2:106 build/C/man2/getgroups.2:130
315 #: build/C/man2/seccomp.2:416
316 msgid "Out of memory."
317 msgstr "メモリ不足。"
318
319 #. type: TP
320 #: build/C/man2/acct.2:106 build/C/man2/iopl.2:76
321 #, no-wrap
322 msgid "B<ENOSYS>"
323 msgstr "B<ENOSYS>"
324
325 #. type: Plain text
326 #: build/C/man2/acct.2:112
327 msgid "BSD process accounting has not been enabled when the operating system kernel was compiled.  The kernel configuration parameter controlling this feature is B<CONFIG_BSD_PROCESS_ACCT>."
328 msgstr "カーネルをコンパイルした時に BSD プロセスアカウントが有効になっていない。 この機能はカーネルのコンフィグの B<CONFIG_BSD_PROCESS_ACCT> パラメータによって制御される。"
329
330 #. type: TP
331 #: build/C/man2/acct.2:112 build/C/man7/cpuset.7:1314
332 #, no-wrap
333 msgid "B<ENOTDIR>"
334 msgstr "B<ENOTDIR>"
335
336 #. type: Plain text
337 #: build/C/man2/acct.2:117
338 msgid "A component used as a directory in I<filename> is not in fact a directory."
339 msgstr "I<filename> の中でディレクトリして扱われている要素が、 実際はディレクトリでない。"
340
341 #. type: TP
342 #: build/C/man2/acct.2:117 build/C/man2/capget.2:191 build/C/man2/capget.2:196
343 #: build/C/man7/cpuset.7:1319 build/C/man2/getgroups.2:130
344 #: build/C/man2/getpriority.2:149 build/C/man2/getrlimit.2:483
345 #: build/C/man2/getrlimit.2:488 build/C/man2/getrlimit.2:496
346 #: build/C/man2/getsid.2:64 build/C/man2/iopl.2:79
347 #: build/C/man2/ioprio_set.2:179 build/C/man2/seteuid.2:83
348 #: build/C/man2/setgid.2:64 build/C/man2/setpgid.2:231
349 #: build/C/man2/setresuid.2:103 build/C/man2/setreuid.2:132
350 #: build/C/man2/setsid.2:62 build/C/man2/setuid.2:110 build/C/man3/ulimit.3:75
351 #, no-wrap
352 msgid "B<EPERM>"
353 msgstr "B<EPERM>"
354
355 #. type: Plain text
356 #: build/C/man2/acct.2:123
357 msgid "The calling process has insufficient privilege to enable process accounting.  On Linux the B<CAP_SYS_PACCT> capability is required."
358 msgstr "呼び出したプロセスにはプロセスアカウントを有効にするのに十分な特権がない。 Linux では B<CAP_SYS_PACCT> ケーパビリティ (capability) が必要である。"
359
360 #. type: TP
361 #: build/C/man2/acct.2:123
362 #, no-wrap
363 msgid "B<EROFS>"
364 msgstr "B<EROFS>"
365
366 #. type: Plain text
367 #: build/C/man2/acct.2:127
368 msgid "I<filename> refers to a file on a read-only filesystem."
369 msgstr "読み込みだけのファイルシステム上のファイルを I<filename> が参照している。"
370
371 #. type: TP
372 #: build/C/man2/acct.2:127
373 #, no-wrap
374 msgid "B<EUSERS>"
375 msgstr "B<EUSERS>"
376
377 #. type: Plain text
378 #: build/C/man2/acct.2:130
379 msgid "There are no more free file structures or we ran out of memory."
380 msgstr "使用可能なファイル構造体がないか、メモリが足りない。"
381
382 #. type: SH
383 #: build/C/man2/acct.2:130 build/C/man5/acct.5:153
384 #: build/C/man7/capabilities.7:1120 build/C/man2/capget.2:218
385 #: build/C/man7/credentials.7:287 build/C/man2/getgid.2:44
386 #: build/C/man2/getgroups.2:133 build/C/man2/getpid.2:46
387 #: build/C/man2/getpriority.2:157 build/C/man2/getresuid.2:67
388 #: build/C/man2/getrlimit.2:511 build/C/man2/getrusage.2:202
389 #: build/C/man2/getsid.2:79 build/C/man2/getuid.2:45
390 #: build/C/man3/group_member.3:55 build/C/man2/iopl.2:87
391 #: build/C/man2/ioprio_set.2:196 build/C/man2/ipc.2:45
392 #: build/C/man7/namespaces.7:359 build/C/man7/pid_namespaces.7:351
393 #: build/C/man2/seteuid.2:99 build/C/man2/setfsgid.2:75
394 #: build/C/man2/setfsuid.2:75 build/C/man2/setgid.2:71
395 #: build/C/man2/setpgid.2:250 build/C/man2/setresuid.2:109
396 #: build/C/man2/setreuid.2:148 build/C/man2/setsid.2:68
397 #: build/C/man2/setuid.2:117 build/C/man3/ulimit.3:78
398 #: build/C/man7/user_namespaces.7:645 build/C/man2/seccomp.2:435
399 #, no-wrap
400 msgid "CONFORMING TO"
401 msgstr "準拠"
402
403 #.  SVr4 documents an EBUSY error condition, but no EISDIR or ENOSYS.
404 #.  Also AIX and HP-UX document EBUSY (attempt is made
405 #.  to enable accounting when it is already enabled), as does Solaris
406 #.  (attempt is made to enable accounting using the same file that is
407 #.  currently being used).
408 #. type: Plain text
409 #: build/C/man2/acct.2:137
410 msgid "SVr4, 4.3BSD (but not POSIX)."
411 msgstr "SVr4, 4.3BSD (POSIX ではない)。"
412
413 #. type: SH
414 #: build/C/man2/acct.2:137 build/C/man5/acct.5:157
415 #: build/C/man7/capabilities.7:1126 build/C/man2/capget.2:220
416 #: build/C/man7/cpuset.7:1341 build/C/man7/credentials.7:293
417 #: build/C/man2/getgid.2:46 build/C/man2/getgroups.2:141
418 #: build/C/man2/getpid.2:48 build/C/man2/getpriority.2:160
419 #: build/C/man2/getresuid.2:70 build/C/man2/getrlimit.2:534
420 #: build/C/man2/getrusage.2:213 build/C/man2/getsid.2:81
421 #: build/C/man2/getuid.2:47 build/C/man2/iopl.2:91
422 #: build/C/man2/ioprio_set.2:198 build/C/man2/ipc.2:49
423 #: build/C/man2/seteuid.2:101 build/C/man2/setfsgid.2:79
424 #: build/C/man2/setfsuid.2:79 build/C/man2/setgid.2:73
425 #: build/C/man2/setpgid.2:272 build/C/man2/setresuid.2:112
426 #: build/C/man2/setreuid.2:154 build/C/man2/setsid.2:70
427 #: build/C/man2/setuid.2:122 build/C/man7/user_namespaces.7:648
428 #: build/C/man2/seccomp.2:439
429 #, no-wrap
430 msgid "NOTES"
431 msgstr "注意"
432
433 #. type: Plain text
434 #: build/C/man2/acct.2:140
435 msgid "No accounting is produced for programs running when a system crash occurs.  In particular, nonterminating processes are never accounted for."
436 msgstr "システムがクラッシュした時に実行中だったプログラムのアカウントは生成されない。 特に、終了しないプログラムがアカウントされることはない。"
437
438 #. type: Plain text
439 #: build/C/man2/acct.2:143
440 msgid "The structure of the records written to the accounting file is described in B<acct>(5)."
441 msgstr "アカウント用ファイルに書き込まれるレコードの構造体については B<acct>(5)  に説明がある。"
442
443 #. type: SH
444 #: build/C/man2/acct.2:143 build/C/man5/acct.5:174
445 #: build/C/man7/capabilities.7:1183 build/C/man2/capget.2:228
446 #: build/C/man7/cpuset.7:1488 build/C/man7/credentials.7:304
447 #: build/C/man2/getgid.2:62 build/C/man2/getgroups.2:178
448 #: build/C/man2/getpid.2:100 build/C/man2/getpriority.2:232
449 #: build/C/man2/getresuid.2:86 build/C/man2/getrlimit.2:766
450 #: build/C/man2/getrusage.2:253 build/C/man2/getsid.2:84
451 #: build/C/man2/getuid.2:73 build/C/man3/group_member.3:57
452 #: build/C/man2/iopl.2:100 build/C/man2/ioprio_set.2:346 build/C/man2/ipc.2:57
453 #: build/C/man7/namespaces.7:364 build/C/man7/pid_namespaces.7:356
454 #: build/C/man2/seteuid.2:141 build/C/man2/setfsgid.2:123
455 #: build/C/man2/setfsuid.2:131 build/C/man2/setgid.2:83
456 #: build/C/man2/setpgid.2:340 build/C/man2/setresuid.2:132
457 #: build/C/man2/setreuid.2:194 build/C/man2/setsid.2:93
458 #: build/C/man2/setuid.2:145 build/C/man7/svipc.7:335 build/C/man3/ulimit.3:83
459 #: build/C/man7/user_namespaces.7:1011 build/C/man2/seccomp.2:662
460 #, no-wrap
461 msgid "SEE ALSO"
462 msgstr "関連項目"
463
464 #. type: Plain text
465 #: build/C/man2/acct.2:145
466 msgid "B<acct>(5)"
467 msgstr "B<acct>(5)"
468
469 #. type: SH
470 #: build/C/man2/acct.2:145 build/C/man5/acct.5:179
471 #: build/C/man7/capabilities.7:1205 build/C/man2/capget.2:232
472 #: build/C/man7/cpuset.7:1506 build/C/man7/credentials.7:340
473 #: build/C/man2/getgid.2:67 build/C/man2/getgroups.2:186
474 #: build/C/man2/getpid.2:111 build/C/man2/getpriority.2:241
475 #: build/C/man2/getresuid.2:92 build/C/man2/getrlimit.2:784
476 #: build/C/man2/getrusage.2:260 build/C/man2/getsid.2:88
477 #: build/C/man2/getuid.2:78 build/C/man3/group_member.3:62
478 #: build/C/man2/iopl.2:104 build/C/man2/ioprio_set.2:354 build/C/man2/ipc.2:70
479 #: build/C/man7/namespaces.7:377 build/C/man7/pid_namespaces.7:365
480 #: build/C/man2/seteuid.2:149 build/C/man2/setfsgid.2:128
481 #: build/C/man2/setfsuid.2:136 build/C/man2/setgid.2:90
482 #: build/C/man2/setpgid.2:347 build/C/man2/setresuid.2:142
483 #: build/C/man2/setreuid.2:203 build/C/man2/setsid.2:100
484 #: build/C/man2/setuid.2:153 build/C/man7/svipc.7:353 build/C/man3/ulimit.3:88
485 #: build/C/man7/user_namespaces.7:1027 build/C/man2/seccomp.2:679
486 #, no-wrap
487 msgid "COLOPHON"
488 msgstr "この文書について"
489
490 #. type: Plain text
491 #: build/C/man2/acct.2:153 build/C/man5/acct.5:187
492 #: build/C/man7/capabilities.7:1213 build/C/man2/capget.2:240
493 #: build/C/man7/cpuset.7:1514 build/C/man7/credentials.7:348
494 #: build/C/man2/getgid.2:75 build/C/man2/getgroups.2:194
495 #: build/C/man2/getpid.2:119 build/C/man2/getpriority.2:249
496 #: build/C/man2/getresuid.2:100 build/C/man2/getrlimit.2:792
497 #: build/C/man2/getrusage.2:268 build/C/man2/getsid.2:96
498 #: build/C/man2/getuid.2:86 build/C/man3/group_member.3:70
499 #: build/C/man2/iopl.2:112 build/C/man2/ioprio_set.2:362 build/C/man2/ipc.2:78
500 #: build/C/man7/namespaces.7:385 build/C/man7/pid_namespaces.7:373
501 #: build/C/man2/seteuid.2:157 build/C/man2/setfsgid.2:136
502 #: build/C/man2/setfsuid.2:144 build/C/man2/setgid.2:98
503 #: build/C/man2/setpgid.2:355 build/C/man2/setresuid.2:150
504 #: build/C/man2/setreuid.2:211 build/C/man2/setsid.2:108
505 #: build/C/man2/setuid.2:161 build/C/man7/svipc.7:361 build/C/man3/ulimit.3:96
506 #: build/C/man7/user_namespaces.7:1035 build/C/man2/seccomp.2:687
507 msgid "This page is part of release 3.78 of the Linux I<man-pages> project.  A description of the project, information about reporting bugs, and the latest version of this page, can be found at \\%http://www.kernel.org/doc/man-pages/."
508 msgstr ""
509 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.78 の一部\n"
510 "である。プロジェクトの説明とバグ報告に関する情報は\n"
511 "http://www.kernel.org/doc/man-pages/ に書かれている。"
512
513 #. type: TH
514 #: build/C/man5/acct.5:25
515 #, no-wrap
516 msgid "2008-06-15"
517 msgstr "2008-06-15"
518
519 #. type: Plain text
520 #: build/C/man5/acct.5:28
521 msgid "acct - process accounting file"
522 msgstr "acct - プロセスアカウンティングファイル"
523
524 #. type: Plain text
525 #: build/C/man5/acct.5:30
526 msgid "B<#include E<lt>sys/acct.hE<gt>>"
527 msgstr "B<#include E<lt>sys/acct.hE<gt>>"
528
529 #. type: Plain text
530 #: build/C/man5/acct.5:36
531 msgid "If the kernel is built with the process accounting option enabled (B<CONFIG_BSD_PROCESS_ACCT>), then calling B<acct>(2)  starts process accounting, for example:"
532 msgstr "カーネルがプロセスアカウンティングのオプション (B<CONFIG_BSD_PROCESS_ACCT>)  を有効にして作成されていると、以下のように B<acct>(2)  を呼び出すとプロセスアカウンティングが開始される。"
533
534 #. type: Plain text
535 #: build/C/man5/acct.5:39
536 msgid "acct(\"/var/log/pacct\");"
537 msgstr "acct(\"/var/log/pacct\");"
538
539 #. type: Plain text
540 #: build/C/man5/acct.5:47
541 msgid "When process accounting is enabled, the kernel writes a record to the accounting file as each process on the system terminates.  This record contains information about the terminated process, and is defined in I<E<lt>sys/acct.hE<gt>> as follows:"
542 msgstr "プロセスアカウンティングが有効になっていると、カーネルは システム上の各プロセスが終了するたびにアカウンティングファイルに レコードを書き込む。 このレコードは、終了したプロセスに関する情報を保持するもので、 I<E<lt>sys/acct.hE<gt>> で以下のように定義されている。"
543
544 #. type: Plain text
545 #: build/C/man5/acct.5:51
546 #, no-wrap
547 msgid "#define ACCT_COMM 16\n"
548 msgstr "#define ACCT_COMM 16\n"
549
550 #. type: Plain text
551 #: build/C/man5/acct.5:53
552 #, no-wrap
553 msgid "typedef u_int16_t comp_t;\n"
554 msgstr "typedef u_int16_t comp_t;\n"
555
556 #. type: Plain text
557 #: build/C/man5/acct.5:77
558 #, no-wrap
559 msgid ""
560 "struct acct {\n"
561 "    char ac_flag;           /* Accounting flags */\n"
562 "    u_int16_t ac_uid;       /* Accounting user ID */\n"
563 "    u_int16_t ac_gid;       /* Accounting group ID */\n"
564 "    u_int16_t ac_tty;       /* Controlling terminal */\n"
565 "    u_int32_t ac_btime;     /* Process creation time\n"
566 "                               (seconds since the Epoch) */\n"
567 "    comp_t    ac_utime;     /* User CPU time */\n"
568 "    comp_t    ac_stime;     /* System CPU time */\n"
569 "    comp_t    ac_etime;     /* Elapsed time */\n"
570 "    comp_t    ac_mem;       /* Average memory usage (kB) */\n"
571 "    comp_t    ac_io;        /* Characters transferred (unused) */\n"
572 "    comp_t    ac_rw;        /* Blocks read or written (unused) */\n"
573 "    comp_t    ac_minflt;    /* Minor page faults */\n"
574 "    comp_t    ac_majflt;    /* Major page faults */\n"
575 "    comp_t    ac_swaps;     /* Number of swaps (unused) */\n"
576 "    u_int32_t ac_exitcode;  /* Process termination status\n"
577 "                               (see wait(2)) */\n"
578 "    char      ac_comm[ACCT_COMM+1];\n"
579 "                            /* Command name (basename of last\n"
580 "                               executed command; null-terminated) */\n"
581 "    char      ac_pad[I<X>];    /* padding bytes */\n"
582 "};\n"
583 msgstr ""
584 "struct acct {\n"
585 "    char ac_flag;           /* Accounting flags */\n"
586 "    u_int16_t ac_uid;       /* Accounting user ID */\n"
587 "    u_int16_t ac_gid;       /* Accounting group ID */\n"
588 "    u_int16_t ac_tty;       /* Controlling terminal */\n"
589 "    u_int32_t ac_btime;     /* Process creation time\n"
590 "                               (seconds since the Epoch) */\n"
591 "    comp_t    ac_utime;     /* User CPU time */\n"
592 "    comp_t    ac_stime;     /* System CPU time */\n"
593 "    comp_t    ac_etime;     /* Elapsed time */\n"
594 "    comp_t    ac_mem;       /* Average memory usage (kB) */\n"
595 "    comp_t    ac_io;        /* Characters transferred (unused) */\n"
596 "    comp_t    ac_rw;        /* Blocks read or written (unused) */\n"
597 "    comp_t    ac_minflt;    /* Minor page faults */\n"
598 "    comp_t    ac_majflt;    /* Major page faults */\n"
599 "    comp_t    ac_swaps;     /* Number of swaps (unused) */\n"
600 "    u_int32_t ac_exitcode;  /* Process termination status\n"
601 "                               (see wait(2)) */\n"
602 "    char      ac_comm[ACCT_COMM+1];\n"
603 "                            /* Command name (basename of last\n"
604 "                               executed command; null-terminated) */\n"
605 "    char      ac_pad[I<X>];    /* padding bytes */\n"
606 "};\n"
607
608 #. type: Plain text
609 #: build/C/man5/acct.5:84
610 #, no-wrap
611 msgid ""
612 "enum {          /* Bits that may be set in ac_flag field */\n"
613 "    AFORK = 0x01,           /* Has executed fork, but no exec */\n"
614 "    ASU   = 0x02,           /* Used superuser privileges */\n"
615 "    ACORE = 0x08,           /* Dumped core */\n"
616 "    AXSIG = 0x10            /* Killed by a signal */\n"
617 "};\n"
618 msgstr ""
619 "enum {          /* Bits that may be set in ac_flag field */\n"
620 "    AFORK = 0x01,           /* Has executed fork, but no exec */\n"
621 "    ASU   = 0x02,           /* Used superuser privileges */\n"
622 "    ACORE = 0x08,           /* Dumped core */\n"
623 "    AXSIG = 0x10            /* Killed by a signal */\n"
624 "};\n"
625
626 #. type: Plain text
627 #: build/C/man5/acct.5:94
628 msgid "The I<comp_t> data type is a floating-point value consisting of a 3-bit, base-8 exponent, and a 13-bit mantissa.  A value, I<c>, of this type can be converted to a (long) integer as follows:"
629 msgstr "データ型 I<comp_t> は浮動小数点値で、3 ビット幅の基数が 8 の指数部と 13 ビット幅の仮数部から 構成される。 I<comp_t> 型の値 I<c> は以下のようにして (long 型の) 整数に変換できる。"
630
631 #. type: Plain text
632 #: build/C/man5/acct.5:97
633 #, no-wrap
634 msgid "    v = (c & 0x1fff) E<lt>E<lt> (((c E<gt>E<gt> 13) & 0x7) * 3);\n"
635 msgstr "    v = (c & 0x1fff) E<lt>E<lt> (((c E<gt>E<gt> 13) & 0x7) * 3);\n"
636
637 #. type: Plain text
638 #: build/C/man5/acct.5:107
639 msgid "The I<ac_utime>, I<ac_stime>, and I<ac_etime> fields measure time in \"clock ticks\"; divide these values by I<sysconf(_SC_CLK_TCK)> to convert them to seconds."
640 msgstr "フィールド I<ac_utime>, I<ac_stime>, I<ac_etime> は \"clock ticks\" 単位で計測した時間である。 これらの値を I<sysconf(_SC_CLK_TCK)> で割ると、秒に変換できる。"
641
642 #. type: SS
643 #: build/C/man5/acct.5:107
644 #, no-wrap
645 msgid "Version 3 accounting file format"
646 msgstr "バージョン 3 のアカウンティングファイルのフォーマット"
647
648 #. type: Plain text
649 #: build/C/man5/acct.5:122
650 msgid "Since kernel 2.6.8, an optional alternative version of the accounting file can be produced if the B<CONFIG_BSD_PROCESS_ACCT_V3> option is set when building the kernel.  With this option is set, the records written to the accounting file contain additional fields, and the width of I<c_uid> and I<ac_gid> fields is widened from 16 to 32 bits (in line with the increased size of UID and GIDs in Linux 2.4 and later).  The records are defined as follows:"
651 msgstr "カーネル 2.6.8 以降では、 別のバージョンのアカウンティングファイルを生成することができ、 これを使うにはカーネル構築時に B<CONFIG_BSD_PROCESS_ACCT_V3> オプションが有効になっている必要がある。 このオプションが設定されると、アカウンティングファイルに書き込まれる レコードにフィールドが追加される。 また、フィールド I<c_uid> と I<ac_gid> の幅が 16 ビットから 32 ビットに拡張される (これは Linux 2.4 以降で UID と GID のサイズが増えているのに 対応したものである)。 このレコードは以下のように定義されている。"
652
653 #. type: Plain text
654 #: build/C/man5/acct.5:147
655 #, no-wrap
656 msgid ""
657 "struct acct_v3 {\n"
658 "    char      ac_flag;      /* Flags */\n"
659 "    char      ac_version;   /* Always set to ACCT_VERSION (3) */\n"
660 "    u_int16_t ac_tty;       /* Controlling terminal */\n"
661 "    u_int32_t ac_exitcode;  /* Process termination status */\n"
662 "    u_int32_t ac_uid;       /* Real user ID */\n"
663 "    u_int32_t ac_gid;       /* Real group ID */\n"
664 "    u_int32_t ac_pid;       /* Process ID */\n"
665 "    u_int32_t ac_ppid;      /* Parent process ID */\n"
666 "    u_int32_t ac_btime;     /* Process creation time */\n"
667 "    float     ac_etime;     /* Elapsed time */\n"
668 "    comp_t    ac_utime;     /* User CPU time */\n"
669 "    comp_t    ac_stime;     /* System time */\n"
670 "    comp_t    ac_mem;       /* Average memory usage (kB) */\n"
671 "    comp_t    ac_io;        /* Characters transferred (unused) */\n"
672 "    comp_t    ac_rw;        /* Blocks read or written\n"
673 "                               (unused) */\n"
674 "    comp_t    ac_minflt;    /* Minor page faults */\n"
675 "    comp_t    ac_majflt;    /* Major page faults */\n"
676 "    comp_t    ac_swaps;     /* Number of swaps (unused) */\n"
677 "    char      ac_comm[ACCT_COMM]; /* Command name */\n"
678 "};\n"
679 msgstr ""
680 "struct acct_v3 {\n"
681 "    char      ac_flag;      /* Flags */\n"
682 "    char      ac_version;   /* Always set to ACCT_VERSION (3) */\n"
683 "    u_int16_t ac_tty;       /* Controlling terminal */\n"
684 "    u_int32_t ac_exitcode;  /* Process termination status */\n"
685 "    u_int32_t ac_uid;       /* Real user ID */\n"
686 "    u_int32_t ac_gid;       /* Real group ID */\n"
687 "    u_int32_t ac_pid;       /* Process ID */\n"
688 "    u_int32_t ac_ppid;      /* Parent process ID */\n"
689 "    u_int32_t ac_btime;     /* Process creation time */\n"
690 "    float     ac_etime;     /* Elapsed time */\n"
691 "    comp_t    ac_utime;     /* User CPU time */\n"
692 "    comp_t    ac_stime;     /* System time */\n"
693 "    comp_t    ac_mem;       /* Average memory usage (kB) */\n"
694 "    comp_t    ac_io;        /* Characters transferred (unused) */\n"
695 "    comp_t    ac_rw;        /* Blocks read or written\n"
696 "                               (unused) */\n"
697 "    comp_t    ac_minflt;    /* Minor page faults */\n"
698 "    comp_t    ac_majflt;    /* Major page faults */\n"
699 "    comp_t    ac_swaps;     /* Number of swaps (unused) */\n"
700 "    char      ac_comm[ACCT_COMM]; /* Command name */\n"
701 "};\n"
702
703 #. type: SH
704 #: build/C/man5/acct.5:149 build/C/man7/cpuset.7:1338
705 #: build/C/man2/getresuid.2:60 build/C/man2/getrlimit.2:506
706 #: build/C/man2/getsid.2:75 build/C/man2/ioprio_set.2:193
707 #: build/C/man2/setfsgid.2:71 build/C/man2/setfsuid.2:71
708 #: build/C/man2/setresuid.2:107 build/C/man2/seccomp.2:430
709 #, no-wrap
710 msgid "VERSIONS"
711 msgstr "バージョン"
712
713 #. type: Plain text
714 #: build/C/man5/acct.5:153
715 msgid "The I<acct_v3> structure is defined in glibc since version 2.6."
716 msgstr "I<acct_v3> 構造体はバージョン 2.6 以降の glibc で定義されている。"
717
718 #. type: Plain text
719 #: build/C/man5/acct.5:157
720 msgid "Process accounting originated on BSD.  Although it is present on most systems, it is not standardized, and the details vary somewhat between systems."
721 msgstr "プロセスアカウンティングは BSD 由来である。 この機能はほとんどのシステムに存在するが、標準化されておらず、 その詳細はシステムによりいくらか異なる。"
722
723 #. type: Plain text
724 #: build/C/man5/acct.5:160
725 msgid "Records in the accounting file are ordered by termination time of the process."
726 msgstr "アカウンティングファイルのレコードは、プロセスの終了時刻の順序となる。"
727
728 #. type: Plain text
729 #: build/C/man5/acct.5:167
730 msgid "In kernels up to and including 2.6.9, a separate accounting record is written for each thread created using the NPTL threading library; since Linux 2.6.10, a single accounting record is written for the entire process on termination of the last thread in the process."
731 msgstr "バージョン 2.6.9 以前のカーネルでは、 NPTL スレッドライブラリを使って作成されたスレッドでは スレッド毎に別々のアカウンティングレコードが書き込まれていた。 Linux 2.6.10 以降では、プロセス内の最後のスレッドが終了すると、 プロセス全体についてのアカウンティングレコードが一つだけ書き込まれる。"
732
733 #. type: Plain text
734 #: build/C/man5/acct.5:174
735 msgid "The I<proc/sys/kernel/acct> file, described in B<proc>(5), defines settings that control the behavior of process accounting when disk space runs low."
736 msgstr "I<proc/sys/kernel/acct> ファイル (B<proc>(5)  で説明されている) は、ディスク容量の残りが少なくなった際の プロセスアカウンティングの動作を制御する設定を保持している。"
737
738 #. type: Plain text
739 #: build/C/man5/acct.5:179
740 msgid "B<lastcomm>(1), B<acct>(2), B<accton>(8), B<sa>(8)"
741 msgstr "B<lastcomm>(1), B<acct>(2), B<accton>(8), B<sa>(8)"
742
743 #. type: TH
744 #: build/C/man7/capabilities.7:48
745 #, no-wrap
746 msgid "CAPABILITIES"
747 msgstr "CAPABILITIES"
748
749 #. type: TH
750 #: build/C/man7/capabilities.7:48 build/C/man2/getpid.2:25
751 #: build/C/man7/namespaces.7:27 build/C/man2/seteuid.2:29
752 #: build/C/man2/setgid.2:29 build/C/man2/setresuid.2:26
753 #: build/C/man2/setreuid.2:45 build/C/man2/setuid.2:30 build/C/man7/svipc.7:40
754 #: build/C/man7/user_namespaces.7:27
755 #, no-wrap
756 msgid "2014-09-21"
757 msgstr "2014-09-21"
758
759 #. type: Plain text
760 #: build/C/man7/capabilities.7:51
761 msgid "capabilities - overview of Linux capabilities"
762 msgstr "capabilities - Linux のケーパビリティ (capability) の概要"
763
764 #. type: Plain text
765 #: build/C/man7/capabilities.7:63
766 msgid "For the purpose of performing permission checks, traditional UNIX implementations distinguish two categories of processes: I<privileged> processes (whose effective user ID is 0, referred to as superuser or root), and I<unprivileged> processes (whose effective UID is nonzero).  Privileged processes bypass all kernel permission checks, while unprivileged processes are subject to full permission checking based on the process's credentials (usually: effective UID, effective GID, and supplementary group list)."
767 msgstr "権限のチェックを行う観点から見ると、伝統的な UNIX の実装では プロセスは二つのカテゴリに分類できる: I<特権> プロセス (実効ユーザID が 0 のプロセス。ユーザID 0 は スーパーユーザや root と呼ばれる) と I<非特権> プロセス (実効ユーザID が 0 以外のプロセス) である。 非特権プロセスでは、プロセスの資格情報 (通常は、実効UID 、実効GID と追加のグループリスト) に基づく権限チェックが行われるのに対し、 特権プロセスでは全てのカーネルの権限チェックがバイパスされる。"
768
769 #. type: Plain text
770 #: build/C/man7/capabilities.7:70
771 msgid "Starting with kernel 2.2, Linux divides the privileges traditionally associated with superuser into distinct units, known as I<capabilities>, which can be independently enabled and disabled.  Capabilities are a per-thread attribute."
772 msgstr "バージョン 2.2 以降の Linux では、 これまでスーパーユーザに結び付けられてきた権限を、 いくつかのグループに分割している。これらのグループは I<ケーパビリティ>(capability)  と呼ばれ、グループ毎に独立に有効、無効を設定できる。 ケーパビリティはスレッド単位の属性である。"
773
774 #. type: SS
775 #: build/C/man7/capabilities.7:70
776 #, no-wrap
777 msgid "Capabilities list"
778 msgstr "ケーパビリティのリスト"
779
780 #. type: Plain text
781 #: build/C/man7/capabilities.7:73
782 msgid "The following list shows the capabilities implemented on Linux, and the operations or behaviors that each capability permits:"
783 msgstr "以下のリストは、 Linux で実装されているケーパビリティと 各ケーパビリティが許可する操作と動作をまとめたものである。"
784
785 #. type: TP
786 #: build/C/man7/capabilities.7:73
787 #, no-wrap
788 msgid "B<CAP_AUDIT_CONTROL> (since Linux 2.6.11)"
789 msgstr "B<CAP_AUDIT_CONTROL> (Linux 2.6.11 以降)"
790
791 #. type: Plain text
792 #: build/C/man7/capabilities.7:77
793 msgid "Enable and disable kernel auditing; change auditing filter rules; retrieve auditing status and filtering rules."
794 msgstr "カーネル監査 (audit) の有効無効の切り替え、 監査のフィルタルールの変更、 監査の状況やフィルタルールの取得ができる。"
795
796 #. type: TP
797 #: build/C/man7/capabilities.7:77
798 #, no-wrap
799 msgid "B<CAP_AUDIT_READ> (since Linux 3.16)"
800 msgstr "B<CAP_AUDIT_READ> (Linux 3.16 以降)"
801
802 #.  commit a29b694aa1739f9d76538e34ae25524f9c549d59
803 #.  commit 3a101b8de0d39403b2c7e5c23fd0b005668acf48
804 #. type: Plain text
805 #: build/C/man7/capabilities.7:82
806 msgid "Allow reading the audit log via a multicast netlink socket."
807 msgstr "マルチキャスト netlink ソケット経由で監査ログの読み出しができる。"
808
809 #. type: TP
810 #: build/C/man7/capabilities.7:82
811 #, no-wrap
812 msgid "B<CAP_AUDIT_WRITE> (since Linux 2.6.11)"
813 msgstr "B<CAP_AUDIT_WRITE> (Linux 2.6.11 以降)"
814
815 #. type: Plain text
816 #: build/C/man7/capabilities.7:85
817 msgid "Write records to kernel auditing log."
818 msgstr "カーネル監査のログにレコードを書き込む。"
819
820 #. type: TP
821 #: build/C/man7/capabilities.7:85
822 #, no-wrap
823 msgid "B<CAP_BLOCK_SUSPEND> (since Linux 3.5)"
824 msgstr "B<CAP_BLOCK_SUSPEND> (Linux 3.5 以降)"
825
826 #. type: Plain text
827 #: build/C/man7/capabilities.7:91
828 msgid "Employ features that can block system suspend (B<epoll>(7)  B<EPOLLWAKEUP>, I</proc/sys/wake_lock>)."
829 msgstr "システムのサスペンドをブロックできる機能を使用する (B<epoll>(7)  B<EPOLLWAKEUP>, I</proc/sys/wake_lock>)。"
830
831 #. type: TP
832 #: build/C/man7/capabilities.7:91
833 #, no-wrap
834 msgid "B<CAP_CHOWN>"
835 msgstr "B<CAP_CHOWN>"
836
837 #. type: Plain text
838 #: build/C/man7/capabilities.7:95
839 msgid "Make arbitrary changes to file UIDs and GIDs (see B<chown>(2))."
840 msgstr "ファイルの UID とGID を任意に変更する (B<chown>(2)  参照)。"
841
842 #. type: TP
843 #: build/C/man7/capabilities.7:95
844 #, no-wrap
845 msgid "B<CAP_DAC_OVERRIDE>"
846 msgstr "B<CAP_DAC_OVERRIDE>"
847
848 #. type: Plain text
849 #: build/C/man7/capabilities.7:99
850 msgid "Bypass file read, write, and execute permission checks.  (DAC is an abbreviation of \"discretionary access control\".)"
851 msgstr "ファイルの読み出し、書き込み、実行の権限チェックをバイパスする (DAC は \"discretionary access control (任意のアクセス制御)\" の略である)。"
852
853 #. type: TP
854 #: build/C/man7/capabilities.7:99
855 #, no-wrap
856 msgid "B<CAP_DAC_READ_SEARCH>"
857 msgstr "B<CAP_DAC_READ_SEARCH>"
858
859 #. type: IP
860 #: build/C/man7/capabilities.7:103 build/C/man7/capabilities.7:106
861 #: build/C/man7/capabilities.7:116 build/C/man7/capabilities.7:126
862 #: build/C/man7/capabilities.7:130 build/C/man7/capabilities.7:132
863 #: build/C/man7/capabilities.7:134 build/C/man7/capabilities.7:204
864 #: build/C/man7/capabilities.7:206 build/C/man7/capabilities.7:208
865 #: build/C/man7/capabilities.7:210 build/C/man7/capabilities.7:212
866 #: build/C/man7/capabilities.7:214 build/C/man7/capabilities.7:216
867 #: build/C/man7/capabilities.7:218 build/C/man7/capabilities.7:220
868 #: build/C/man7/capabilities.7:244 build/C/man7/capabilities.7:246
869 #: build/C/man7/capabilities.7:296 build/C/man7/capabilities.7:306
870 #: build/C/man7/capabilities.7:312 build/C/man7/capabilities.7:317
871 #: build/C/man7/capabilities.7:323 build/C/man7/capabilities.7:327
872 #: build/C/man7/capabilities.7:334 build/C/man7/capabilities.7:337
873 #: build/C/man7/capabilities.7:345 build/C/man7/capabilities.7:347
874 #: build/C/man7/capabilities.7:356 build/C/man7/capabilities.7:365
875 #: build/C/man7/capabilities.7:368 build/C/man7/capabilities.7:372
876 #: build/C/man7/capabilities.7:380 build/C/man7/capabilities.7:383
877 #: build/C/man7/capabilities.7:390 build/C/man7/capabilities.7:395
878 #: build/C/man7/capabilities.7:401 build/C/man7/capabilities.7:405
879 #: build/C/man7/capabilities.7:409 build/C/man7/capabilities.7:413
880 #: build/C/man7/capabilities.7:417 build/C/man7/capabilities.7:444
881 #: build/C/man7/capabilities.7:449 build/C/man7/capabilities.7:455
882 #: build/C/man7/capabilities.7:458 build/C/man7/capabilities.7:461
883 #: build/C/man7/capabilities.7:471 build/C/man7/capabilities.7:475
884 #: build/C/man7/capabilities.7:492 build/C/man7/capabilities.7:495
885 #: build/C/man7/capabilities.7:499 build/C/man7/capabilities.7:504
886 #: build/C/man7/capabilities.7:513 build/C/man7/capabilities.7:518
887 #: build/C/man7/capabilities.7:521 build/C/man7/capabilities.7:526
888 #: build/C/man7/capabilities.7:529 build/C/man7/capabilities.7:532
889 #: build/C/man7/capabilities.7:535 build/C/man7/capabilities.7:538
890 #: build/C/man7/capabilities.7:543 build/C/man7/capabilities.7:545
891 #: build/C/man7/capabilities.7:551 build/C/man7/capabilities.7:559
892 #: build/C/man7/capabilities.7:561 build/C/man7/capabilities.7:565
893 #: build/C/man7/capabilities.7:567 build/C/man7/capabilities.7:570
894 #: build/C/man7/capabilities.7:574 build/C/man7/capabilities.7:576
895 #: build/C/man7/capabilities.7:578 build/C/man7/capabilities.7:580
896 #: build/C/man7/capabilities.7:589 build/C/man7/capabilities.7:596
897 #: build/C/man7/capabilities.7:601 build/C/man7/capabilities.7:606
898 #: build/C/man7/capabilities.7:611 build/C/man7/capabilities.7:636
899 #: build/C/man7/capabilities.7:643 build/C/man7/capabilities.7:844
900 #: build/C/man7/capabilities.7:852 build/C/man7/capabilities.7:1172
901 #: build/C/man7/capabilities.7:1177 build/C/man7/cpuset.7:540
902 #: build/C/man7/cpuset.7:545 build/C/man7/cpuset.7:550
903 #: build/C/man7/cpuset.7:726 build/C/man7/cpuset.7:730
904 #: build/C/man7/cpuset.7:927 build/C/man7/cpuset.7:930
905 #: build/C/man7/cpuset.7:934 build/C/man7/cpuset.7:938
906 #: build/C/man7/cpuset.7:942 build/C/man7/credentials.7:177
907 #: build/C/man7/credentials.7:183 build/C/man7/credentials.7:195
908 #: build/C/man7/credentials.7:217 build/C/man7/credentials.7:234
909 #: build/C/man7/credentials.7:266 build/C/man7/credentials.7:269
910 #: build/C/man7/credentials.7:280 build/C/man7/credentials.7:283
911 #: build/C/man2/getrlimit.2:690 build/C/man2/getrlimit.2:693
912 #: build/C/man7/namespaces.7:212 build/C/man7/namespaces.7:215
913 #: build/C/man7/namespaces.7:228 build/C/man7/pid_namespaces.7:233
914 #: build/C/man7/pid_namespaces.7:241 build/C/man7/pid_namespaces.7:252
915 #: build/C/man7/user_namespaces.7:261 build/C/man7/user_namespaces.7:266
916 #: build/C/man7/user_namespaces.7:272 build/C/man7/user_namespaces.7:285
917 #: build/C/man7/user_namespaces.7:306 build/C/man7/user_namespaces.7:474
918 #: build/C/man7/user_namespaces.7:477 build/C/man7/user_namespaces.7:479
919 #: build/C/man7/user_namespaces.7:492 build/C/man7/user_namespaces.7:505
920 #: build/C/man7/user_namespaces.7:532 build/C/man7/user_namespaces.7:541
921 #: build/C/man2/seccomp.2:265 build/C/man2/seccomp.2:269
922 #: build/C/man2/seccomp.2:272 build/C/man2/seccomp.2:277
923 #: build/C/man2/seccomp.2:281 build/C/man2/seccomp.2:455
924 #: build/C/man2/seccomp.2:463 build/C/man2/seccomp.2:469
925 #, no-wrap
926 msgid "*"
927 msgstr "*"
928
929 #. type: Plain text
930 #: build/C/man7/capabilities.7:106
931 msgid "Bypass file read permission checks and directory read and execute permission checks;"
932 msgstr "ファイルの読み出し権限のチェックとディレクトリの読み出しと実行 の権限チェックをバイパスする。"
933
934 #. type: Plain text
935 #: build/C/man7/capabilities.7:109
936 msgid "Invoke B<open_by_handle_at>(2)."
937 msgstr "B<open_by_handle_at>(2) を起動する。"
938
939 #. type: TP
940 #: build/C/man7/capabilities.7:112
941 #, no-wrap
942 msgid "B<CAP_FOWNER>"
943 msgstr "B<CAP_FOWNER>"
944
945 #. type: Plain text
946 #: build/C/man7/capabilities.7:126
947 msgid "Bypass permission checks on operations that normally require the filesystem UID of the process to match the UID of the file (e.g., B<chmod>(2), B<utime>(2)), excluding those operations covered by B<CAP_DAC_OVERRIDE> and B<CAP_DAC_READ_SEARCH>;"
948 msgstr "通常、プロセスのファイルシステム UID がファイルの UID に一致することが 要求される操作 (例えば B<chmod>(2), B<utime>(2))  における権限チェックをバイパスする。 但し、 B<CAP_DAC_OVERRIDE> か B<CAP_DAC_READ_SEARCH> によりチェックが行われる操作は除く。"
949
950 #. type: Plain text
951 #: build/C/man7/capabilities.7:130
952 msgid "set extended file attributes (see B<chattr>(1))  on arbitrary files;"
953 msgstr "任意のファイルに対して拡張ファイル属性を設定する (B<chattr>(1)  参照)。"
954
955 #. type: Plain text
956 #: build/C/man7/capabilities.7:132
957 msgid "set Access Control Lists (ACLs) on arbitrary files;"
958 msgstr "任意のファイルに対してアクセス制御リスト (ACL) を設定する。"
959
960 #. type: Plain text
961 #: build/C/man7/capabilities.7:134
962 msgid "ignore directory sticky bit on file deletion;"
963 msgstr "ファイルの削除の際にディレクトリのスティッキービットを無視する。"
964
965 #. type: Plain text
966 #: build/C/man7/capabilities.7:141
967 msgid "specify B<O_NOATIME> for arbitrary files in B<open>(2)  and B<fcntl>(2)."
968 msgstr "B<open>(2)  や B<fcntl>(2)  で任意のファイルに対して B<O_NOATIME> を指定する。"
969
970 #. type: TP
971 #: build/C/man7/capabilities.7:143
972 #, no-wrap
973 msgid "B<CAP_FSETID>"
974 msgstr "B<CAP_FSETID>"
975
976 #. type: Plain text
977 #: build/C/man7/capabilities.7:149
978 msgid "Don't clear set-user-ID and set-group-ID permission bits when a file is modified; set the set-group-ID bit for a file whose GID does not match the filesystem or any of the supplementary GIDs of the calling process."
979 msgstr "ファイルが変更されたときに set-user-ID とset-group-ID の許可ビットをクリア しない。呼び出し元プロセスのファイルシステム GID と追加の GID のいずれとも GID が一致しないファイルに対して set-group-ID ビットを設定する。"
980
981 #. type: TP
982 #: build/C/man7/capabilities.7:149
983 #, no-wrap
984 msgid "B<CAP_IPC_LOCK>"
985 msgstr "B<CAP_IPC_LOCK>"
986
987 #.  FIXME . As at Linux 3.2, there are some strange uses of this capability
988 #.  in other places; they probably should be replaced with something else.
989 #. type: Plain text
990 #: build/C/man7/capabilities.7:158
991 msgid "Lock memory (B<mlock>(2), B<mlockall>(2), B<mmap>(2), B<shmctl>(2))."
992 msgstr "メモリーのロック (B<mlock>(2), B<mlockall>(2), B<mmap>(2), B<shmctl>(2))  を行う。"
993
994 #. type: TP
995 #: build/C/man7/capabilities.7:158
996 #, no-wrap
997 msgid "B<CAP_IPC_OWNER>"
998 msgstr "B<CAP_IPC_OWNER>"
999
1000 #. type: Plain text
1001 #: build/C/man7/capabilities.7:161
1002 msgid "Bypass permission checks for operations on System V IPC objects."
1003 msgstr "System V IPC オブジェクトに対する操作に関して権限チェックをバイパスする。"
1004
1005 #. type: TP
1006 #: build/C/man7/capabilities.7:161
1007 #, no-wrap
1008 msgid "B<CAP_KILL>"
1009 msgstr "B<CAP_KILL>"
1010
1011 #.  FIXME . CAP_KILL also has an effect for threads + setting child
1012 #.        termination signal to other than SIGCHLD: without this
1013 #.        capability, the termination signal reverts to SIGCHLD
1014 #.        if the child does an exec().  What is the rationale
1015 #.        for this?
1016 #. type: Plain text
1017 #: build/C/man7/capabilities.7:174
1018 msgid "Bypass permission checks for sending signals (see B<kill>(2)).  This includes use of the B<ioctl>(2)  B<KDSIGACCEPT> operation."
1019 msgstr "シグナルを送信する際に権限チェックをバイパスする (B<kill>(2)  参照)。これには B<ioctl>(2)  の B<KDSIGACCEPT> 操作の使用も含まれる。"
1020
1021 #. type: TP
1022 #: build/C/man7/capabilities.7:174
1023 #, no-wrap
1024 msgid "B<CAP_LEASE> (since Linux 2.4)"
1025 msgstr "B<CAP_LEASE> (Linux 2.4 以降)"
1026
1027 #. type: Plain text
1028 #: build/C/man7/capabilities.7:178
1029 msgid "Establish leases on arbitrary files (see B<fcntl>(2))."
1030 msgstr "任意のファイルに対して ファイルリースを設定する (B<fcntl>(2)  参照)。"
1031
1032 #. type: TP
1033 #: build/C/man7/capabilities.7:178
1034 #, no-wrap
1035 msgid "B<CAP_LINUX_IMMUTABLE>"
1036 msgstr "B<CAP_LINUX_IMMUTABLE>"
1037
1038 #.  These attributes are now available on ext2, ext3, Reiserfs, XFS, JFS
1039 #. type: Plain text
1040 #: build/C/man7/capabilities.7:187
1041 msgid "Set the B<FS_APPEND_FL> and B<FS_IMMUTABLE_FL> inode flags (see B<chattr>(1))."
1042 msgstr "inode フラグ B<FS_APPEND_FL> と B<FS_IMMUTABLE_FL> を設定する (B<chattr>(1)  参照)。"
1043
1044 #. type: TP
1045 #: build/C/man7/capabilities.7:187
1046 #, no-wrap
1047 msgid "B<CAP_MAC_ADMIN> (since Linux 2.6.25)"
1048 msgstr "B<CAP_MAC_ADMIN> (Linux 2.6.25 以降)"
1049
1050 #. type: Plain text
1051 #: build/C/man7/capabilities.7:191
1052 msgid "Override Mandatory Access Control (MAC).  Implemented for the Smack Linux Security Module (LSM)."
1053 msgstr "強制アクセス制御 (MAC) を上書きする。 Smack Linux Security Module (LSM) 用に実装されている。"
1054
1055 #. type: TP
1056 #: build/C/man7/capabilities.7:191
1057 #, no-wrap
1058 msgid "B<CAP_MAC_OVERRIDE> (since Linux 2.6.25)"
1059 msgstr "B<CAP_MAC_OVERRIDE> (Linux 2.6.25 以降)"
1060
1061 #. type: Plain text
1062 #: build/C/man7/capabilities.7:195
1063 msgid "Allow MAC configuration or state changes.  Implemented for the Smack LSM."
1064 msgstr "MAC の設定や状態を変更する。 Smack LSM 用に実装されている。"
1065
1066 #. type: TP
1067 #: build/C/man7/capabilities.7:195
1068 #, no-wrap
1069 msgid "B<CAP_MKNOD> (since Linux 2.4)"
1070 msgstr "B<CAP_MKNOD> (Linux 2.4 以降)"
1071
1072 #. type: Plain text
1073 #: build/C/man7/capabilities.7:199
1074 msgid "Create special files using B<mknod>(2)."
1075 msgstr "(Linux 2.4 以降)  B<mknod>(2)  を使用してスペシャルファイルを作成する。"
1076
1077 #. type: TP
1078 #: build/C/man7/capabilities.7:199
1079 #, no-wrap
1080 msgid "B<CAP_NET_ADMIN>"
1081 msgstr "B<CAP_NET_ADMIN>"
1082
1083 #. type: Plain text
1084 #: build/C/man7/capabilities.7:202
1085 msgid "Perform various network-related operations:"
1086 msgstr "各種のネットワーク関係の操作を実行する:"
1087
1088 #. type: Plain text
1089 #: build/C/man7/capabilities.7:206
1090 msgid "interface configuration;"
1091 msgstr "インターフェースの設定"
1092
1093 #. type: Plain text
1094 #: build/C/man7/capabilities.7:208
1095 msgid "administration of IP firewall, masquerading, and accounting;"
1096 msgstr "IP のファイアウォール、マスカレード、アカウンティング"
1097
1098 #. type: Plain text
1099 #: build/C/man7/capabilities.7:210
1100 msgid "modify routing tables;"
1101 msgstr "ルーティングテーブルの変更"
1102
1103 #. type: Plain text
1104 #: build/C/man7/capabilities.7:212
1105 msgid "bind to any address for transparent proxying;"
1106 msgstr "透過的プロキシでの任意のアドレスの割り当て (bind)"
1107
1108 #. type: Plain text
1109 #: build/C/man7/capabilities.7:214
1110 msgid "set type-of-service (TOS)"
1111 msgstr "サービス種別 (type-of-service; TOS) のセット"
1112
1113 #. type: Plain text
1114 #: build/C/man7/capabilities.7:216
1115 msgid "clear driver statistics;"
1116 msgstr "ドライバの統計情報のクリア"
1117
1118 #. type: Plain text
1119 #: build/C/man7/capabilities.7:218
1120 msgid "set promiscuous mode;"
1121 msgstr "promiscuous モードをセットする"
1122
1123 #. type: Plain text
1124 #: build/C/man7/capabilities.7:220
1125 msgid "enabling multicasting;"
1126 msgstr "マルチキャストを有効にする"
1127
1128 #. type: Plain text
1129 #: build/C/man7/capabilities.7:231
1130 msgid "use B<setsockopt>(2)  to set the following socket options: B<SO_DEBUG>, B<SO_MARK>, B<SO_PRIORITY> (for a priority outside the range 0 to 6), B<SO_RCVBUFFORCE>, and B<SO_SNDBUFFORCE>."
1131 msgstr ""
1132 "B<setsockopt>(2) を使って以下のソケットオプションを設定する:\n"
1133 "B<SO_DEBUG>, B<SO_MARK>, \n"
1134 "B<SO_PRIORITY> (優先度を 0 から 6 以外に設定する場合),\n"
1135 "B<SO_RCVBUFFORCE>, and B<SO_SNDBUFFORCE>"
1136
1137 #. type: TP
1138 #: build/C/man7/capabilities.7:233
1139 #, no-wrap
1140 msgid "B<CAP_NET_BIND_SERVICE>"
1141 msgstr "B<CAP_NET_BIND_SERVICE>"
1142
1143 #. type: Plain text
1144 #: build/C/man7/capabilities.7:237
1145 msgid "Bind a socket to Internet domain privileged ports (port numbers less than 1024)."
1146 msgstr "インターネットドメインの特権ポート (ポート番号が 1024 番未満)  をバインドできる。"
1147
1148 #. type: TP
1149 #: build/C/man7/capabilities.7:237
1150 #, no-wrap
1151 msgid "B<CAP_NET_BROADCAST>"
1152 msgstr "B<CAP_NET_BROADCAST>"
1153
1154 #. type: Plain text
1155 #: build/C/man7/capabilities.7:240
1156 msgid "(Unused)  Make socket broadcasts, and listen to multicasts."
1157 msgstr "(未使用) ソケットのブロードキャストと、マルチキャストの待ち受けを行う。"
1158
1159 #. type: TP
1160 #: build/C/man7/capabilities.7:240
1161 #, no-wrap
1162 msgid "B<CAP_NET_RAW>"
1163 msgstr "B<CAP_NET_RAW>"
1164
1165 #. type: Plain text
1166 #: build/C/man7/capabilities.7:246
1167 msgid "use RAW and PACKET sockets;"
1168 msgstr "RAW ソケットと PACKET ソケットを使用する。"
1169
1170 #. type: Plain text
1171 #: build/C/man7/capabilities.7:248
1172 msgid "bind to any address for transparent proxying."
1173 msgstr "透過的プロキシでの任意のアドレスの割り当て (bind)"
1174
1175 #. type: TP
1176 #: build/C/man7/capabilities.7:251
1177 #, no-wrap
1178 msgid "B<CAP_SETGID>"
1179 msgstr "B<CAP_SETGID>"
1180
1181 #. type: Plain text
1182 #: build/C/man7/capabilities.7:257
1183 msgid "Make arbitrary manipulations of process GIDs and supplementary GID list; forge GID when passing socket credentials via UNIX domain sockets; write a group ID mapping in a user namespace (see B<user_namespaces>(7))."
1184 msgstr "プロセスの GID と追加の GID リストに対する任意の操作を行う。 UNIX ドメインソケット経由でソケットの資格情報 (credential) を渡す際に 偽の GID を渡すことができる。 ユーザー名前空間にグループ ID マッピングを書き込むことができる (B<user_namespaces>(7) 参照)。"
1185
1186 #. type: TP
1187 #: build/C/man7/capabilities.7:257
1188 #, no-wrap
1189 msgid "B<CAP_SETFCAP> (since Linux 2.6.24)"
1190 msgstr "B<CAP_SETFCAP> (Linux 2.6.24 以降)"
1191
1192 #. type: Plain text
1193 #: build/C/man7/capabilities.7:260
1194 msgid "Set file capabilities."
1195 msgstr "ファイルケーパビリティを設定する。"
1196
1197 #. type: TP
1198 #: build/C/man7/capabilities.7:260
1199 #, no-wrap
1200 msgid "B<CAP_SETPCAP>"
1201 msgstr "B<CAP_SETPCAP>"
1202
1203 #. type: Plain text
1204 #: build/C/man7/capabilities.7:271
1205 msgid "If file capabilities are not supported: grant or remove any capability in the caller's permitted capability set to or from any other process.  (This property of B<CAP_SETPCAP> is not available when the kernel is configured to support file capabilities, since B<CAP_SETPCAP> has entirely different semantics for such kernels.)"
1206 msgstr "ファイルケーパビリティがサポートされていない場合: 呼び出し元が許可されているケーパビリティセットに含まれる任意のケーパビリティを、 他のプロセスに付与したり、削除したりできる。 (カーネルがファイルケーパビリティをサポートしている場合、 B<CAP_SETPCAP> はこの役割を持たない。 なぜなら、ファイルケーパビリティをサポートしているカーネルでは B<CAP_SETPCAP> は全く別の意味を持つからである。)"
1207
1208 #. type: Plain text
1209 #: build/C/man7/capabilities.7:281
1210 msgid "If file capabilities are supported: add any capability from the calling thread's bounding set to its inheritable set; drop capabilities from the bounding set (via B<prctl>(2)  B<PR_CAPBSET_DROP>); make changes to the I<securebits> flags."
1211 msgstr "ファイルケーパビリティがサポートされている場合: 呼び出し元スレッドのバウンディングセットの任意のケーパビリティを 自身の継承可能ケーパビリティセットに追加できる。 (B<prctl>(2)  B<PR_CAPBSET_DROP> を使って)  バウンディングセットからケーパビリティを削除できる。 I<securebits> フラグを変更できる。"
1212
1213 #. type: TP
1214 #: build/C/man7/capabilities.7:281
1215 #, no-wrap
1216 msgid "B<CAP_SETUID>"
1217 msgstr "B<CAP_SETUID>"
1218
1219 #.  FIXME CAP_SETUID also an effect in exec(); document this.
1220 #. type: Plain text
1221 #: build/C/man7/capabilities.7:292
1222 msgid "Make arbitrary manipulations of process UIDs (B<setuid>(2), B<setreuid>(2), B<setresuid>(2), B<setfsuid>(2)); forge UID when passing socket credentials via UNIX domain sockets; write a user ID mapping in a user namespace (see B<user_namespaces>(7))."
1223 msgstr "プロセスの UID に対する任意の操作 (B<setuid>(2), B<setreuid>(2), B<setresuid>(2), B<setfsuid>(2))  を行う。 UNIX ドメインソケット経由でソケットの資格情報 (credential) を渡す際に 偽の UID を渡すことができる。 ユーザー名前空間にユーザー ID マッピングを書き込むことができる (B<user_namespaces>(7) 参照)。"
1224
1225 #. type: TP
1226 #: build/C/man7/capabilities.7:292
1227 #, no-wrap
1228 msgid "B<CAP_SYS_ADMIN>"
1229 msgstr "B<CAP_SYS_ADMIN>"
1230
1231 #. type: Plain text
1232 #: build/C/man7/capabilities.7:306
1233 msgid "Perform a range of system administration operations including: B<quotactl>(2), B<mount>(2), B<umount>(2), B<swapon>(2), B<swapoff>(2), B<sethostname>(2), and B<setdomainname>(2);"
1234 msgstr "以下のシステム管理用の操作を実行する: B<quotactl>(2), B<mount>(2), B<umount>(2), B<swapon>(2), B<swapoff>(2), B<sethostname>(2), B<setdomainname>(2)."
1235
1236 #. type: Plain text
1237 #: build/C/man7/capabilities.7:312
1238 msgid "perform privileged B<syslog>(2)  operations (since Linux 2.6.37, B<CAP_SYSLOG> should be used to permit such operations);"
1239 msgstr ""
1240 "特権が必要な B<syslog>(2) の操作を実行する\n"
1241 "(Linux 2.6.37 以降では、このような操作を許可するには\n"
1242 "B<CAP_SYSLOG> を使うべきである)"
1243
1244 #. type: Plain text
1245 #: build/C/man7/capabilities.7:317
1246 msgid "perform B<VM86_REQUEST_IRQ> B<vm86>(2)  command;"
1247 msgstr "B<VM86_REQUEST_IRQ> B<vm86>(2) コマンドを実行する。"
1248
1249 #. type: Plain text
1250 #: build/C/man7/capabilities.7:323
1251 msgid "perform B<IPC_SET> and B<IPC_RMID> operations on arbitrary System V IPC objects;"
1252 msgstr "任意の System V IPC オブジェクトに対する B<IPC_SET> と B<IPC_RMID> 操作を実行する。"
1253
1254 #. type: Plain text
1255 #: build/C/man7/capabilities.7:327 build/C/man7/capabilities.7:574
1256 msgid "override B<RLIMIT_NPROC> resource limit;"
1257 msgstr "B<RLIMIT_NPROC> リソース制限を上書きする。"
1258
1259 #. type: Plain text
1260 #: build/C/man7/capabilities.7:334
1261 msgid "perform operations on I<trusted> and I<security> Extended Attributes (see B<attr>(5));"
1262 msgstr "拡張属性 I<trusted> と I<security> に対する操作を実行する (B<attr>(5)  参照)。"
1263
1264 #. type: Plain text
1265 #: build/C/man7/capabilities.7:337
1266 msgid "use B<lookup_dcookie>(2);"
1267 msgstr "B<lookup_dcookie>(2)  を呼び出す。"
1268
1269 #. type: Plain text
1270 #: build/C/man7/capabilities.7:345
1271 msgid "use B<ioprio_set>(2)  to assign B<IOPRIO_CLASS_RT> and (before Linux 2.6.25)  B<IOPRIO_CLASS_IDLE> I/O scheduling classes;"
1272 msgstr "B<ioprio_set>(2)  を使って I/O スケジューリングクラス B<IOPRIO_CLASS_RT>, B<IOPRIO_CLASS_IDLE> を割り当てる (B<IOPRIO_CLASS_IDLE> は Linux 2.6.25 より前のバージョンのみ)。"
1273
1274 #. type: Plain text
1275 #: build/C/man7/capabilities.7:347
1276 msgid "forge PID when passing socket credentials via UNIX domain sockets;"
1277 msgstr "UNIX ドメインソケットでソケットの資格情報 (credential) を渡す際に偽の UID を渡す。"
1278
1279 #. type: Plain text
1280 #: build/C/man7/capabilities.7:356
1281 msgid "exceed I</proc/sys/fs/file-max>, the system-wide limit on the number of open files, in system calls that open files (e.g., B<accept>(2), B<execve>(2), B<open>(2), B<pipe>(2));"
1282 msgstr "ファイルをオープンするシステムコール (例えば B<accept>(2), B<execve>(2), B<open>(2), B<pipe>(2))  でシステム全体でオープンできるファイル数の上限 I</proc/sys/fs/file-max> を超過する。"
1283
1284 #. type: Plain text
1285 #: build/C/man7/capabilities.7:365
1286 msgid "employ B<CLONE_*> flags that create new namespaces with B<clone>(2)  and B<unshare>(2)  (but, since Linux 3.8, creating user namespaces does not require any capability);"
1287 msgstr "B<clone>(2) と B<unshare>(2) で新しい名前空間を作成する B<CLONE_*> フラグを利用する (ただし、 Linux 3.8 以降では、ユーザー名前空間の作成にどのケーパビリティも必要としない)。"
1288
1289 #. type: Plain text
1290 #: build/C/man7/capabilities.7:368
1291 msgid "call B<perf_event_open>(2);"
1292 msgstr "B<perf_event_open>(2) を呼び出す。"
1293
1294 #. type: Plain text
1295 #: build/C/man7/capabilities.7:372
1296 msgid "access privileged I<perf> event information;"
1297 msgstr "特権が必要な I<perf> イベントの情報にアクセスする。"
1298
1299 #. type: Plain text
1300 #: build/C/man7/capabilities.7:380
1301 msgid "call B<setns>(2)  (requires B<CAP_SYS_ADMIN> in the I<target> namespace);"
1302 msgstr "B<setns>(2) を呼び出す (I<target> 名前空間での B<CAP_SYS_ADMIN> が必要)。"
1303
1304 #. type: Plain text
1305 #: build/C/man7/capabilities.7:383
1306 msgid "call B<fanotify_init>(2);"
1307 msgstr "B<fanotify_init>(2) を呼び出す。"
1308
1309 #. type: Plain text
1310 #: build/C/man7/capabilities.7:390
1311 msgid "perform B<KEYCTL_CHOWN> and B<KEYCTL_SETPERM> B<keyctl>(2)  operations;"
1312 msgstr "B<keyctl>(2)  の B<KEYCTL_CHOWN> と B<KEYCTL_SETPERM> 操作を実行する。"
1313
1314 #. type: Plain text
1315 #: build/C/man7/capabilities.7:395
1316 msgid "perform B<madvise>(2)  B<MADV_HWPOISON> operation;"
1317 msgstr "B<madvise>(2)  の B<MADV_HWPOISON> 操作を実行する。"
1318
1319 #. type: Plain text
1320 #: build/C/man7/capabilities.7:401
1321 msgid "employ the B<TIOCSTI> B<ioctl>(2)  to insert characters into the input queue of a terminal other than the caller's controlling terminal;"
1322 msgstr ""
1323 "B<TIOCSTI> B<ioctl>(2) を使って、\n"
1324 "呼び出し元の制御端末以外の端末の入力キューに文字を挿入する。"
1325
1326 #. type: Plain text
1327 #: build/C/man7/capabilities.7:405
1328 msgid "employ the obsolete B<nfsservctl>(2)  system call;"
1329 msgstr "廃止予定の B<nfsservctl>(2) システムコールを使用する。"
1330
1331 #. type: Plain text
1332 #: build/C/man7/capabilities.7:409
1333 msgid "employ the obsolete B<bdflush>(2)  system call;"
1334 msgstr "廃止予定の B<bdflush>(2) システムコールを使用する。"
1335
1336 #. type: Plain text
1337 #: build/C/man7/capabilities.7:413
1338 msgid "perform various privileged block-device B<ioctl>(2)  operations;"
1339 msgstr ""
1340 "特権が必要なブロックデバイスに対する各種の B<ioctl>(2) 操作を\n"
1341 "実行する。"
1342
1343 #. type: Plain text
1344 #: build/C/man7/capabilities.7:417
1345 msgid "perform various privileged filesystem B<ioctl>(2)  operations;"
1346 msgstr ""
1347 "特権が必要なファイルシステムに対する各種の B<ioctl>(2) 操作を\n"
1348 "実行する。"
1349
1350 #. type: Plain text
1351 #: build/C/man7/capabilities.7:419
1352 msgid "perform administrative operations on many device drivers."
1353 msgstr "多くのデバイスドライバに対する管理命令を実行する。"
1354
1355 #. type: TP
1356 #: build/C/man7/capabilities.7:421
1357 #, no-wrap
1358 msgid "B<CAP_SYS_BOOT>"
1359 msgstr "B<CAP_SYS_BOOT>"
1360
1361 #. type: Plain text
1362 #: build/C/man7/capabilities.7:427
1363 msgid "Use B<reboot>(2)  and B<kexec_load>(2)."
1364 msgstr "B<reboot>(2)  と B<kexec_load>(2)  を呼び出す。"
1365
1366 #. type: TP
1367 #: build/C/man7/capabilities.7:427
1368 #, no-wrap
1369 msgid "B<CAP_SYS_CHROOT>"
1370 msgstr "B<CAP_SYS_CHROOT>"
1371
1372 #. type: Plain text
1373 #: build/C/man7/capabilities.7:431
1374 msgid "Use B<chroot>(2)."
1375 msgstr "B<chroot>(2).  を呼び出す。"
1376
1377 #. type: TP
1378 #: build/C/man7/capabilities.7:431
1379 #, no-wrap
1380 msgid "B<CAP_SYS_MODULE>"
1381 msgstr "B<CAP_SYS_MODULE>"
1382
1383 #. type: Plain text
1384 #: build/C/man7/capabilities.7:440
1385 msgid "Load and unload kernel modules (see B<init_module>(2)  and B<delete_module>(2)); in kernels before 2.6.25: drop capabilities from the system-wide capability bounding set."
1386 msgstr "カーネルモジュールのロード、アンロードを行う (B<init_module>(2)  と B<delete_module>(2)  を参照のこと)。 バージョン 2.6.25 より前のカーネルで、 システム全体のケーパビリティバウンディングセット (capability bounding set)  からケーパビリティを外す。"
1387
1388 #. type: TP
1389 #: build/C/man7/capabilities.7:440
1390 #, no-wrap
1391 msgid "B<CAP_SYS_NICE>"
1392 msgstr "B<CAP_SYS_NICE>"
1393
1394 #. type: Plain text
1395 #: build/C/man7/capabilities.7:449
1396 msgid "Raise process nice value (B<nice>(2), B<setpriority>(2))  and change the nice value for arbitrary processes;"
1397 msgstr "プロセスの nice 値の引き上げ (B<nice>(2), B<setpriority>(2))  や、任意のプロセスの nice 値の変更を行う。"
1398
1399 #. type: Plain text
1400 #: build/C/man7/capabilities.7:455
1401 msgid "set real-time scheduling policies for calling process, and set scheduling policies and priorities for arbitrary processes (B<sched_setscheduler>(2), B<sched_setparam>(2), B<shed_setattr>(2));"
1402 msgstr "呼び出し元プロセスに対するリアルタイムスケジューリングポリシーと、 任意のプロセスに対するスケジューリングポリシーと優先度を設定する (B<sched_setscheduler>(2), B<sched_setparam>(2), B<shed_setattr>(2))。"
1403
1404 #. type: Plain text
1405 #: build/C/man7/capabilities.7:458
1406 msgid "set CPU affinity for arbitrary processes (B<sched_setaffinity>(2));"
1407 msgstr "任意のプロセスに対する CPU affinity を設定できる (B<sched_setaffinity>(2))。"
1408
1409 #. type: Plain text
1410 #: build/C/man7/capabilities.7:461
1411 msgid "set I/O scheduling class and priority for arbitrary processes (B<ioprio_set>(2));"
1412 msgstr "任意のプロセスに対して I/O スケジューリングクラスと優先度を設定できる (B<ioprio_set>(2))。"
1413
1414 #.  FIXME CAP_SYS_NICE also has the following effect for
1415 #.  migrate_pages(2):
1416 #.      do_migrate_pages(mm, &old, &new,
1417 #.          capable(CAP_SYS_NICE) ? MPOL_MF_MOVE_ALL : MPOL_MF_MOVE);
1418 #.  Document this.
1419 #. type: Plain text
1420 #: build/C/man7/capabilities.7:471
1421 msgid "apply B<migrate_pages>(2)  to arbitrary processes and allow processes to be migrated to arbitrary nodes;"
1422 msgstr "B<migrate_pages>(2)  を任意のプロセスに適用し、プロセスを任意のノードに移動する。"
1423
1424 #. type: Plain text
1425 #: build/C/man7/capabilities.7:475
1426 msgid "apply B<move_pages>(2)  to arbitrary processes;"
1427 msgstr "B<move_pages>(2)  を任意のプロセスに対して行う。"
1428
1429 #. type: Plain text
1430 #: build/C/man7/capabilities.7:482
1431 msgid "use the B<MPOL_MF_MOVE_ALL> flag with B<mbind>(2)  and B<move_pages>(2)."
1432 msgstr "B<mbind>(2)  と B<move_pages>(2)  で B<MPOL_MF_MOVE_ALL> フラグを使用する。"
1433
1434 #. type: TP
1435 #: build/C/man7/capabilities.7:484
1436 #, no-wrap
1437 msgid "B<CAP_SYS_PACCT>"
1438 msgstr "B<CAP_SYS_PACCT>"
1439
1440 #. type: Plain text
1441 #: build/C/man7/capabilities.7:488
1442 msgid "Use B<acct>(2)."
1443 msgstr "B<acct>(2)  を呼び出す。"
1444
1445 #. type: TP
1446 #: build/C/man7/capabilities.7:488
1447 #, no-wrap
1448 msgid "B<CAP_SYS_PTRACE>"
1449 msgstr "B<CAP_SYS_PTRACE>"
1450
1451 #. type: Plain text
1452 #: build/C/man7/capabilities.7:495
1453 msgid "Trace arbitrary processes using B<ptrace>(2);"
1454 msgstr "B<ptrace>(2)  を使って任意のプロセスをトレースする。"
1455
1456 #. type: Plain text
1457 #: build/C/man7/capabilities.7:499
1458 msgid "apply B<get_robust_list>(2)  to arbitrary processes;"
1459 msgstr "B<get_robust_list>(2)  を任意のプロセスに対して行う。"
1460
1461 #. type: Plain text
1462 #: build/C/man7/capabilities.7:504
1463 msgid "transfer data to or from the memory of arbitrary processes using B<process_vm_readv>(2)  and B<process_vm_writev>(2)."
1464 msgstr "B<process_vm_readv>(2) と B<process_vm_writev>(2) を使って任意のプロセスのメモリとの間でデータの送受信を行う。"
1465
1466 #. type: Plain text
1467 #: build/C/man7/capabilities.7:507
1468 msgid "inspect processes using B<kcmp>(2)."
1469 msgstr "B<kcmp>(2) を使ってプロセス内部を調査する。"
1470
1471 #. type: TP
1472 #: build/C/man7/capabilities.7:509
1473 #, no-wrap
1474 msgid "B<CAP_SYS_RAWIO>"
1475 msgstr "B<CAP_SYS_RAWIO>"
1476
1477 #. type: Plain text
1478 #: build/C/man7/capabilities.7:518
1479 msgid "Perform I/O port operations (B<iopl>(2)  and B<ioperm>(2));"
1480 msgstr "I/O ポート操作を実行する (B<iopl>(2)、 B<ioperm>(2))。"
1481
1482 #. type: Plain text
1483 #: build/C/man7/capabilities.7:521
1484 msgid "access I</proc/kcore>;"
1485 msgstr "I</proc/kcore> にアクセスする。"
1486
1487 #. type: Plain text
1488 #: build/C/man7/capabilities.7:526
1489 msgid "employ the B<FIBMAP> B<ioctl>(2)  operation;"
1490 msgstr "B<FIBMAP> B<ioctl>(2) 操作を使用する。"
1491
1492 #. type: Plain text
1493 #: build/C/man7/capabilities.7:529
1494 msgid "open devices for accessing x86 model-specific registers (MSRs, see B<msr>(4))"
1495 msgstr "x86 モデルに固有のレジスタ (MSR レジスタ群、 B<msr>(4) 参照) にアクセスするためのデバイスをオープンする。"
1496
1497 #. type: Plain text
1498 #: build/C/man7/capabilities.7:532
1499 msgid "update I</proc/sys/vm/mmap_min_addr>;"
1500 msgstr "I</proc/sys/vm/mmap_min_addr> を更新する。"
1501
1502 #. type: Plain text
1503 #: build/C/man7/capabilities.7:535
1504 msgid "create memory mappings at addresses below the value specified by I</proc/sys/vm/mmap_min_addr>;"
1505 msgstr "I</proc/sys/vm/mmap_min_addr> で指定された値よりも小さなアドレスにメモリマッピングを作成する。"
1506
1507 #. type: Plain text
1508 #: build/C/man7/capabilities.7:538
1509 msgid "map files in I</proc/bus/pci>;"
1510 msgstr "I</proc/bus/pci> にあるファイルをマップする。"
1511
1512 #. type: Plain text
1513 #: build/C/man7/capabilities.7:543
1514 msgid "open I</dev/mem> and I</dev/kmem>;"
1515 msgstr "I</dev/mem> や I</dev/kmem> をオープンする。"
1516
1517 #. type: Plain text
1518 #: build/C/man7/capabilities.7:545
1519 msgid "perform various SCSI device commands;"
1520 msgstr "各種の SCSI デバイスコマンドを実行する。"
1521
1522 #. type: Plain text
1523 #: build/C/man7/capabilities.7:551
1524 msgid "perform certain operations on B<hpsa>(4)  and B<cciss>(4)  devices;"
1525 msgstr "B<hpsa>(4) デバイスや B<cciss>(4) デバイスの特定の操作を実行する。"
1526
1527 #. type: Plain text
1528 #: build/C/man7/capabilities.7:553
1529 msgid "perform a range of device-specific operations on other devices."
1530 msgstr "他のデバイスに対して各種のデバイス固有命令を実行する。"
1531
1532 #. type: TP
1533 #: build/C/man7/capabilities.7:555
1534 #, no-wrap
1535 msgid "B<CAP_SYS_RESOURCE>"
1536 msgstr "B<CAP_SYS_RESOURCE>"
1537
1538 #. type: Plain text
1539 #: build/C/man7/capabilities.7:561
1540 msgid "Use reserved space on ext2 filesystems;"
1541 msgstr "ext2 ファイルシステム上の予約されている領域を使用する。"
1542
1543 #. type: Plain text
1544 #: build/C/man7/capabilities.7:565
1545 msgid "make B<ioctl>(2)  calls controlling ext3 journaling;"
1546 msgstr "ext3 のジャーナル機能を制御する B<ioctl>(2)  を使用する。"
1547
1548 #. type: Plain text
1549 #: build/C/man7/capabilities.7:567
1550 msgid "override disk quota limits;"
1551 msgstr "ディスク quota の上限を上書きする。"
1552
1553 #. type: Plain text
1554 #: build/C/man7/capabilities.7:570
1555 msgid "increase resource limits (see B<setrlimit>(2));"
1556 msgstr "リソース上限を増やす (B<setrlimit>(2))。"
1557
1558 #. type: Plain text
1559 #: build/C/man7/capabilities.7:576
1560 msgid "override maximum number of consoles on console allocation;"
1561 msgstr "コンソール割り当てにおいてコンソールの最大数を上書きする。"
1562
1563 #. type: Plain text
1564 #: build/C/man7/capabilities.7:578
1565 msgid "override maximum number of keymaps;"
1566 msgstr "キーマップの最大数を上書きする。"
1567
1568 #. type: Plain text
1569 #: build/C/man7/capabilities.7:580
1570 msgid "allow more than 64hz interrupts from the real-time clock;"
1571 msgstr "リアルタイムクロックから秒間 64 回を越える回数の割り当てが許可する。"
1572
1573 #. type: Plain text
1574 #: build/C/man7/capabilities.7:589
1575 msgid "raise I<msg_qbytes> limit for a System V message queue above the limit in I</proc/sys/kernel/msgmnb> (see B<msgop>(2)  and B<msgctl>(2));"
1576 msgstr ""
1577 "メッセージキューに関する上限 I<msg_qbytes> を \n"
1578 "I</proc/sys/kernel/msgmnb> に指定されている上限よりも大きく設定する\n"
1579 "(B<msgop>(2) と B<msgctl>(2) 参照)。"
1580
1581 #. type: Plain text
1582 #: build/C/man7/capabilities.7:596
1583 msgid "override the I</proc/sys/fs/pipe-size-max> limit when setting the capacity of a pipe using the B<F_SETPIPE_SZ> B<fcntl>(2)  command."
1584 msgstr ""
1585 "B<F_SETPIPE_SZ> B<fcntl>(2) を使ってパイプの容量を設定する際に\n"
1586 "上限 I</proc/sys/fs/pipe-size-max> を上書きする。"
1587
1588 #. type: Plain text
1589 #: build/C/man7/capabilities.7:601
1590 msgid "use B<F_SETPIPE_SZ> to increase the capacity of a pipe above the limit specified by I</proc/sys/fs/pipe-max-size>;"
1591 msgstr ""
1592 "I</proc/sys/fs/pipe-max-size> に指定されている上限を超えてパイプの容量\n"
1593 "を増やすのに B<F_SETPIPE_SZ> を使用する。"
1594
1595 #. type: Plain text
1596 #: build/C/man7/capabilities.7:606
1597 msgid "override I</proc/sys/fs/mqueue/queues_max> limit when creating POSIX message queues (see B<mq_overview>(7));"
1598 msgstr ""
1599 "POSIX メッセージキューを作成する際に、\n"
1600 "上限 I</proc/sys/fs/mqueue/queues_max> を上書きする\n"
1601 "(B<mq_overview>(7) 参照)。"
1602
1603 #. type: Plain text
1604 #: build/C/man7/capabilities.7:611
1605 msgid "employ B<prctl>(2)  B<PR_SET_MM> operation;"
1606 msgstr "B<prctl>(2) B<PR_SET_MM> 操作を使用する。"
1607
1608 #. type: Plain text
1609 #: build/C/man7/capabilities.7:616
1610 msgid "set I</proc/PID/oom_score_adj> to a value lower than the value last set by a process with B<CAP_SYS_RESOURCE>."
1611 msgstr "B<CAP_SYS_RESOURCE> を持ったプロセスによって最後に設定された値よりも小さな値を I</proc/PID/oom_score_adj> に設定する。"
1612
1613 #. type: TP
1614 #: build/C/man7/capabilities.7:618
1615 #, no-wrap
1616 msgid "B<CAP_SYS_TIME>"
1617 msgstr "B<CAP_SYS_TIME>"
1618
1619 #. type: Plain text
1620 #: build/C/man7/capabilities.7:625
1621 msgid "Set system clock (B<settimeofday>(2), B<stime>(2), B<adjtimex>(2)); set real-time (hardware) clock."
1622 msgstr "システムクロックを変更する (B<settimeofday>(2), B<stime>(2), B<adjtimex>(2))。 リアルタイム (ハードウェア) クロックを変更する。"
1623
1624 #. type: TP
1625 #: build/C/man7/capabilities.7:625
1626 #, no-wrap
1627 msgid "B<CAP_SYS_TTY_CONFIG>"
1628 msgstr "B<CAP_SYS_TTY_CONFIG>"
1629
1630 #. type: Plain text
1631 #: build/C/man7/capabilities.7:632
1632 msgid "Use B<vhangup>(2); employ various privileged B<ioctl>(2)  operations on virtual terminals."
1633 msgstr ""
1634 "B<vhangup>(2) を使用する。\n"
1635 "特権が必要な仮想端末に関する各種の B<ioctl>(2) 操作を利用できる。"
1636
1637 #. type: TP
1638 #: build/C/man7/capabilities.7:632
1639 #, no-wrap
1640 msgid "B<CAP_SYSLOG> (since Linux 2.6.37)"
1641 msgstr "B<CAP_SYSLOG> (Linux 2.6.37 以降)"
1642
1643 #. type: Plain text
1644 #: build/C/man7/capabilities.7:643
1645 msgid "Perform privileged B<syslog>(2)  operations.  See B<syslog>(2)  for information on which operations require privilege."
1646 msgstr ""
1647 "特権が必要な B<syslog>(2) 操作を実行できる。\n"
1648 "どの操作が特権が必要かについての情報は B<syslog>(2) を参照。"
1649
1650 #. type: Plain text
1651 #: build/C/man7/capabilities.7:653
1652 msgid "View kernel addresses exposed via I</proc> and other interfaces when I</proc/sys/kernel/kptr_restrict> has the value 1.  (See the discussion of the I<kptr_restrict> in B<proc>(5).)"
1653 msgstr "I</proc/sys/kernel/kptr_restrict> の値が 1 の場合、 I</proc> や他のインターフェース経由で公開されているカーネルアドレスを参照する (B<proc>(5) の I<kptr_restrict> の議論を参照)。"
1654
1655 #. type: TP
1656 #: build/C/man7/capabilities.7:655
1657 #, no-wrap
1658 msgid "B<CAP_WAKE_ALARM> (since Linux 3.0)"
1659 msgstr "B<CAP_WAKE_ALARM> (Linux 3.0 以降)"
1660
1661 #. type: Plain text
1662 #: build/C/man7/capabilities.7:663
1663 msgid "Trigger something that will wake up the system (set B<CLOCK_REALTIME_ALARM> and B<CLOCK_BOOTTIME_ALARM> timers)."
1664 msgstr ""
1665 "システムを起こすトリガーを有効にする (タイマー B<CLOCK_REALTIME_ALARM>\n"
1666 "や B<CLOCK_BOOTTIME_ALARM> を設定する)。"
1667
1668 #. type: SS
1669 #: build/C/man7/capabilities.7:663
1670 #, no-wrap
1671 msgid "Past and current implementation"
1672 msgstr "過去と現在の実装"
1673
1674 #. type: Plain text
1675 #: build/C/man7/capabilities.7:665
1676 msgid "A full implementation of capabilities requires that:"
1677 msgstr "完全な形のケーパビリティを実装するには、以下の要件を満たす必要がある:"
1678
1679 #. type: IP
1680 #: build/C/man7/capabilities.7:665 build/C/man7/capabilities.7:816
1681 #: build/C/man7/capabilities.7:963 build/C/man7/capabilities.7:1016
1682 #: build/C/man7/user_namespaces.7:173 build/C/man7/user_namespaces.7:515
1683 #, no-wrap
1684 msgid "1."
1685 msgstr "1."
1686
1687 #. type: Plain text
1688 #: build/C/man7/capabilities.7:669
1689 msgid "For all privileged operations, the kernel must check whether the thread has the required capability in its effective set."
1690 msgstr "全ての特権操作について、カーネルはそのスレッドの実効ケーパビリティセットに 必要なケーパビリティがあるかを確認する。"
1691
1692 #. type: IP
1693 #: build/C/man7/capabilities.7:669 build/C/man7/capabilities.7:821
1694 #: build/C/man7/capabilities.7:969 build/C/man7/capabilities.7:1022
1695 #: build/C/man7/user_namespaces.7:189 build/C/man7/user_namespaces.7:521
1696 #, no-wrap
1697 msgid "2."
1698 msgstr "2."
1699
1700 #. type: Plain text
1701 #: build/C/man7/capabilities.7:672
1702 msgid "The kernel must provide system calls allowing a thread's capability sets to be changed and retrieved."
1703 msgstr "カーネルで、あるスレッドのケーパビリティセットを変更したり、 取得したりできるシステムコールが提供される。"
1704
1705 #. type: IP
1706 #: build/C/man7/capabilities.7:672 build/C/man7/capabilities.7:972
1707 #: build/C/man7/capabilities.7:1026 build/C/man7/user_namespaces.7:193
1708 #: build/C/man7/user_namespaces.7:526
1709 #, no-wrap
1710 msgid "3."
1711 msgstr "3."
1712
1713 #. type: Plain text
1714 #: build/C/man7/capabilities.7:675
1715 msgid "The filesystem must support attaching capabilities to an executable file, so that a process gains those capabilities when the file is executed."
1716 msgstr "ファイルシステムが、実行可能ファイルにケーパビリティを付与でき、ファイル 実行時にそのケーパビリティをプロセスが取得できるような機能をサポートする。"
1717
1718 #. type: Plain text
1719 #: build/C/man7/capabilities.7:679
1720 msgid "Before kernel 2.6.24, only the first two of these requirements are met; since kernel 2.6.24, all three requirements are met."
1721 msgstr "カーネル 2.6.24 より前では、最初の 2つの要件のみが満たされている。 カーネル 2.6.24 以降では、3つの要件すべてが満たされている。"
1722
1723 #. type: SS
1724 #: build/C/man7/capabilities.7:679
1725 #, no-wrap
1726 msgid "Thread capability sets"
1727 msgstr "スレッドケーパビリティセット"
1728
1729 #. type: Plain text
1730 #: build/C/man7/capabilities.7:682
1731 msgid "Each thread has three capability sets containing zero or more of the above capabilities:"
1732 msgstr "各スレッドは以下の 3種類のケーパビリティセットを持つ。各々のケーパビリティセットは 上記のケーパビリティの組み合わせである (全てのケーパビリティが無効でもよい)。"
1733
1734 #. type: TP
1735 #: build/C/man7/capabilities.7:682
1736 #, no-wrap
1737 msgid "I<Permitted>:"
1738 msgstr "I<許可 (permitted)>:"
1739
1740 #. type: Plain text
1741 #: build/C/man7/capabilities.7:690
1742 msgid "This is a limiting superset for the effective capabilities that the thread may assume.  It is also a limiting superset for the capabilities that may be added to the inheritable set by a thread that does not have the B<CAP_SETPCAP> capability in its effective set."
1743 msgstr "そのスレッドが持つことになっている実効ケーパビリティの 限定的なスーパーセットである。 これは、実効ケーパビリティセットに B<CAP_SETPCAP> ケーパビリティを持っていないスレッドが継承可能ケーパビリティセットに 追加可能なケーパビリティの限定的なスーパーセットでもある。"
1744
1745 #. type: Plain text
1746 #: build/C/man7/capabilities.7:696
1747 msgid "If a thread drops a capability from its permitted set, it can never reacquire that capability (unless it B<execve>(2)s either a set-user-ID-root program, or a program whose associated file capabilities grant that capability)."
1748 msgstr "許可ケーパビリティセットから削除してしまったケーパビリティは、 (set-user-ID-root プログラムか、 そのケーパビリティをファイルケーパビリティで許可しているプログラムを B<execve>(2)  しない限りは) もう一度獲得することはできない。"
1749
1750 #. type: TP
1751 #: build/C/man7/capabilities.7:696
1752 #, no-wrap
1753 msgid "I<Inheritable>:"
1754 msgstr "I<継承可能 (inheritable)>:"
1755
1756 #. type: Plain text
1757 #: build/C/man7/capabilities.7:703
1758 msgid "This is a set of capabilities preserved across an B<execve>(2).  It provides a mechanism for a process to assign capabilities to the permitted set of the new program during an B<execve>(2)."
1759 msgstr "B<execve>(2)  を前後で保持されるケーパビリティセットである。 この仕組みを使うことで、あるプロセスが B<execve>(2)  を行う際に新しいプログラムの許可ケーパビリティセットとして 割り当てるケーパビリティを指定することができる。"
1760
1761 #. type: TP
1762 #: build/C/man7/capabilities.7:703 build/C/man7/capabilities.7:753
1763 #, no-wrap
1764 msgid "I<Effective>:"
1765 msgstr "I<実効 (effective)>:"
1766
1767 #. type: Plain text
1768 #: build/C/man7/capabilities.7:707
1769 msgid "This is the set of capabilities used by the kernel to perform permission checks for the thread."
1770 msgstr "カーネルがスレッドの権限 (permission) をチェックするときに 使用するケーパビリティセットである。"
1771
1772 #. type: Plain text
1773 #: build/C/man7/capabilities.7:713
1774 msgid "A child created via B<fork>(2)  inherits copies of its parent's capability sets.  See below for a discussion of the treatment of capabilities during B<execve>(2)."
1775 msgstr "B<fork>(2)  で作成される子プロセスは、親のケーパビリティセットのコピーを継承する。 B<execve>(2)  中のケーパビリティの扱いについては下記を参照のこと。"
1776
1777 #. type: Plain text
1778 #: build/C/man7/capabilities.7:717
1779 msgid "Using B<capset>(2), a thread may manipulate its own capability sets (see below)."
1780 msgstr "B<capset>(2)  を使うと、プロセスは自分自身のケーパビリティセット を操作することができる (下記参照)。"
1781
1782 #.  commit 73efc0394e148d0e15583e13712637831f926720
1783 #. type: Plain text
1784 #: build/C/man7/capabilities.7:726
1785 msgid "Since Linux 3.2, the file I</proc/sys/kernel/cap_last_cap> exposes the numerical value of the highest capability supported by the running kernel; this can be used to determine the highest bit that may be set in a capability set."
1786 msgstr "Linux 3.2 以降では、 ファイル I</proc/sys/kernel/cap_last_cap> で、 実行中のカーネルでサポートされているケーパビリティの最大値を参照できる。 この情報を使って、 ケーパビリティセットに設定される可能性がある最上位ビットを判定することができる。"
1787
1788 #. type: SS
1789 #: build/C/man7/capabilities.7:726
1790 #, no-wrap
1791 msgid "File capabilities"
1792 msgstr "ファイルケーパビリティ"
1793
1794 #. type: Plain text
1795 #: build/C/man7/capabilities.7:741
1796 msgid "Since kernel 2.6.24, the kernel supports associating capability sets with an executable file using B<setcap>(8).  The file capability sets are stored in an extended attribute (see B<setxattr>(2))  named I<security.capability>.  Writing to this extended attribute requires the B<CAP_SETFCAP> capability.  The file capability sets, in conjunction with the capability sets of the thread, determine the capabilities of a thread after an B<execve>(2)."
1797 msgstr "カーネル 2.6.24 以降では、 B<setcap>(8)  を使って実行ファイルにケーパビリティセットを対応付けることができる。 ファイルケーパビリティセットは I<security.capability> という名前の拡張属性に保存される (B<setxattr>(2)  参照)。この拡張属性への書き込みには B<CAP_SETFCAP> ケーパビリティが必要である。 ファイルケーパビリティセットとスレッドのケーパビリティセットの両方が 考慮され、 B<execve>(2)  後のスレッドのケーパビリティセットが決定される。"
1798
1799 #. type: Plain text
1800 #: build/C/man7/capabilities.7:743
1801 msgid "The three file capability sets are:"
1802 msgstr "3 つのファイルケーパビリティセットが定義されている。"
1803
1804 #. type: TP
1805 #: build/C/man7/capabilities.7:743
1806 #, no-wrap
1807 msgid "I<Permitted> (formerly known as I<forced>):"
1808 msgstr "I<許可 (Permitted)> (以前のI<強制 (Forced)>):"
1809
1810 #. type: Plain text
1811 #: build/C/man7/capabilities.7:747
1812 msgid "These capabilities are automatically permitted to the thread, regardless of the thread's inheritable capabilities."
1813 msgstr "スレッドの継承可能ケーパビリティに関わらず、そのスレッドに自動的に 認められるケーパビリティ。"
1814
1815 #. type: TP
1816 #: build/C/man7/capabilities.7:747
1817 #, no-wrap
1818 msgid "I<Inheritable> (formerly known as I<allowed>):"
1819 msgstr "I<継承可能 (Inheritable)> (以前の I<許容 (Allowed)>):"
1820
1821 #. type: Plain text
1822 #: build/C/man7/capabilities.7:753
1823 msgid "This set is ANDed with the thread's inheritable set to determine which inheritable capabilities are enabled in the permitted set of the thread after the B<execve>(2)."
1824 msgstr "このセットと、スレッドの継承可能ケーパビリティセットとの 論理積 (AND) がとられ、 B<execve>(2)  の後にそのスレッドの許可ケーパビリティセットで有効となる 継承可能ケーパビリティが決定される。"
1825
1826 #. type: Plain text
1827 #: build/C/man7/capabilities.7:763
1828 msgid "This is not a set, but rather just a single bit.  If this bit is set, then during an B<execve>(2)  all of the new permitted capabilities for the thread are also raised in the effective set.  If this bit is not set, then after an B<execve>(2), none of the new permitted capabilities is in the new effective set."
1829 msgstr "これは集合ではなく、1 ビットの情報である。 このビットがセットされていると、 B<execve>(2)  実行中に、そのスレッドの新しい許可ケーパビリティが全て 実効ケーパビリティ集合においてもセットされる。 このビットがセットされていない場合、 B<execve>(2)  後には新しい許可ケーパビリティのどれも新しい実効ケーパビリティ集合 にセットされない。"
1830
1831 #. type: Plain text
1832 #: build/C/man7/capabilities.7:779
1833 msgid "Enabling the file effective capability bit implies that any file permitted or inheritable capability that causes a thread to acquire the corresponding permitted capability during an B<execve>(2)  (see the transformation rules described below) will also acquire that capability in its effective set.  Therefore, when assigning capabilities to a file (B<setcap>(8), B<cap_set_file>(3), B<cap_set_fd>(3)), if we specify the effective flag as being enabled for any capability, then the effective flag must also be specified as enabled for all other capabilities for which the corresponding permitted or inheritable flags is enabled."
1834 msgstr "ファイルの実効ケーパビリティビットを有効にするというのは、 B<execve>(2)  実行時に、ファイルの許可ケーパビリティと継承ケーパビリティに対応するものが スレッドの許可ケーパビリティセットとしてセットされるが、 これが実効ケーパビリティセットにもセットされるということである (ケーパビリティの変換ルールは下記参照)。 したがって、ファイルにケーパビリティを割り当てる際 (B<setcap>(8), B<cap_set_file>(3), B<cap_set_fd>(3))、 いずれかのケーパビリティに対して実効フラグを有効と指定する場合、 許可フラグや継承可能フラグを有効にした他の全てのケーパビリティ についても実効フラグを有効と指定しなければならない。"
1835
1836 #. type: SS
1837 #: build/C/man7/capabilities.7:779
1838 #, no-wrap
1839 msgid "Transformation of capabilities during execve()"
1840 msgstr "execve() 中のケーパビリティの変換"
1841
1842 #. type: Plain text
1843 #: build/C/man7/capabilities.7:785
1844 msgid "During an B<execve>(2), the kernel calculates the new capabilities of the process using the following algorithm:"
1845 msgstr "B<execve>(2)  実行時に、カーネルはプロセスの新しいケーパビリティを次の アルゴリズムを用いて計算する:"
1846
1847 #. type: Plain text
1848 #: build/C/man7/capabilities.7:790
1849 #, no-wrap
1850 msgid ""
1851 "P'(permitted) = (P(inheritable) & F(inheritable)) |\n"
1852 "                (F(permitted) & cap_bset)\n"
1853 msgstr ""
1854 "P'(permitted) = (P(inheritable) & F(inheritable)) |\n"
1855 "                (F(permitted) & cap_bset)\n"
1856
1857 #. type: Plain text
1858 #: build/C/man7/capabilities.7:792
1859 #, no-wrap
1860 msgid "P'(effective) = F(effective) ? P'(permitted) : 0\n"
1861 msgstr "P'(effective) = F(effective) ? P'(permitted) : 0\n"
1862
1863 #. type: Plain text
1864 #: build/C/man7/capabilities.7:794
1865 #, no-wrap
1866 msgid "P'(inheritable) = P(inheritable)    [i.e., unchanged]\n"
1867 msgstr "P'(inheritable) = P(inheritable)    [つまり、変更されない]\n"
1868
1869 #. type: Plain text
1870 #: build/C/man7/capabilities.7:798
1871 msgid "where:"
1872 msgstr "各変数の意味は以下の通り:"
1873
1874 #. type: IP
1875 #: build/C/man7/capabilities.7:799
1876 #, no-wrap
1877 msgid "P"
1878 msgstr "P"
1879
1880 #. type: Plain text
1881 #: build/C/man7/capabilities.7:802
1882 msgid "denotes the value of a thread capability set before the B<execve>(2)"
1883 msgstr "B<execve>(2)  前のスレッドのケーパビリティセットの値"
1884
1885 #. type: IP
1886 #: build/C/man7/capabilities.7:802
1887 #, no-wrap
1888 msgid "P'"
1889 msgstr "P'"
1890
1891 #. type: Plain text
1892 #: build/C/man7/capabilities.7:805
1893 msgid "denotes the value of a capability set after the B<execve>(2)"
1894 msgstr "B<execve>(2)  後のスレッドのケーパビリティセットの値"
1895
1896 #. type: IP
1897 #: build/C/man7/capabilities.7:805
1898 #, no-wrap
1899 msgid "F"
1900 msgstr "F"
1901
1902 #. type: Plain text
1903 #: build/C/man7/capabilities.7:807
1904 msgid "denotes a file capability set"
1905 msgstr "ファイルケーパビリティセットの値"
1906
1907 #. type: IP
1908 #: build/C/man7/capabilities.7:807
1909 #, no-wrap
1910 msgid "cap_bset"
1911 msgstr "cap_bset"
1912
1913 #. type: Plain text
1914 #: build/C/man7/capabilities.7:809
1915 msgid "is the value of the capability bounding set (described below)."
1916 msgstr "ケーパビリティバウンディングセットの値 (下記参照)"
1917
1918 #. type: SS
1919 #: build/C/man7/capabilities.7:811
1920 #, no-wrap
1921 msgid "Capabilities and execution of programs by root"
1922 msgstr "ケーパビリティと、ルートによるプログラムの実行"
1923
1924 #. type: Plain text
1925 #: build/C/man7/capabilities.7:816
1926 msgid "In order to provide an all-powerful I<root> using capability sets, during an B<execve>(2):"
1927 msgstr "B<execve>(2)  時に、ケーパビリティセットを使って、全ての権限を持った I<root> を実現するには、以下のようにする。"
1928
1929 #. type: Plain text
1930 #: build/C/man7/capabilities.7:821
1931 msgid "If a set-user-ID-root program is being executed, or the real user ID of the process is 0 (root)  then the file inheritable and permitted sets are defined to be all ones (i.e., all capabilities enabled)."
1932 msgstr "set-user-ID-root プログラムが実行される場合、 またはプロセスの実ユーザ ID が 0 (root) の場合、 ファイルの継承可能セットと許可セットを全て 1 (全てのケーパビリティが有効) に定義する。"
1933
1934 #. type: Plain text
1935 #: build/C/man7/capabilities.7:824
1936 msgid "If a set-user-ID-root program is being executed, then the file effective bit is defined to be one (enabled)."
1937 msgstr "set-user-ID-root プログラムが実行される場合、 ファイルの実効ケーパビリティビットを 1 (enabled) に定義する。"
1938
1939 #.  If a process with real UID 0, and nonzero effective UID does an
1940 #.  exec(), then it gets all capabilities in its
1941 #.  permitted set, and no effective capabilities
1942 #. type: Plain text
1943 #: build/C/man7/capabilities.7:839
1944 msgid "The upshot of the above rules, combined with the capabilities transformations described above, is that when a process B<execve>(2)s a set-user-ID-root program, or when a process with an effective UID of 0 B<execve>(2)s a program, it gains all capabilities in its permitted and effective capability sets, except those masked out by the capability bounding set.  This provides semantics that are the same as those provided by traditional UNIX systems."
1945 msgstr "上記のルールにケーパビリティ変換を適用した結果をまとめると、 プロセスが set-user-ID-root プログラムを B<execve>(2)  する場合、または実効 UID が 0 のプロセスがプログラムを B<execve>(2)  する場合、許可と実効のケーパビリティセットの全ケーパビリティ (正確には、ケーパビリティバウンディングセットによるマスクで除外されるもの 以外の全てのケーパビリティ) を取得するということである。 これにより、伝統的な UNIX システムと同じ振る舞いができるようになっている。"
1946
1947 #. type: SS
1948 #: build/C/man7/capabilities.7:839
1949 #, no-wrap
1950 msgid "Capability bounding set"
1951 msgstr "ケーパビリティバウンディングセット"
1952
1953 #. type: Plain text
1954 #: build/C/man7/capabilities.7:844
1955 msgid "The capability bounding set is a security mechanism that can be used to limit the capabilities that can be gained during an B<execve>(2).  The bounding set is used in the following ways:"
1956 msgstr "ケーパビリティバウンディングセット (capability bounding set) は、 B<execve>(2)  時に獲得できるケーパビリティを制限するために使われる セキュリティ機構である。 バウンディングセットは以下のように使用される。"
1957
1958 #. type: Plain text
1959 #: build/C/man7/capabilities.7:852
1960 msgid "During an B<execve>(2), the capability bounding set is ANDed with the file permitted capability set, and the result of this operation is assigned to the thread's permitted capability set.  The capability bounding set thus places a limit on the permitted capabilities that may be granted by an executable file."
1961 msgstr "B<execve>(2)  実行時に、ケーパビリティバウンディングセットと ファイルの許可ケーパビリティセットの論理和 (AND) を取ったものが、 そのスレッドの許可ケーパビリティセットに割り当てられる。 つまり、ケーパビリティバウンディングセットは、 実行ファイルが認めている許可ケーパビリティに対して 制限を課す働きをする。"
1962
1963 #. type: Plain text
1964 #: build/C/man7/capabilities.7:864
1965 msgid "(Since Linux 2.6.25)  The capability bounding set acts as a limiting superset for the capabilities that a thread can add to its inheritable set using B<capset>(2).  This means that if a capability is not in the bounding set, then a thread can't add this capability to its inheritable set, even if it was in its permitted capabilities, and thereby cannot have this capability preserved in its permitted set when it B<execve>(2)s a file that has the capability in its inheritable set."
1966 msgstr "(Linux 2.6.25 以降)  ケーパビリティバウンディングセットは、スレッドが B<capset>(2)  により自身の継承可能セットに追加可能なケーパビリティの母集団を 制限する役割を持つ。 スレッドに許可されたケーパビリティであっても、バウンディングセットに 含まれていなければ、スレッドはそのケーパビリティは自身の継承可能セットに 追加できず、その結果、継承可能セットにそのケーパビリティを含むファイルを B<execve>(2)  する場合、そのケーパビリティを許可セットに持ち続けることができない、 ということである。"
1967
1968 #. type: Plain text
1969 #: build/C/man7/capabilities.7:871
1970 msgid "Note that the bounding set masks the file permitted capabilities, but not the inherited capabilities.  If a thread maintains a capability in its inherited set that is not in its bounding set, then it can still gain that capability in its permitted set by executing a file that has the capability in its inherited set."
1971 msgstr "バウンディングセットがマスクを行うのは、継承可能ケーパビリティではなく、 ファイルの許可ケーパビリティのマスクを行う点に注意すること。 あるスレッドの継承可能セットにそのスレッドのバウンディングセットに 存在しないケーパビリティが含まれている場合、そのスレッドは、 継承可能セットに含まれるケーパビリティを持つファイルを実行することにより、 許可セットに含まれるケーパビリティも獲得できるということである。"
1972
1973 #. type: Plain text
1974 #: build/C/man7/capabilities.7:874
1975 msgid "Depending on the kernel version, the capability bounding set is either a system-wide attribute, or a per-process attribute."
1976 msgstr "カーネルのバージョンにより、ケーパビリティバウンディングセットは システム共通の属性の場合と、プロセス単位の属性の場合がある。"
1977
1978 #. type: Plain text
1979 #: build/C/man7/capabilities.7:876
1980 msgid "B<Capability bounding set prior to Linux 2.6.25>"
1981 msgstr "B<Linux 2.6.25 より前のケーパビリティバウンディングセット>"
1982
1983 #. type: Plain text
1984 #: build/C/man7/capabilities.7:884
1985 msgid "In kernels before 2.6.25, the capability bounding set is a system-wide attribute that affects all threads on the system.  The bounding set is accessible via the file I</proc/sys/kernel/cap-bound>.  (Confusingly, this bit mask parameter is expressed as a signed decimal number in I</proc/sys/kernel/cap-bound>.)"
1986 msgstr "2.6.25 より前のカーネルでは、ケーパビリティバウンディングセットは システム共通の属性で、システム上の全てのスレッドに適用される。 バウンディングセットは I</proc/sys/kernel/cap-bound> ファイル経由で参照できる。 (間違えやすいが、このビットマスク形式のパラメータは、 I</proc/sys/kernel/cap-bound> では符号付きの十進数で表現される。)"
1987
1988 #. type: Plain text
1989 #: build/C/man7/capabilities.7:891
1990 msgid "Only the B<init> process may set capabilities in the capability bounding set; other than that, the superuser (more precisely: programs with the B<CAP_SYS_MODULE> capability) may only clear capabilities from this set."
1991 msgstr "B<init> プロセスだけがケーパビリティバウンディングセットで ケーパビリティをセットすることができる。 それ以外では、スーパーユーザ (より正確には、 B<CAP_SYS_MODULE> ケーパビリティを持ったプログラム) が、 ケーパビリティバウンディングセットのケーパビリティのクリアが できるだけである。"
1992
1993 #. type: Plain text
1994 #: build/C/man7/capabilities.7:900
1995 msgid "On a standard system the capability bounding set always masks out the B<CAP_SETPCAP> capability.  To remove this restriction (dangerous!), modify the definition of B<CAP_INIT_EFF_SET> in I<include/linux/capability.h> and rebuild the kernel."
1996 msgstr "通常のシステムでは、ケーパビリティバウンディングセットは、 B<CAP_SETPCAP> が無効になっている。 この制限を取り去るには (取り去るのは危険!)、 I<include/linux/capability.h> 内の B<CAP_INIT_EFF_SET> の定義を修正し、カーネルを再構築する必要がある。"
1997
1998 #. type: Plain text
1999 #: build/C/man7/capabilities.7:904
2000 msgid "The system-wide capability bounding set feature was added to Linux starting with kernel version 2.2.11."
2001 msgstr "システム共通のケーパビリティバウンディングセット機能は、 カーネル 2.2.11 以降で Linux に追加された。"
2002
2003 #. type: Plain text
2004 #: build/C/man7/capabilities.7:906
2005 msgid "B<Capability bounding set from Linux 2.6.25 onward>"
2006 msgstr "B<Linux 2.6.25 以降のケーパビリティバウンディングセット>"
2007
2008 #. type: Plain text
2009 #: build/C/man7/capabilities.7:911
2010 msgid "From Linux 2.6.25, the I<capability bounding set> is a per-thread attribute.  (There is no longer a system-wide capability bounding set.)"
2011 msgstr "Linux 2.6.25 以降では、 「ケーパビリティバウンディングセット」はスレッド単位の属性である (システム共通のケーパビリティバウンディングセットはもはや存在しない)。"
2012
2013 #. type: Plain text
2014 #: build/C/man7/capabilities.7:916
2015 msgid "The bounding set is inherited at B<fork>(2)  from the thread's parent, and is preserved across an B<execve>(2)."
2016 msgstr "バウンディングセットは B<fork>(2)  時にはスレッドの親プロセスから継承され、 B<execve>(2)  の前後では保持される。"
2017
2018 #. type: Plain text
2019 #: build/C/man7/capabilities.7:929
2020 msgid "A thread may remove capabilities from its capability bounding set using the B<prctl>(2)  B<PR_CAPBSET_DROP> operation, provided it has the B<CAP_SETPCAP> capability.  Once a capability has been dropped from the bounding set, it cannot be restored to that set.  A thread can determine if a capability is in its bounding set using the B<prctl>(2)  B<PR_CAPBSET_READ> operation."
2021 msgstr "スレッドが B<CAP_SETPCAP> ケーパビリティを持っている場合、そのスレッドは B<prctl>(2)  の B<PR_CAPBSET_DROP> 操作を使って自身のケーパビリティバウンディングセットから ケーパビリティを削除することができる。 いったんケーパビリティをバウンディングセットから削除してしまうと、 スレッドはそのケーパビリティを再度セットすることはできない。 B<prctl>(2)  の B<PR_CAPBSET_READ> 操作を使うことで、スレッドがあるケーパビリティが自身のバウンディングセット に含まれているかを知ることができる。"
2022
2023 #. type: Plain text
2024 #: build/C/man7/capabilities.7:947
2025 msgid "Removing capabilities from the bounding set is supported only if file capabilities are compiled into the kernel.  In kernels before Linux 2.6.33, file capabilities were an optional feature configurable via the B<CONFIG_SECURITY_FILE_CAPABILITIES> option.  Since Linux 2.6.33, the configuration option has been removed and file capabilities are always part of the kernel.  When file capabilities are compiled into the kernel, the B<init> process (the ancestor of all processes) begins with a full bounding set.  If file capabilities are not compiled into the kernel, then B<init> begins with a full bounding set minus B<CAP_SETPCAP>, because this capability has a different meaning when there are no file capabilities."
2026 msgstr ""
2027 "バウンディングセットからのケーパビリティの削除がサポートされるのは、\n"
2028 "カーネルのコンパイル時にファイルケーパビリティが有効になっている場合\n"
2029 "だけである。Linux 2.6.33 より前のカーネルでは、ファイルケーパビリティは\n"
2030 "設定オプション B<CONFIG_SECURITY_FILE_CAPABILITIES> で切り替えられる追加の\n"
2031 "機能であった。Linux 2.6.33 以降では、この設定オプションは削除され、\n"
2032 "ファイルケーパビリティは常にカーネルに組込まれるようになった。\n"
2033 "ファイルケーパビリティがカーネルにコンパイル時に組み込まれている場合、\n"
2034 "(全てのプロセスの先祖である) I<init> プロセスはバウンディングセットで\n"
2035 "全てのケーパビリティが セットされた状態で開始する。ファイルケーパビリティ\n"
2036 "が有効になっていない場合には、 I<init> はバウンディングセットで\n"
2037 "B<CAP_SETPCAP> 以外の全てのケーパビリティがセットされた状態で開始する。\n"
2038 "このようになっているのは、 B<CAP_SETPCAP> ケーパビリティがファイルケー\n"
2039 "パビリティがサポートされていない場合には 違った意味を持つからである。"
2040
2041 #. type: Plain text
2042 #: build/C/man7/capabilities.7:954
2043 msgid "Removing a capability from the bounding set does not remove it from the thread's inherited set.  However it does prevent the capability from being added back into the thread's inherited set in the future."
2044 msgstr "バウンディングセットからケーパビリティを削除しても、 スレッドの継承可能セットからはそのケーパビリティは削除されない。 しかしながら、バウンディングセットからの削除により、 この先そのケーパビリティをスレッドの継承可能セットに追加すること はできなくなる。"
2045
2046 #. type: SS
2047 #: build/C/man7/capabilities.7:954
2048 #, no-wrap
2049 msgid "Effect of user ID changes on capabilities"
2050 msgstr "ユーザ ID 変更のケーパビリティへの影響"
2051
2052 #. type: Plain text
2053 #: build/C/man7/capabilities.7:963
2054 msgid "To preserve the traditional semantics for transitions between 0 and nonzero user IDs, the kernel makes the following changes to a thread's capability sets on changes to the thread's real, effective, saved set, and filesystem user IDs (using B<setuid>(2), B<setresuid>(2), or similar):"
2055 msgstr "ユーザ ID が 0 と 0 以外の間で変化する際の振る舞いを従来と同じにするため、 スレッドの実 UID、実効 UID、保存 set-user-ID、ファイルシステム UID が (B<setuid>(2), B<setresuid>(2)  などを使って) 変更された際に、カーネルはそのスレッドのケーパビリティセットに 以下の変更を行う:"
2056
2057 #. type: Plain text
2058 #: build/C/man7/capabilities.7:969
2059 msgid "If one or more of the real, effective or saved set user IDs was previously 0, and as a result of the UID changes all of these IDs have a nonzero value, then all capabilities are cleared from the permitted and effective capability sets."
2060 msgstr "UID の変更前には実 UID、実効 UID、保存 set-user-ID のうち 少なくとも一つが 0 で、変更後に実 UID、実効 UID、保存 set-user-ID が すべて 0 以外の値になった場合、許可と実効のケーパビリティセットの 全ケーパビリティをクリアする。"
2061
2062 #. type: Plain text
2063 #: build/C/man7/capabilities.7:972
2064 msgid "If the effective user ID is changed from 0 to nonzero, then all capabilities are cleared from the effective set."
2065 msgstr "実効 UID が 0 から 0 以外に変更された場合、 実効ケーパビリティセットの全ケーパビリティをクリアする。"
2066
2067 #. type: Plain text
2068 #: build/C/man7/capabilities.7:975
2069 msgid "If the effective user ID is changed from nonzero to 0, then the permitted set is copied to the effective set."
2070 msgstr "実効 UID が 0 以外から 0 に変更された場合、 許可ケーパビリティセットの内容を実効ケーパビリティセットにコピーする。"
2071
2072 #. type: IP
2073 #: build/C/man7/capabilities.7:975 build/C/man7/capabilities.7:1030
2074 #: build/C/man7/user_namespaces.7:529
2075 #, no-wrap
2076 msgid "4."
2077 msgstr "4."
2078
2079 #. type: Plain text
2080 #: build/C/man7/capabilities.7:993
2081 msgid "If the filesystem user ID is changed from 0 to nonzero (see B<setfsuid>(2)), then the following capabilities are cleared from the effective set: B<CAP_CHOWN>, B<CAP_DAC_OVERRIDE>, B<CAP_DAC_READ_SEARCH>, B<CAP_FOWNER>, B<CAP_FSETID>, B<CAP_LINUX_IMMUTABLE> (since Linux 2.6.30), B<CAP_MAC_OVERRIDE>, and B<CAP_MKNOD> (since Linux 2.6.30).  If the filesystem UID is changed from nonzero to 0, then any of these capabilities that are enabled in the permitted set are enabled in the effective set."
2082 msgstr "ファイルシステム UID が 0 から 0 以外に変更された場合 (B<setfsuid>(2)  参照)、実効ケーパビリティセットの以下のケーパビリティがクリアされる: B<CAP_CHOWN>, B<CAP_DAC_OVERRIDE>, B<CAP_DAC_READ_SEARCH>, B<CAP_FOWNER>, B<CAP_FSETID>, B<CAP_LINUX_IMMUTABLE> (Linux 2.6.30 以降), B<CAP_MAC_OVERRIDE>, B<CAP_MKNOD> (Linux 2.6.30 以降)。 ファイルシステム UID が 0 以外から 0 に変更された場合、 上記のケーパビリティのうち許可ケーパビリティセットで有効になっているものが 実効ケーパビリティセットで有効にされる。"
2083
2084 #. type: Plain text
2085 #: build/C/man7/capabilities.7:1001
2086 msgid "If a thread that has a 0 value for one or more of its user IDs wants to prevent its permitted capability set being cleared when it resets all of its user IDs to nonzero values, it can do so using the B<prctl>(2)  B<PR_SET_KEEPCAPS> operation."
2087 msgstr "各種 UID のうち少なくとも一つが 0 であるスレッドが、 その UID の全てが 0 以外になったときに許可ケーパビリティセットが クリアされないようにしたい場合には、 B<prctl>(2)  の B<PR_SET_KEEPCAPS> 操作を使えばよい。"
2088
2089 #. type: SS
2090 #: build/C/man7/capabilities.7:1001
2091 #, no-wrap
2092 msgid "Programmatically adjusting capability sets"
2093 msgstr "プログラムでケーパビリティセットを調整する"
2094
2095 #. type: Plain text
2096 #: build/C/man7/capabilities.7:1016
2097 msgid "A thread can retrieve and change its capability sets using the B<capget>(2)  and B<capset>(2)  system calls.  However, the use of B<cap_get_proc>(3)  and B<cap_set_proc>(3), both provided in the I<libcap> package, is preferred for this purpose.  The following rules govern changes to the thread capability sets:"
2098 msgstr "各スレッドは、 B<capget>(2)  や B<capset>(2)  を使って、自身のケーパビリティセットを取得したり変更したりできる。 ただし、これを行うには、 I<libcap> パッケージで提供されている B<cap_get_proc>(3)  や B<cap_set_proc>(3)  を使うのが望ましい。 スレッドのケーパビリティセットの変更には以下のルールが適用される。"
2099
2100 #. type: Plain text
2101 #: build/C/man7/capabilities.7:1022
2102 msgid "If the caller does not have the B<CAP_SETPCAP> capability, the new inheritable set must be a subset of the combination of the existing inheritable and permitted sets."
2103 msgstr "呼び出し側が B<CAP_SETPCAP> ケーパビリティを持っていない場合、新しい継承可能セットは、 既存の継承可能セットと許可セットの積集合 (AND) の部分集合で なければならない。"
2104
2105 #. type: Plain text
2106 #: build/C/man7/capabilities.7:1026
2107 msgid "(Since Linux 2.6.25)  The new inheritable set must be a subset of the combination of the existing inheritable set and the capability bounding set."
2108 msgstr "(Linux 2.6.25 以降)  新しい継承可能セットは、既存の継承可能セットとケーパビリティ バウンディングセットの積集合 (AND) の部分集合でなければならない。"
2109
2110 #. type: Plain text
2111 #: build/C/man7/capabilities.7:1030
2112 msgid "The new permitted set must be a subset of the existing permitted set (i.e., it is not possible to acquire permitted capabilities that the thread does not currently have)."
2113 msgstr "新しい許可セットは、既存の許可セットの部分集合でなければならない (つまり、そのスレッドが現在持っていない許可ケーパビリティを 獲得することはできない)。"
2114
2115 #. type: Plain text
2116 #: build/C/man7/capabilities.7:1032
2117 msgid "The new effective set must be a subset of the new permitted set."
2118 msgstr "新しい実効ケーパビリティセットは新しい許可ケーパビリティセットの 部分集合になっていなければならない。"
2119
2120 #. type: SS
2121 #: build/C/man7/capabilities.7:1032
2122 #, no-wrap
2123 msgid "The securebits flags: establishing a capabilities-only environment"
2124 msgstr "securebits フラグ: ケーパビリティだけの環境を構築する"
2125
2126 #.  For some background:
2127 #.        see http://lwn.net/Articles/280279/ and
2128 #.        http://article.gmane.org/gmane.linux.kernel.lsm/5476/
2129 #. type: Plain text
2130 #: build/C/man7/capabilities.7:1043
2131 msgid "Starting with kernel 2.6.26, and with a kernel in which file capabilities are enabled, Linux implements a set of per-thread I<securebits> flags that can be used to disable special handling of capabilities for UID 0 (I<root>).  These flags are as follows:"
2132 msgstr "カーネル 2.6.26 以降で、 ファイルケーパビリティが有効になったカーネルでは、 スレッド単位の I<securebits> フラグが実装されており、このフラグを使うと UID 0 (I<root>)  に対するケーパビリティの特別扱いを無効することができる。 以下のようなフラグがある。"
2133
2134 #. type: TP
2135 #: build/C/man7/capabilities.7:1043
2136 #, no-wrap
2137 msgid "B<SECBIT_KEEP_CAPS>"
2138 msgstr "B<SECBIT_KEEP_CAPS>"
2139
2140 #. type: Plain text
2141 #: build/C/man7/capabilities.7:1055
2142 msgid "Setting this flag allows a thread that has one or more 0 UIDs to retain its capabilities when it switches all of its UIDs to a nonzero value.  If this flag is not set, then such a UID switch causes the thread to lose all capabilities.  This flag is always cleared on an B<execve>(2).  (This flag provides the same functionality as the older B<prctl>(2)  B<PR_SET_KEEPCAPS> operation.)"
2143 msgstr "このフラグをセットされている場合、UID が 0 のスレッドの UID が 0 以外の値に 切り替わる際に、そのスレッドはケーパビリティを維持することができる。 このフラグがセットされていない場合には、UID が 0 から 0 以外の値に 切り替わると、そのスレッドは全てのケーパビリティを失う。 このフラグは B<execve>(2)  時には全てクリアされる (このフラグは、以前の B<prctl>(2)  の B<PR_SET_KEEPCAPS> 操作と同じ機能を提供するものである)。"
2144
2145 #. type: TP
2146 #: build/C/man7/capabilities.7:1055
2147 #, no-wrap
2148 msgid "B<SECBIT_NO_SETUID_FIXUP>"
2149 msgstr "B<SECBIT_NO_SETUID_FIXUP>"
2150
2151 #. type: Plain text
2152 #: build/C/man7/capabilities.7:1062
2153 msgid "Setting this flag stops the kernel from adjusting capability sets when the threads's effective and filesystem UIDs are switched between zero and nonzero values.  (See the subsection I<Effect of User ID Changes on Capabilities>.)"
2154 msgstr "このフラグをセットすると、スレッドの実効 UID とファイルシステム UID が 0 と 0 以外の間で切り替わった場合に、 カーネルはケーパビリティセットの調整を行わなくなる (「ユーザ ID 変更のケーパビリティへの影響」の節を参照)。"
2155
2156 #. type: TP
2157 #: build/C/man7/capabilities.7:1062
2158 #, no-wrap
2159 msgid "B<SECBIT_NOROOT>"
2160 msgstr "B<SECBIT_NOROOT>"
2161
2162 #. type: Plain text
2163 #: build/C/man7/capabilities.7:1070
2164 msgid "If this bit is set, then the kernel does not grant capabilities when a set-user-ID-root program is executed, or when a process with an effective or real UID of 0 calls B<execve>(2).  (See the subsection I<Capabilities and execution of programs by root>.)"
2165 msgstr "このビットがセットされている場合、 set-user-ID-root プログラムの実行時や、 実効 UID か 実 UID が 0 のプロセスが B<execve>(2)  を呼び出した時に、カーネルはケーパビリティを許可しない (「ケーパビリティと、ルートによるプログラムの実行」の節を参照)。"
2166
2167 #. type: Plain text
2168 #: build/C/man7/capabilities.7:1080
2169 msgid "Each of the above \"base\" flags has a companion \"locked\" flag.  Setting any of the \"locked\" flags is irreversible, and has the effect of preventing further changes to the corresponding \"base\" flag.  The locked flags are: B<SECBIT_KEEP_CAPS_LOCKED>, B<SECBIT_NO_SETUID_FIXUP_LOCKED>, and B<SECBIT_NOROOT_LOCKED>."
2170 msgstr "上記の \"base\" フラグの各々には対応する \"locked\" フラグが存在する。 いずれの \"locked\" フラグも一度セットされると戻すことはできず、 それ以降は対応する \"base\" フラグを変更することができなくなる。 \"locked\" フラグは B<SECBIT_KEEP_CAPS_LOCKED>, B<SECBIT_NO_SETUID_FIXUP_LOCKED>, B<SECBIT_NOROOT_LOCKED> という名前である。"
2171
2172 #. type: Plain text
2173 #: build/C/man7/capabilities.7:1092
2174 msgid "The I<securebits> flags can be modified and retrieved using the B<prctl>(2)  B<PR_SET_SECUREBITS> and B<PR_GET_SECUREBITS> operations.  The B<CAP_SETPCAP> capability is required to modify the flags."
2175 msgstr "I<securebits> フラグは、 B<prctl>(2)  の操作 B<PR_SET_SECUREBITS> や B<PR_GET_SECUREBITS> を使うことで変更したり取得したりできる。 フラグを変更するには B<CAP_SETPCAP> ケーパビリティが必要である。"
2176
2177 #. type: Plain text
2178 #: build/C/man7/capabilities.7:1101
2179 msgid "The I<securebits> flags are inherited by child processes.  During an B<execve>(2), all of the flags are preserved, except B<SECBIT_KEEP_CAPS> which is always cleared."
2180 msgstr ""
2181 "I<securebits> フラグは子プロセスに継承される。 B<execve>(2) においては、\n"
2182 "B<SECBIT_KEEP_CAPS> が常にクリアされる以外は、全てのフラグが保持される。"
2183
2184 #. type: Plain text
2185 #: build/C/man7/capabilities.7:1106
2186 msgid "An application can use the following call to lock itself, and all of its descendants, into an environment where the only way of gaining capabilities is by executing a program with associated file capabilities:"
2187 msgstr "アプリケーションは、以下の呼び出しを行うことにより、 自分自身および子孫となるプロセス全てに対して、 必要なファイルケーパビリティを持ったプログラムを実行しない限り、 対応するケーパビリティを獲得できないような状況に閉じこめることができる。"
2188
2189 #. type: Plain text
2190 #: build/C/man7/capabilities.7:1115
2191 #, no-wrap
2192 msgid ""
2193 "prctl(PR_SET_SECUREBITS,\n"
2194 "        SECBIT_KEEP_CAPS_LOCKED |\n"
2195 "        SECBIT_NO_SETUID_FIXUP |\n"
2196 "        SECBIT_NO_SETUID_FIXUP_LOCKED |\n"
2197 "        SECBIT_NOROOT |\n"
2198 "        SECBIT_NOROOT_LOCKED);\n"
2199 msgstr ""
2200 "prctl(PR_SET_SECUREBITS,\n"
2201 "        SECBIT_KEEP_CAPS_LOCKED |\n"
2202 "        SECBIT_NO_SETUID_FIXUP |\n"
2203 "        SECBIT_NO_SETUID_FIXUP_LOCKED |\n"
2204 "        SECBIT_NOROOT |\n"
2205 "        SECBIT_NOROOT_LOCKED);\n"
2206
2207 #. type: SS
2208 #: build/C/man7/capabilities.7:1117
2209 #, no-wrap
2210 msgid "Interaction with user namespaces"
2211 msgstr "ユーザー名前空間との相互作用"
2212
2213 #. type: Plain text
2214 #: build/C/man7/capabilities.7:1120
2215 msgid "For a discussion of the interaction of capabilities and user namespaces, see B<user_namespaces>(7)."
2216 msgstr "ケーパリビティとユーザー名前空間の相互の影響に関する議論は B<user_namespaces>(7) を参照。"
2217
2218 #. type: Plain text
2219 #: build/C/man7/capabilities.7:1126
2220 msgid "No standards govern capabilities, but the Linux capability implementation is based on the withdrawn POSIX.1e draft standard; see E<.UR http://wt.tuxomania.net\\:/publications\\:/posix.1e/> E<.UE .>"
2221 msgstr "ケーパビリティに関する標準はないが、 Linux のケーパビリティは廃案になった POSIX.1e 草案に基づいて実装されている。 E<.UR http://wt.xpilot.org\\:/publications\\:/posix.1e/> E<.UE> を参照。"
2222
2223 #. type: Plain text
2224 #: build/C/man7/capabilities.7:1131
2225 msgid "Since kernel 2.5.27, capabilities are an optional kernel component, and can be enabled/disabled via the B<CONFIG_SECURITY_CAPABILITIES> kernel configuration option."
2226 msgstr "カーネル 2.5.27 以降、ケーパビリティは選択式のカーネルコンポーネント となっており、カーネル設定オプション B<CONFIG_SECURITY_CAPABILITIES> により有効/無効を切り替えることができる。"
2227
2228 #.  7b9a7ec565505699f503b4fcf61500dceb36e744
2229 #. type: Plain text
2230 #: build/C/man7/capabilities.7:1145
2231 msgid "The I</proc/PID/task/TID/status> file can be used to view the capability sets of a thread.  The I</proc/PID/status> file shows the capability sets of a process's main thread.  Before Linux 3.8, nonexistent capabilities were shown as being enabled (1) in these sets.  Since Linux 3.8, all nonexistent capabilities (above B<CAP_LAST_CAP>)  are shown as disabled (0)."
2232 msgstr "I</proc/PID/task/TID/status> ファイルを使うと、スレッドのケーパビリティセットを見ることができる。 I</proc/PID/status> ファイルには、プロセスのメインスレッドのケーパビリティセットが表示される。 Linux 3.8 より前では、 これらのケーパビリティセットの表示で、 存在しないケーパビリティはすべて有効 (1) として表示される。 Linux 3.8 以降では、 存在しないケーパビリティはすべて無効 (0) として表示される。 (B<CAP_LAST_CAP> より大きい値を持つケーパビリティが存在しないケーパビリティである)。"
2233
2234 #. type: Plain text
2235 #: build/C/man7/capabilities.7:1160
2236 msgid "The I<libcap> package provides a suite of routines for setting and getting capabilities that is more comfortable and less likely to change than the interface provided by B<capset>(2)  and B<capget>(2).  This package also provides the B<setcap>(8)  and B<getcap>(8)  programs.  It can be found at"
2237 msgstr "I<libcap> パッケージは、ケーパビリティを設定・取得するための ルーチン群を提供している。これらのインタフェースは、 B<capset>(2)  と B<capget>(2)  が提供するインターフェースと比べて、より使いやすく、変更される可能性が少ない。 このパッケージでは、 B<setcap>(8), B<getcap>(8)  というプログラムも提供されている。 パッケージは以下で入手できる。"
2238
2239 #. type: Plain text
2240 #: build/C/man7/capabilities.7:1163
2241 msgid "E<.UR http://www.kernel.org\\:/pub\\:/linux\\:/libs\\:/security\\:/linux-privs> E<.UE .>"
2242 msgstr "E<.UR http://www.kernel.org\\:/pub\\:/linux\\:/libs\\:/security\\:/linux-privs> E<.UE .>"
2243
2244 #. type: Plain text
2245 #: build/C/man7/capabilities.7:1172
2246 msgid "Before kernel 2.6.24, and since kernel 2.6.24 if file capabilities are not enabled, a thread with the B<CAP_SETPCAP> capability can manipulate the capabilities of threads other than itself.  However, this is only theoretically possible, since no thread ever has B<CAP_SETPCAP> in either of these cases:"
2247 msgstr "バージョン 2.6.24 より前、およびファイルケーパビリティが 有効になっていない2.6.24 以降のカーネルでは、 B<CAP_SETPCAP> ケーパビリティを持ったスレッドは自分以外のスレッドの ケーパビリティを操作できる。 しかしながら、これは理論的に可能というだけである。 以下のいずれかの場合においても、どのスレッドも B<CAP_SETPCAP> ケーパビリティを持つことはないからである。"
2248
2249 #. type: Plain text
2250 #: build/C/man7/capabilities.7:1177
2251 msgid "In the pre-2.6.25 implementation the system-wide capability bounding set, I</proc/sys/kernel/cap-bound>, always masks out this capability, and this can not be changed without modifying the kernel source and rebuilding."
2252 msgstr "2.6.25 より前の実装では、システム共通のケーパビリティバウンディングセット I</proc/sys/kernel/cap-bound> ではこのケーパビリティは常に無効になっており、 ソースを変更してカーネルを再コンパイルしない限り、 これを変更することはできない。"
2253
2254 #. type: Plain text
2255 #: build/C/man7/capabilities.7:1183
2256 msgid "If file capabilities are disabled in the current implementation, then B<init> starts out with this capability removed from its per-process bounding set, and that bounding set is inherited by all other processes created on the system."
2257 msgstr "現在の実装ではファイルケーパビリティが無効になっている場合、 プロセス毎のバウンディングセットからこのケーパビリティを抜いて B<init> は開始され、 システム上で生成される他の全てのプロセスでこのバウンディングセットが 継承される。"
2258
2259 #. type: Plain text
2260 #: build/C/man7/capabilities.7:1202
2261 msgid "B<capsh>(1), B<capget>(2), B<prctl>(2), B<setfsuid>(2), B<cap_clear>(3), B<cap_copy_ext>(3), B<cap_from_text>(3), B<cap_get_file>(3), B<cap_get_proc>(3), B<cap_init>(3), B<capgetp>(3), B<capsetp>(3), B<libcap>(3), B<credentials>(7), B<user_namespaces>(7), B<pthreads>(7), B<getcap>(8), B<setcap>(8)"
2262 msgstr "B<capsh>(1), B<capget>(2), B<prctl>(2), B<setfsuid>(2), B<cap_clear>(3), B<cap_copy_ext>(3), B<cap_from_text>(3), B<cap_get_file>(3), B<cap_get_proc>(3), B<cap_init>(3), B<capgetp>(3), B<capsetp>(3), B<libcap>(3), B<credentials>(7), B<user_namespaces>(7), B<pthreads>(7), B<getcap>(8), B<setcap>(8)"
2263
2264 #. type: Plain text
2265 #: build/C/man7/capabilities.7:1205
2266 msgid "I<include/linux/capability.h> in the Linux kernel source tree"
2267 msgstr "Linux カーネルソース内の I<include/linux/capability.h>"
2268
2269 #. type: TH
2270 #: build/C/man2/capget.2:15
2271 #, no-wrap
2272 msgid "CAPGET"
2273 msgstr "CAPGET"
2274
2275 #. type: TH
2276 #: build/C/man2/capget.2:15
2277 #, no-wrap
2278 msgid "2013-03-11"
2279 msgstr "2013-03-11"
2280
2281 #. type: Plain text
2282 #: build/C/man2/capget.2:18
2283 msgid "capget, capset - set/get capabilities of thread(s)"
2284 msgstr "capget, capset - スレッドのケーパビリティを設定/取得する"
2285
2286 #. type: Plain text
2287 #: build/C/man2/capget.2:20
2288 msgid "B<#include E<lt>sys/capability.hE<gt>>"
2289 msgstr "B<#include E<lt>sys/capability.hE<gt>>"
2290
2291 #. type: Plain text
2292 #: build/C/man2/capget.2:22
2293 msgid "B<int capget(cap_user_header_t >I<hdrp>B<, cap_user_data_t >I<datap>B<);>"
2294 msgstr "B<int capget(cap_user_header_t >I<hdrp>B<, cap_user_data_t >I<datap>B<);>"
2295
2296 #. type: Plain text
2297 #: build/C/man2/capget.2:24
2298 msgid "B<int capset(cap_user_header_t >I<hdrp>B<, const cap_user_data_t >I<datap>B<);>"
2299 msgstr "B<int capset(cap_user_header_t >I<hdrp>B<, const cap_user_data_t >I<datap>B<);>"
2300
2301 #. type: Plain text
2302 #: build/C/man2/capget.2:35
2303 msgid "As of Linux 2.2, the power of the superuser (root) has been partitioned into a set of discrete capabilities.  Each thread has a set of effective capabilities identifying which capabilities (if any) it may currently exercise.  Each thread also has a set of inheritable capabilities that may be passed through an B<execve>(2)  call, and a set of permitted capabilities that it can make effective or inheritable."
2304 msgstr "Linux 2.2 で、スーパーユーザー (root) の権限は、個別のケーパビリティ (capabilities) へと分割され、その集合として表現されるようになった。 各スレッドは「実効ケーパビリティ (effective capability) の集合」を持ち、 それによって現在どの操作が実行可能かを識別できる。 また、各スレッドは、 「継承可能ケーパビリティ (inheritable capability) の集合」と 「許可ケーパビリティ (permitted capability) の集合」を持つ。 「継承可能ケーパビリティの集合」は B<execve>(2)  を通じて渡すことができるケーパビリティの集合であり、 「許可ケーパビリティ (permitted capability) の集合」は 実効ケーパビリティや継承可能ケーパビリティとして有効にできる ケーパビリティを規定するものである。"
2305
2306 #. type: Plain text
2307 #: build/C/man2/capget.2:44
2308 msgid "These two system calls are the raw kernel interface for getting and setting thread capabilities.  Not only are these system calls specific to Linux, but the kernel API is likely to change and use of these system calls (in particular the format of the I<cap_user_*_t> types) is subject to extension with each kernel revision, but old programs will keep working."
2309 msgstr "この二つのシステムコールはスレッドのケーパビリティを取得したり設定したりするための 生のカーネルインターフェースである。 これらのシステムコールは Linux 特有であるというだけでなく、 カーネル API は変更されるかもしれず、これらのシステムコールの使用法 (特に I<cap_user_*_t> 型という書式) はカーネルのリビジョン毎に拡張されるかもしれないが、 以前のプログラムはそのまま動作する。"
2310
2311 #. type: Plain text
2312 #: build/C/man2/capget.2:55
2313 msgid "The portable interfaces are B<cap_set_proc>(3)  and B<cap_get_proc>(3); if possible, you should use those interfaces in applications.  If you wish to use the Linux extensions in applications, you should use the easier-to-use interfaces B<capsetp>(3)  and B<capgetp>(3)."
2314 msgstr "移植性のあるインターフェースは B<cap_set_proc>(3)  と B<cap_get_proc>(3)  である。 可能ならばアプリケーションはこれらの関数を使用すべきである。 アプリケーションに Linux 拡張を使用したい場合には、より簡単に 使えるインターフェースである B<capsetp>(3)  と B<capgetp>(3)  を使用すべきである。"
2315
2316 #. type: SS
2317 #: build/C/man2/capget.2:55
2318 #, no-wrap
2319 msgid "Current details"
2320 msgstr "現在の詳細"
2321
2322 #. type: Plain text
2323 #: build/C/man2/capget.2:58
2324 msgid "Now that you have been warned, some current kernel details.  The structures are defined as follows."
2325 msgstr "現在のカーネルの詳細について注意を述べておく。 構造体は以下のように定義される。"
2326
2327 #. type: Plain text
2328 #: build/C/man2/capget.2:63
2329 #, no-wrap
2330 msgid ""
2331 "#define _LINUX_CAPABILITY_VERSION_1  0x19980330\n"
2332 "#define _LINUX_CAPABILITY_U32S_1     1\n"
2333 msgstr ""
2334 "#define _LINUX_CAPABILITY_VERSION_1  0x19980330\n"
2335 "#define _LINUX_CAPABILITY_U32S_1     1\n"
2336
2337 #. type: Plain text
2338 #: build/C/man2/capget.2:66
2339 #, no-wrap
2340 msgid ""
2341 "#define _LINUX_CAPABILITY_VERSION_2  0x20071026\n"
2342 "#define _LINUX_CAPABILITY_U32S_2     2\n"
2343 msgstr ""
2344 "#define _LINUX_CAPABILITY_VERSION_2  0x20071026\n"
2345 "#define _LINUX_CAPABILITY_U32S_2     2\n"
2346
2347 #. type: Plain text
2348 #: build/C/man2/capget.2:71
2349 #, no-wrap
2350 msgid ""
2351 "typedef struct __user_cap_header_struct {\n"
2352 "   __u32 version;\n"
2353 "   int pid;\n"
2354 "} *cap_user_header_t;\n"
2355 msgstr ""
2356 "typedef struct __user_cap_header_struct {\n"
2357 "   __u32 version;\n"
2358 "   int pid;\n"
2359 "} *cap_user_header_t;\n"
2360
2361 #. type: Plain text
2362 #: build/C/man2/capget.2:77
2363 #, no-wrap
2364 msgid ""
2365 "typedef struct __user_cap_data_struct {\n"
2366 "   __u32 effective;\n"
2367 "   __u32 permitted;\n"
2368 "   __u32 inheritable;\n"
2369 "} *cap_user_data_t;\n"
2370 msgstr ""
2371 "typedef struct __user_cap_data_struct {\n"
2372 "   __u32 effective;\n"
2373 "   __u32 permitted;\n"
2374 "   __u32 inheritable;\n"
2375 "} *cap_user_data_t;\n"
2376
2377 #. type: Plain text
2378 #: build/C/man2/capget.2:96
2379 msgid "The I<effective>, I<permitted>, and I<inheritable> fields are bit masks of the capabilities defined in B<capabilities>(7).  Note the B<CAP_*> values are bit indexes and need to be bit-shifted before ORing into the bit fields.  To define the structures for passing to the system call you have to use the I<struct __user_cap_header_struct> and I<struct __user_cap_data_struct> names because the typedefs are only pointers."
2380 msgstr "フィールド I<effective>, I<permitted>, I<inheritable> は、 B<capabilities>(7)  で定義されるケーパビリティのビットマスクである。 I<CAP_*> はビット番号を表すインデックス値であり、 ビットフィールドに OR を行う前に I<CAP_*> の値の分だけビットシフトを行う必要がある。 typedef の方はポインタなので、 このシステムコールに渡す構造体を定義するには、 I<struct __user_cap_header_struct> と I<struct __user_cap_data_struct> という名前を使用しなければならない。"
2381
2382 #. type: Plain text
2383 #: build/C/man2/capget.2:108
2384 msgid "Kernels prior to 2.6.25 prefer 32-bit capabilities with version B<_LINUX_CAPABILITY_VERSION_1>, and kernels 2.6.25+ prefer 64-bit capabilities with version B<_LINUX_CAPABILITY_VERSION_2>.  Note, 64-bit capabilities use I<datap>[0] and I<datap>[1], whereas 32-bit capabilities use only I<datap>[0]."
2385 msgstr "カーネル 2.6.25 より前では、バージョン B<_LINUX_CAPABILITY_VERSION_1> の 32 ビットケーパビリティが推奨である。 カーネル 2.6.25 以降では、バージョン B<_LINUX_CAPABILITY_VERSION_2> の 64 ビットケーパビリティが推奨である。 64 ビットケーパビリティでは I<datap>[0] と I<datap>[1] が使用されるのに対し、 32 ビットケーパビリティでは I<datap>[0] だけが使用される。"
2386
2387 #. type: Plain text
2388 #: build/C/man2/capget.2:112
2389 msgid "Another change affecting the behavior of these system calls is kernel support for file capabilities (VFS capability support).  This support is currently a compile time option (added in kernel 2.6.24)."
2390 msgstr "これらのシステムコールの挙動に影響があるもう一つの変更点は、 ファイルケーパビリティ (file capabilities) のカーネルによるサポート (VFS ケーパビリティのサポート) である。 VFS ケーパビリティのサポートは現在のところコンパイル時のオプションである (カーネル 2.6.24 で追加された)。"
2391
2392 #. type: Plain text
2393 #: build/C/man2/capget.2:119
2394 msgid "For B<capget>()  calls, one can probe the capabilities of any process by specifying its process ID with the I<hdrp-E<gt>pid> field value."
2395 msgstr "B<capget>()  では、 I<hdrp-E<gt>pid> のフィールド値にケーパビリティを知りたいプロセスのプロセス ID を 指定することで、任意のプロセスのケーパビリティを調べることができる。"
2396
2397 #. type: SS
2398 #: build/C/man2/capget.2:119
2399 #, no-wrap
2400 msgid "With VFS capability support"
2401 msgstr "VFS ケーパビリティがサポートされている場合"
2402
2403 #. type: Plain text
2404 #: build/C/man2/capget.2:131
2405 msgid "VFS Capability support creates a file-attribute method for adding capabilities to privileged executables.  This privilege model obsoletes kernel support for one process asynchronously setting the capabilities of another.  That is, with VFS support, for B<capset>()  calls the only permitted values for I<hdrp-E<gt>pid> are 0 or B<getpid>(2), which are equivalent."
2406 msgstr "VFS ケーパビリティのサポートでは、特権実行ファイルにケーパビリティを 追加するためのファイル属性メソッドが作成された。 この特権モデルの導入により、あるプロセスにより別のプロセスのケーパビリティ を非同期に設定する機能のカーネルによるサポートは廃止される。 つまり、VFS サポートでは、 B<capset>()  を呼び出す際に I<hdrp-E<gt>pid> の値として許されるのは 0 と B<getpid>(2)  が返す値だけとなる (どちらの値でも等価である)。"
2407
2408 #. type: SS
2409 #: build/C/man2/capget.2:131
2410 #, no-wrap
2411 msgid "Without VFS capability support"
2412 msgstr "VFS ケーパビリティがサポートされていない場合"
2413
2414 #. type: Plain text
2415 #: build/C/man2/capget.2:157
2416 msgid "When the kernel does not support VFS capabilities, B<capset>()  calls can operate on the capabilities of the thread specified by the I<pid> field of I<hdrp> when that is nonzero, or on the capabilities of the calling thread if I<pid> is 0.  If I<pid> refers to a single-threaded process, then I<pid> can be specified as a traditional process ID; operating on a thread of a multithreaded process requires a thread ID of the type returned by B<gettid>(2).  For B<capset>(), I<pid> can also be: -1, meaning perform the change on all threads except the caller and B<init>(1); or a value less than -1, in which case the change is applied to all members of the process group whose ID is -I<pid>."
2417 msgstr "カーネルが VFS ケーパビリティをサポートしていない場合、 I<hdrp> の I<pid> フィールドが 0 以外であれば、 B<capset>()  の操作対象は I<pid> で指定されたスレッドのケーパビリティになる。 I<pid> が 0 の場合は呼び出し元のスレッドのケーパビリティが操作対象となる。 I<pid> がシングルスレッドプロセスを参照している場合、 I<pid> は以前から使われているプロセスID を使って指定できる。 マルチスレッドプロセス内のあるスレッドを対象にする場合は、 B<gettid>(2)  が返すスレッドID を用いて指定する必要がある。 また、 B<capset>()  では -1 や -1 より小さな値を指定することもできる。 -1 は呼び出し元と B<init>(1)  を除く全てのスレッドを対象として変更を行うことを、 -1 より小さな値は ID が -I<pid> のプロセスグループの全メンバ を対象として変更を行うことを意味する。"
2418
2419 #. type: Plain text
2420 #: build/C/man2/capget.2:160
2421 msgid "For details on the data, see B<capabilities>(7)."
2422 msgstr "このデータの詳細は B<capabilities>(7)  を参照すること。"
2423
2424 #. type: Plain text
2425 #: build/C/man2/capget.2:179
2426 msgid "The calls will fail with the error B<EINVAL>, and set the I<version> field of I<hdrp> to the kernel preferred value of B<_LINUX_CAPABILITY_VERSION_?> when an unsupported I<version> value is specified.  In this way, one can probe what the current preferred capability revision is."
2427 msgstr "I<hdrp> のフィールド I<version> にサポートされていない値が指定された場合、 呼び出しはエラー B<EINVAL> で失敗し、 I<version> にカーネル推奨の B<_LINUX_CAPABILITY_VERSION_?> を設定する。 このようにして、現在の推奨ケーパビリティリビジョンが何かを 調べることができる。"
2428
2429 #. type: Plain text
2430 #: build/C/man2/capget.2:188
2431 msgid "Bad memory address.  I<hdrp> must not be NULL.  I<datap> may be NULL only when the user is trying to determine the preferred capability version format supported by the kernel."
2432 msgstr "不正なメモリアドレス。 I<hdrp> は NULL であってはならない。 I<datap> に NULL を指定してよいのは、ユーザがカーネルがサポートしている 推奨のケーパビリティバージョンを判定しようとしているときだけである。"
2433
2434 #. type: TP
2435 #: build/C/man2/capget.2:188 build/C/man7/cpuset.7:1180
2436 #: build/C/man7/cpuset.7:1189 build/C/man7/cpuset.7:1198
2437 #: build/C/man7/cpuset.7:1208 build/C/man7/cpuset.7:1217
2438 #: build/C/man7/cpuset.7:1224 build/C/man7/cpuset.7:1231
2439 #: build/C/man2/getgroups.2:114 build/C/man2/getgroups.2:121
2440 #: build/C/man2/getpriority.2:118 build/C/man2/getrlimit.2:471
2441 #: build/C/man2/getrusage.2:198 build/C/man2/iopl.2:72
2442 #: build/C/man2/ioprio_set.2:170 build/C/man2/seteuid.2:80
2443 #: build/C/man2/setgid.2:59 build/C/man2/setpgid.2:225
2444 #: build/C/man2/setresuid.2:99 build/C/man2/setreuid.2:128
2445 #: build/C/man2/setuid.2:105 build/C/man2/seccomp.2:373
2446 #: build/C/man2/seccomp.2:380 build/C/man2/seccomp.2:387
2447 #: build/C/man2/seccomp.2:393 build/C/man2/seccomp.2:402
2448 #, no-wrap
2449 msgid "B<EINVAL>"
2450 msgstr "B<EINVAL>"
2451
2452 #. type: Plain text
2453 #: build/C/man2/capget.2:191
2454 msgid "One of the arguments was invalid."
2455 msgstr "引き数のどれかが無効である。"
2456
2457 #. type: Plain text
2458 #: build/C/man2/capget.2:196
2459 msgid "An attempt was made to add a capability to the Permitted set, or to set a capability in the Effective or Inheritable sets that is not in the Permitted set."
2460 msgstr "「許可ケーパビリティセット」にケーパビリティを追加しようとしているか、 もしくは「許可ケーパビリティセット」に含まれないケーパビリティを 「実効ケーパビリティセット」や「継承可能ケーパビリティセット」に セットしようとしている。"
2461
2462 #. type: Plain text
2463 #: build/C/man2/capget.2:215
2464 msgid "The caller attempted to use B<capset>()  to modify the capabilities of a thread other than itself, but lacked sufficient privilege.  For kernels supporting VFS capabilities, this is never permitted.  For kernels lacking VFS support, the B<CAP_SETPCAP> capability is required.  (A bug in kernels before 2.6.11 meant that this error could also occur if a thread without this capability tried to change its own capabilities by specifying the I<pid> field as a nonzero value (i.e., the value returned by B<getpid>(2))  instead of 0.)"
2465 msgstr "呼び出し元が自分以外のスレッドのケーパビリティを B<capset>()  を使って修正しようとしたが、十分な特権がなかった。 VFS ケーパビリティをサポートしているカーネルでは、 この操作が許可されることは決してない。 VFS ケーパビリティをサポートしていないカーネルでは、 B<CAP_SETPCAP> ケーパビリティが必要である。 (バージョン 2.6.11 より前のカーネルには、 このケーパビリティを持たないスレッドが I<pid> フィールドに 0 でない値 (つまり、0 の代わりに B<getpid>(2)  が返す値) を指定して自分自身のケーパビリティを変更しようとした場合にも、 このエラーが発生するというバグがあった。)"
2466
2467 #. type: TP
2468 #: build/C/man2/capget.2:215 build/C/man7/cpuset.7:1330
2469 #: build/C/man2/getpriority.2:126 build/C/man2/getrlimit.2:502
2470 #: build/C/man2/getsid.2:70 build/C/man2/ioprio_set.2:187
2471 #: build/C/man2/setpgid.2:240 build/C/man2/seccomp.2:426
2472 #, no-wrap
2473 msgid "B<ESRCH>"
2474 msgstr "B<ESRCH>"
2475
2476 #. type: Plain text
2477 #: build/C/man2/capget.2:218
2478 msgid "No such thread."
2479 msgstr "そのようなスレッドが存在しない。"
2480
2481 #. type: Plain text
2482 #: build/C/man2/capget.2:220 build/C/man2/ioprio_set.2:198
2483 msgid "These system calls are Linux-specific."
2484 msgstr "これらのシステムコールは Linux 独自である。"
2485
2486 #. type: Plain text
2487 #: build/C/man2/capget.2:225
2488 msgid "The portable interface to the capability querying and setting functions is provided by the I<libcap> library and is available here:"
2489 msgstr "ケーパビリティを設定したり取得したりする機能のための移植性ある インターフェースは I<libcap> ライブラリによって提供される。 このライブラリは以下から入手できる:"
2490
2491 #. type: Plain text
2492 #: build/C/man2/capget.2:228
2493 msgid "E<.UR http://git.kernel.org/cgit\\:/linux\\:/kernel\\:/git\\:/morgan\\:\\:/libcap.git> E<.UE>"
2494 msgstr "E<.UR http://git.kernel.org/cgit\\:/linux\\:/kernel\\:/git\\:/morgan\\:\\:/libcap.git> E<.UE>"
2495
2496 #. type: Plain text
2497 #: build/C/man2/capget.2:232
2498 msgid "B<clone>(2), B<gettid>(2), B<capabilities>(7)"
2499 msgstr "B<clone>(2), B<gettid>(2), B<capabilities>(7)"
2500
2501 #. type: TH
2502 #: build/C/man7/cpuset.7:25
2503 #, no-wrap
2504 msgid "CPUSET"
2505 msgstr "CPUSET"
2506
2507 #. type: TH
2508 #: build/C/man7/cpuset.7:25
2509 #, no-wrap
2510 msgid "2014-05-21"
2511 msgstr "2014-05-21"
2512
2513 #. type: Plain text
2514 #: build/C/man7/cpuset.7:28
2515 msgid "cpuset - confine processes to processor and memory node subsets"
2516 msgstr ""
2517
2518 #. type: Plain text
2519 #: build/C/man7/cpuset.7:35
2520 msgid "The cpuset filesystem is a pseudo-filesystem interface to the kernel cpuset mechanism, which is used to control the processor placement and memory placement of processes.  It is commonly mounted at I</dev/cpuset>."
2521 msgstr ""
2522
2523 #. type: Plain text
2524 #: build/C/man7/cpuset.7:52
2525 msgid "On systems with kernels compiled with built in support for cpusets, all processes are attached to a cpuset, and cpusets are always present.  If a system supports cpusets, then it will have the entry B<nodev cpuset> in the file I</proc/filesystems>.  By mounting the cpuset filesystem (see the B<EXAMPLE> section below), the administrator can configure the cpusets on a system to control the processor and memory placement of processes on that system.  By default, if the cpuset configuration on a system is not modified or if the cpuset filesystem is not even mounted, then the cpuset mechanism, though present, has no affect on the system's behavior."
2526 msgstr ""
2527
2528 #. type: Plain text
2529 #: build/C/man7/cpuset.7:54
2530 msgid "A cpuset defines a list of CPUs and memory nodes."
2531 msgstr ""
2532
2533 #. type: Plain text
2534 #: build/C/man7/cpuset.7:63
2535 msgid "The CPUs of a system include all the logical processing units on which a process can execute, including, if present, multiple processor cores within a package and Hyper-Threads within a processor core.  Memory nodes include all distinct banks of main memory; small and SMP systems typically have just one memory node that contains all the system's main memory, while NUMA (non-uniform memory access) systems have multiple memory nodes."
2536 msgstr ""
2537
2538 #. type: Plain text
2539 #: build/C/man7/cpuset.7:73
2540 msgid "Cpusets are represented as directories in a hierarchical pseudo-filesystem, where the top directory in the hierarchy (I</dev/cpuset>)  represents the entire system (all online CPUs and memory nodes)  and any cpuset that is the child (descendant) of another parent cpuset contains a subset of that parent's CPUs and memory nodes.  The directories and files representing cpusets have normal filesystem permissions."
2541 msgstr ""
2542
2543 #. type: Plain text
2544 #: build/C/man7/cpuset.7:84
2545 msgid "Every process in the system belongs to exactly one cpuset.  A process is confined to run only on the CPUs in the cpuset it belongs to, and to allocate memory only on the memory nodes in that cpuset.  When a process B<fork>(2)s, the child process is placed in the same cpuset as its parent.  With sufficient privilege, a process may be moved from one cpuset to another and the allowed CPUs and memory nodes of an existing cpuset may be changed."
2546 msgstr ""
2547
2548 #. type: Plain text
2549 #: build/C/man7/cpuset.7:92
2550 msgid "When the system begins booting, a single cpuset is defined that includes all CPUs and memory nodes on the system, and all processes are in that cpuset.  During the boot process, or later during normal system operation, other cpusets may be created, as subdirectories of this top cpuset, under the control of the system administrator, and processes may be placed in these other cpusets."
2551 msgstr ""
2552
2553 #. type: Plain text
2554 #: build/C/man7/cpuset.7:114
2555 msgid "Cpusets are integrated with the B<sched_setaffinity>(2)  scheduling affinity mechanism and the B<mbind>(2)  and B<set_mempolicy>(2)  memory-placement mechanisms in the kernel.  Neither of these mechanisms let a process make use of a CPU or memory node that is not allowed by that process's cpuset.  If changes to a process's cpuset placement conflict with these other mechanisms, then cpuset placement is enforced even if it means overriding these other mechanisms.  The kernel accomplishes this overriding by silently restricting the CPUs and memory nodes requested by these other mechanisms to those allowed by the invoking process's cpuset.  This can result in these other calls returning an error, if for example, such a call ends up requesting an empty set of CPUs or memory nodes, after that request is restricted to the invoking process's cpuset."
2556 msgstr ""
2557
2558 #. type: Plain text
2559 #: build/C/man7/cpuset.7:120
2560 msgid "Typically, a cpuset is used to manage the CPU and memory-node confinement for a set of cooperating processes such as a batch scheduler job, and these other mechanisms are used to manage the placement of individual processes or memory regions within that set or job."
2561 msgstr ""
2562
2563 #. type: SH
2564 #: build/C/man7/cpuset.7:120
2565 #, no-wrap
2566 msgid "FILES"
2567 msgstr "ファイル"
2568
2569 #. type: Plain text
2570 #: build/C/man7/cpuset.7:125
2571 msgid "Each directory below I</dev/cpuset> represents a cpuset and contains a fixed set of pseudo-files describing the state of that cpuset."
2572 msgstr ""
2573
2574 #. type: Plain text
2575 #: build/C/man7/cpuset.7:135
2576 msgid "New cpusets are created using the B<mkdir>(2)  system call or the B<mkdir>(1)  command.  The properties of a cpuset, such as its flags, allowed CPUs and memory nodes, and attached processes, are queried and modified by reading or writing to the appropriate file in that cpuset's directory, as listed below."
2577 msgstr ""
2578
2579 #. type: Plain text
2580 #: build/C/man7/cpuset.7:141
2581 msgid "The pseudo-files in each cpuset directory are automatically created when the cpuset is created, as a result of the B<mkdir>(2)  invocation.  It is not possible to directly add or remove these pseudo-files."
2582 msgstr ""
2583
2584 #. type: Plain text
2585 #: build/C/man7/cpuset.7:149
2586 msgid "A cpuset directory that contains no child cpuset directories, and has no attached processes, can be removed using B<rmdir>(2)  or B<rmdir>(1).  It is not necessary, or possible, to remove the pseudo-files inside the directory before removing it."
2587 msgstr ""
2588
2589 #. type: Plain text
2590 #: build/C/man7/cpuset.7:163
2591 msgid "The pseudo-files in each cpuset directory are small text files that may be read and written using traditional shell utilities such as B<cat>(1), and B<echo>(1), or from a program by using file I/O library functions or system calls, such as B<open>(2), B<read>(2), B<write>(2), and B<close>(2)."
2592 msgstr ""
2593
2594 #.  ====================== tasks ======================
2595 #. type: Plain text
2596 #: build/C/man7/cpuset.7:168
2597 msgid "The pseudo-files in a cpuset directory represent internal kernel state and do not have any persistent image on disk.  Each of these per-cpuset files is listed and described below."
2598 msgstr ""
2599
2600 #. type: TP
2601 #: build/C/man7/cpuset.7:168
2602 #, no-wrap
2603 msgid "I<tasks>"
2604 msgstr "I<tasks>"
2605
2606 #. type: Plain text
2607 #: build/C/man7/cpuset.7:178
2608 msgid "List of the process IDs (PIDs) of the processes in that cpuset.  The list is formatted as a series of ASCII decimal numbers, each followed by a newline.  A process may be added to a cpuset (automatically removing it from the cpuset that previously contained it) by writing its PID to that cpuset's I<tasks> file (with or without a trailing newline)."
2609 msgstr ""
2610
2611 #.  =================== notify_on_release ===================
2612 #. type: Plain text
2613 #: build/C/man7/cpuset.7:186
2614 msgid "B<Warning:> only one PID may be written to the I<tasks> file at a time.  If a string is written that contains more than one PID, only the first one will be used."
2615 msgstr ""
2616
2617 #. type: TP
2618 #: build/C/man7/cpuset.7:186
2619 #, no-wrap
2620 msgid "I<notify_on_release>"
2621 msgstr "I<notify_on_release>"
2622
2623 #.  ====================== cpus ======================
2624 #. type: Plain text
2625 #: build/C/man7/cpuset.7:195
2626 msgid "Flag (0 or 1).  If set (1), that cpuset will receive special handling after it is released, that is, after all processes cease using it (i.e., terminate or are moved to a different cpuset)  and all child cpuset directories have been removed.  See the B<Notify On Release> section, below."
2627 msgstr ""
2628
2629 #. type: TP
2630 #: build/C/man7/cpuset.7:195
2631 #, no-wrap
2632 msgid "I<cpuset.cpus>"
2633 msgstr "I<cpuset.cpus>"
2634
2635 #. type: Plain text
2636 #: build/C/man7/cpuset.7:202
2637 msgid "List of the physical numbers of the CPUs on which processes in that cpuset are allowed to execute.  See B<List Format> below for a description of the format of I<cpus>."
2638 msgstr ""
2639
2640 #.  ==================== cpu_exclusive ====================
2641 #. type: Plain text
2642 #: build/C/man7/cpuset.7:208
2643 msgid "The CPUs allowed to a cpuset may be changed by writing a new list to its I<cpus> file."
2644 msgstr ""
2645
2646 #. type: TP
2647 #: build/C/man7/cpuset.7:208
2648 #, no-wrap
2649 msgid "I<cpuset.cpu_exclusive>"
2650 msgstr "I<cpuset.cpu_exclusive>"
2651
2652 #. type: Plain text
2653 #: build/C/man7/cpuset.7:215
2654 msgid "Flag (0 or 1).  If set (1), the cpuset has exclusive use of its CPUs (no sibling or cousin cpuset may overlap CPUs).  By default this is off (0).  Newly created cpusets also initially default this to off (0)."
2655 msgstr ""
2656
2657 #.  ====================== mems ======================
2658 #. type: Plain text
2659 #: build/C/man7/cpuset.7:237
2660 msgid "Two cpusets are I<sibling> cpusets if they share the same parent cpuset in the I</dev/cpuset> hierarchy.  Two cpusets are I<cousin> cpusets if neither is the ancestor of the other.  Regardless of the I<cpu_exclusive> setting, if one cpuset is the ancestor of another, and if both of these cpusets have nonempty I<cpus>, then their I<cpus> must overlap, because the I<cpus> of any cpuset are always a subset of the I<cpus> of its parent cpuset."
2661 msgstr ""
2662
2663 #. type: TP
2664 #: build/C/man7/cpuset.7:237
2665 #, no-wrap
2666 msgid "I<cpuset.mems>"
2667 msgstr "I<cpuset.mems>"
2668
2669 #.  ==================== mem_exclusive ====================
2670 #. type: Plain text
2671 #: build/C/man7/cpuset.7:245
2672 msgid "List of memory nodes on which processes in this cpuset are allowed to allocate memory.  See B<List Format> below for a description of the format of I<mems>."
2673 msgstr ""
2674
2675 #. type: TP
2676 #: build/C/man7/cpuset.7:245
2677 #, no-wrap
2678 msgid "I<cpuset.mem_exclusive>"
2679 msgstr "I<cpuset.mem_exclusive>"
2680
2681 #. type: Plain text
2682 #: build/C/man7/cpuset.7:253
2683 msgid "Flag (0 or 1).  If set (1), the cpuset has exclusive use of its memory nodes (no sibling or cousin may overlap).  Also if set (1), the cpuset is a B<Hardwall> cpuset (see below).  By default this is off (0).  Newly created cpusets also initially default this to off (0)."
2684 msgstr ""
2685
2686 #.  ==================== mem_hardwall ====================
2687 #. type: Plain text
2688 #: build/C/man7/cpuset.7:261
2689 msgid "Regardless of the I<mem_exclusive> setting, if one cpuset is the ancestor of another, then their memory nodes must overlap, because the memory nodes of any cpuset are always a subset of the memory nodes of that cpuset's parent cpuset."
2690 msgstr ""
2691
2692 #. type: TP
2693 #: build/C/man7/cpuset.7:261
2694 #, no-wrap
2695 msgid "I<cpuset.mem_hardwall> (since Linux 2.6.26)"
2696 msgstr "I<cpuset.mem_hardwall> (Linux 2.6.26 以降)"
2697
2698 #.  ==================== memory_migrate ====================
2699 #. type: Plain text
2700 #: build/C/man7/cpuset.7:272
2701 msgid "Flag (0 or 1).  If set (1), the cpuset is a B<Hardwall> cpuset (see below).  Unlike B<mem_exclusive>, there is no constraint on whether cpusets marked B<mem_hardwall> may have overlapping memory nodes with sibling or cousin cpusets.  By default this is off (0).  Newly created cpusets also initially default this to off (0)."
2702 msgstr ""
2703
2704 #. type: TP
2705 #: build/C/man7/cpuset.7:272
2706 #, no-wrap
2707 msgid "I<cpuset.memory_migrate> (since Linux 2.6.16)"
2708 msgstr "I<cpuset.memory_migrate> (Linux 2.6.16 以降)"
2709
2710 #.  ==================== memory_pressure ====================
2711 #. type: Plain text
2712 #: build/C/man7/cpuset.7:279
2713 msgid "Flag (0 or 1).  If set (1), then memory migration is enabled.  By default this is off (0).  See the B<Memory Migration> section, below."
2714 msgstr ""
2715
2716 #. type: TP
2717 #: build/C/man7/cpuset.7:279
2718 #, no-wrap
2719 msgid "I<cpuset.memory_pressure> (since Linux 2.6.16)"
2720 msgstr "I<cpuset.memory_pressure> (Linux 2.6.16 以降)"
2721
2722 #.  ================= memory_pressure_enabled =================
2723 #. type: Plain text
2724 #: build/C/man7/cpuset.7:292
2725 msgid "A measure of how much memory pressure the processes in this cpuset are causing.  See the B<Memory Pressure> section, below.  Unless I<memory_pressure_enabled> is enabled, always has value zero (0).  This file is read-only.  See the B<WARNINGS> section, below."
2726 msgstr ""
2727
2728 #. type: TP
2729 #: build/C/man7/cpuset.7:292
2730 #, no-wrap
2731 msgid "I<cpuset.memory_pressure_enabled> (since Linux 2.6.16)"
2732 msgstr "I<cpuset.memory_pressure_enabled> (Linux 2.6.16 以降)"
2733
2734 #.  ================== memory_spread_page ==================
2735 #. type: Plain text
2736 #: build/C/man7/cpuset.7:304
2737 msgid "Flag (0 or 1).  This file is present only in the root cpuset, normally I</dev/cpuset>.  If set (1), the I<memory_pressure> calculations are enabled for all cpusets in the system.  By default this is off (0).  See the B<Memory Pressure> section, below."
2738 msgstr ""
2739
2740 #. type: TP
2741 #: build/C/man7/cpuset.7:304
2742 #, no-wrap
2743 msgid "I<cpuset.memory_spread_page> (since Linux 2.6.17)"
2744 msgstr "I<cpuset.memory_spread_page> (Linux 2.6.17 以降)"
2745
2746 #.  ================== memory_spread_slab ==================
2747 #. type: Plain text
2748 #: build/C/man7/cpuset.7:314
2749 msgid "Flag (0 or 1).  If set (1), pages in the kernel page cache (filesystem buffers) are uniformly spread across the cpuset.  By default this is off (0) in the top cpuset, and inherited from the parent cpuset in newly created cpusets.  See the B<Memory Spread> section, below."
2750 msgstr ""
2751
2752 #. type: TP
2753 #: build/C/man7/cpuset.7:314
2754 #, no-wrap
2755 msgid "I<cpuset.memory_spread_slab> (since Linux 2.6.17)"
2756 msgstr "I<cpuset.memory_spread_slab> (Linux 2.6.17 以降)"
2757
2758 #.  ================== sched_load_balance ==================
2759 #. type: Plain text
2760 #: build/C/man7/cpuset.7:325
2761 msgid "Flag (0 or 1).  If set (1), the kernel slab caches for file I/O (directory and inode structures) are uniformly spread across the cpuset.  By default this is off (0) in the top cpuset, and inherited from the parent cpuset in newly created cpusets.  See the B<Memory Spread> section, below."
2762 msgstr ""
2763
2764 #. type: TP
2765 #: build/C/man7/cpuset.7:325
2766 #, no-wrap
2767 msgid "I<cpuset.sched_load_balance> (since Linux 2.6.24)"
2768 msgstr "I<cpuset.sched_load_balance> (Linux 2.6.24 以降)"
2769
2770 #.  ================== sched_relax_domain_level ==================
2771 #. type: Plain text
2772 #: build/C/man7/cpuset.7:339
2773 msgid "Flag (0 or 1).  If set (1, the default) the kernel will automatically load balance processes in that cpuset over the allowed CPUs in that cpuset.  If cleared (0) the kernel will avoid load balancing processes in this cpuset, I<unless> some other cpuset with overlapping CPUs has its I<sched_load_balance> flag set.  See B<Scheduler Load Balancing>, below, for further details."
2774 msgstr ""
2775
2776 #. type: TP
2777 #: build/C/man7/cpuset.7:339
2778 #, no-wrap
2779 msgid "I<cpuset.sched_relax_domain_level> (since Linux 2.6.26)"
2780 msgstr "I<cpuset.sched_relax_domain_level> (Linux 2.6.26 以降)"
2781
2782 #.  ================== proc cpuset ==================
2783 #. type: Plain text
2784 #: build/C/man7/cpuset.7:359
2785 msgid "Integer, between -1 and a small positive value.  The I<sched_relax_domain_level> controls the width of the range of CPUs over which the kernel scheduler performs immediate rebalancing of runnable tasks across CPUs.  If I<sched_load_balance> is disabled, then the setting of I<sched_relax_domain_level> does not matter, as no such load balancing is done.  If I<sched_load_balance> is enabled, then the higher the value of the I<sched_relax_domain_level>, the wider the range of CPUs over which immediate load balancing is attempted.  See B<Scheduler Relax Domain Level>, below, for further details."
2786 msgstr ""
2787
2788 #.  ================== proc status ==================
2789 #. type: Plain text
2790 #: build/C/man7/cpuset.7:367
2791 msgid "In addition to the above pseudo-files in each directory below I</dev/cpuset>, each process has a pseudo-file, I</proc/E<lt>pidE<gt>/cpuset>, that displays the path of the process's cpuset directory relative to the root of the cpuset filesystem."
2792 msgstr ""
2793
2794 #. type: Plain text
2795 #: build/C/man7/cpuset.7:378
2796 msgid "Also the I</proc/E<lt>pidE<gt>/status> file for each process has four added lines, displaying the process's I<Cpus_allowed> (on which CPUs it may be scheduled) and I<Mems_allowed> (on which memory nodes it may obtain memory), in the two formats B<Mask Format> and B<List Format> (see below)  as shown in the following example:"
2797 msgstr ""
2798
2799 #. type: Plain text
2800 #: build/C/man7/cpuset.7:385
2801 #, no-wrap
2802 msgid ""
2803 "Cpus_allowed:   ffffffff,ffffffff,ffffffff,ffffffff\n"
2804 "Cpus_allowed_list:     0-127\n"
2805 "Mems_allowed:   ffffffff,ffffffff\n"
2806 "Mems_allowed_list:     0-63\n"
2807 msgstr ""
2808 "Cpus_allowed:   ffffffff,ffffffff,ffffffff,ffffffff\n"
2809 "Cpus_allowed_list:     0-127\n"
2810 "Mems_allowed:   ffffffff,ffffffff\n"
2811 "Mems_allowed_list:     0-63\n"
2812
2813 #.  ================== EXTENDED CAPABILITIES ==================
2814 #. type: Plain text
2815 #: build/C/man7/cpuset.7:391
2816 msgid "The \"allowed\" fields were added in Linux 2.6.24; the \"allowed_list\" fields were added in Linux 2.6.26."
2817 msgstr ""
2818
2819 #. type: SH
2820 #: build/C/man7/cpuset.7:391
2821 #, no-wrap
2822 msgid "EXTENDED CAPABILITIES"
2823 msgstr "拡張ケーパビリティ"
2824
2825 #.  ================== Exclusive Cpusets ==================
2826 #. type: Plain text
2827 #: build/C/man7/cpuset.7:399
2828 msgid "In addition to controlling which I<cpus> and I<mems> a process is allowed to use, cpusets provide the following extended capabilities."
2829 msgstr ""
2830
2831 #. type: SS
2832 #: build/C/man7/cpuset.7:399
2833 #, no-wrap
2834 msgid "Exclusive cpusets"
2835 msgstr ""
2836
2837 #. type: Plain text
2838 #: build/C/man7/cpuset.7:406
2839 msgid "If a cpuset is marked I<cpu_exclusive> or I<mem_exclusive>, no other cpuset, other than a direct ancestor or descendant, may share any of the same CPUs or memory nodes."
2840 msgstr ""
2841
2842 #.  ================== Hardwall ==================
2843 #. type: Plain text
2844 #: build/C/man7/cpuset.7:432
2845 msgid "A cpuset that is I<mem_exclusive> restricts kernel allocations for buffer cache pages and other internal kernel data pages commonly shared by the kernel across multiple users.  All cpusets, whether I<mem_exclusive> or not, restrict allocations of memory for user space.  This enables configuring a system so that several independent jobs can share common kernel data, while isolating each job's user allocation in its own cpuset.  To do this, construct a large I<mem_exclusive> cpuset to hold all the jobs, and construct child, non-I<mem_exclusive> cpusets for each individual job.  Only a small amount of kernel memory, such as requests from interrupt handlers, is allowed to be placed on memory nodes outside even a I<mem_exclusive> cpuset."
2846 msgstr ""
2847
2848 #. type: SS
2849 #: build/C/man7/cpuset.7:432
2850 #, no-wrap
2851 msgid "Hardwall"
2852 msgstr ""
2853
2854 #. type: Plain text
2855 #: build/C/man7/cpuset.7:447
2856 msgid "A cpuset that has I<mem_exclusive> or I<mem_hardwall> set is a I<hardwall> cpuset.  A I<hardwall> cpuset restricts kernel allocations for page, buffer, and other data commonly shared by the kernel across multiple users.  All cpusets, whether I<hardwall> or not, restrict allocations of memory for user space."
2857 msgstr ""
2858
2859 #. type: Plain text
2860 #: build/C/man7/cpuset.7:458
2861 msgid "This enables configuring a system so that several independent jobs can share common kernel data, such as filesystem pages, while isolating each job's user allocation in its own cpuset.  To do this, construct a large I<hardwall> cpuset to hold all the jobs, and construct child cpusets for each individual job which are not I<hardwall> cpusets."
2862 msgstr ""
2863
2864 #.  ================== Notify On Release ==================
2865 #. type: Plain text
2866 #: build/C/man7/cpuset.7:464
2867 msgid "Only a small amount of kernel memory, such as requests from interrupt handlers, is allowed to be taken outside even a I<hardwall> cpuset."
2868 msgstr ""
2869
2870 #. type: SS
2871 #: build/C/man7/cpuset.7:464
2872 #, no-wrap
2873 msgid "Notify on release"
2874 msgstr ""
2875
2876 #. type: Plain text
2877 #: build/C/man7/cpuset.7:476
2878 msgid "If the I<notify_on_release> flag is enabled (1) in a cpuset, then whenever the last process in the cpuset leaves (exits or attaches to some other cpuset)  and the last child cpuset of that cpuset is removed, the kernel will run the command I</sbin/cpuset_release_agent>, supplying the pathname (relative to the mount point of the cpuset filesystem) of the abandoned cpuset.  This enables automatic removal of abandoned cpusets."
2879 msgstr ""
2880
2881 #. type: Plain text
2882 #: build/C/man7/cpuset.7:484
2883 msgid "The default value of I<notify_on_release> in the root cpuset at system boot is disabled (0).  The default value of other cpusets at creation is the current value of their parent's I<notify_on_release> setting."
2884 msgstr ""
2885
2886 #. type: Plain text
2887 #: build/C/man7/cpuset.7:492
2888 msgid "The command I</sbin/cpuset_release_agent> is invoked, with the name (I</dev/cpuset> relative path)  of the to-be-released cpuset in I<argv[1]>."
2889 msgstr ""
2890
2891 #. type: Plain text
2892 #: build/C/man7/cpuset.7:496
2893 msgid "The usual contents of the command I</sbin/cpuset_release_agent> is simply the shell script:"
2894 msgstr ""
2895
2896 #. type: Plain text
2897 #: build/C/man7/cpuset.7:501
2898 #, no-wrap
2899 msgid ""
2900 "#!/bin/sh\n"
2901 "rmdir /dev/cpuset/$1\n"
2902 msgstr ""
2903 "#!/bin/sh\n"
2904 "rmdir /dev/cpuset/$1\n"
2905
2906 #.  ================== Memory Pressure ==================
2907 #. type: Plain text
2908 #: build/C/man7/cpuset.7:509
2909 msgid "As with other flag values below, this flag can be changed by writing an ASCII number 0 or 1 (with optional trailing newline)  into the file, to clear or set the flag, respectively."
2910 msgstr ""
2911
2912 #. type: SS
2913 #: build/C/man7/cpuset.7:509
2914 #, no-wrap
2915 msgid "Memory pressure"
2916 msgstr ""
2917
2918 #. type: Plain text
2919 #: build/C/man7/cpuset.7:515
2920 msgid "The I<memory_pressure> of a cpuset provides a simple per-cpuset running average of the rate that the processes in a cpuset are attempting to free up in-use memory on the nodes of the cpuset to satisfy additional memory requests."
2921 msgstr ""
2922
2923 #. type: Plain text
2924 #: build/C/man7/cpuset.7:519
2925 msgid "This enables batch managers that are monitoring jobs running in dedicated cpusets to efficiently detect what level of memory pressure that job is causing."
2926 msgstr ""
2927
2928 #. type: Plain text
2929 #: build/C/man7/cpuset.7:526
2930 msgid "This is useful both on tightly managed systems running a wide mix of submitted jobs, which may choose to terminate or reprioritize jobs that are trying to use more memory than allowed on the nodes assigned them, and with tightly coupled, long-running, massively parallel scientific computing jobs that will dramatically fail to meet required performance goals if they start to use more memory than allowed to them."
2931 msgstr ""
2932
2933 #. type: Plain text
2934 #: build/C/man7/cpuset.7:531
2935 msgid "This mechanism provides a very economical way for the batch manager to monitor a cpuset for signs of memory pressure.  It's up to the batch manager or other user code to decide what action to take if it detects signs of memory pressure."
2936 msgstr ""
2937
2938 #. type: Plain text
2939 #: build/C/man7/cpuset.7:538
2940 msgid "Unless memory pressure calculation is enabled by setting the pseudo-file I</dev/cpuset/cpuset.memory_pressure_enabled>, it is not computed for any cpuset, and reads from any I<memory_pressure> always return zero, as represented by the ASCII string \"0\\en\".  See the B<WARNINGS> section, below."
2941 msgstr ""
2942
2943 #. type: Plain text
2944 #: build/C/man7/cpuset.7:540
2945 msgid "A per-cpuset, running average is employed for the following reasons:"
2946 msgstr ""
2947
2948 #. type: Plain text
2949 #: build/C/man7/cpuset.7:545
2950 msgid "Because this meter is per-cpuset rather than per-process or per virtual memory region, the system load imposed by a batch scheduler monitoring this metric is sharply reduced on large systems, because a scan of the tasklist can be avoided on each set of queries."
2951 msgstr ""
2952
2953 #. type: Plain text
2954 #: build/C/man7/cpuset.7:550
2955 msgid "Because this meter is a running average rather than an accumulating counter, a batch scheduler can detect memory pressure with a single read, instead of having to read and accumulate results for a period of time."
2956 msgstr ""
2957
2958 #. type: Plain text
2959 #: build/C/man7/cpuset.7:556
2960 msgid "Because this meter is per-cpuset rather than per-process, the batch scheduler can obtain the key information\\(emmemory pressure in a cpuset\\(emwith a single read, rather than having to query and accumulate results over all the (dynamically changing)  set of processes in the cpuset."
2961 msgstr ""
2962
2963 #. type: Plain text
2964 #: build/C/man7/cpuset.7:564
2965 msgid "The I<memory_pressure> of a cpuset is calculated using a per-cpuset simple digital filter that is kept within the kernel.  For each cpuset, this filter tracks the recent rate at which processes attached to that cpuset enter the kernel direct reclaim code."
2966 msgstr ""
2967
2968 #. type: Plain text
2969 #: build/C/man7/cpuset.7:573
2970 msgid "The kernel direct reclaim code is entered whenever a process has to satisfy a memory page request by first finding some other page to repurpose, due to lack of any readily available already free pages.  Dirty filesystem pages are repurposed by first writing them to disk.  Unmodified filesystem buffer pages are repurposed by simply dropping them, though if that page is needed again, it will have to be reread from disk."
2971 msgstr ""
2972
2973 #.  ================== Memory Spread ==================
2974 #. type: Plain text
2975 #: build/C/man7/cpuset.7:581
2976 msgid "The I<cpuset.memory_pressure> file provides an integer number representing the recent (half-life of 10 seconds) rate of entries to the direct reclaim code caused by any process in the cpuset, in units of reclaims attempted per second, times 1000."
2977 msgstr ""
2978
2979 #. type: SS
2980 #: build/C/man7/cpuset.7:581
2981 #, no-wrap
2982 msgid "Memory spread"
2983 msgstr ""
2984
2985 #. type: Plain text
2986 #: build/C/man7/cpuset.7:589
2987 msgid "There are two Boolean flag files per cpuset that control where the kernel allocates pages for the filesystem buffers and related in-kernel data structures.  They are called I<cpuset.memory_spread_page> and I<cpuset.memory_spread_slab>."
2988 msgstr ""
2989
2990 #. type: Plain text
2991 #: build/C/man7/cpuset.7:596
2992 msgid "If the per-cpuset Boolean flag file I<cpuset.memory_spread_page> is set, then the kernel will spread the filesystem buffers (page cache) evenly over all the nodes that the faulting process is allowed to use, instead of preferring to put those pages on the node where the process is running."
2993 msgstr ""
2994
2995 #. type: Plain text
2996 #: build/C/man7/cpuset.7:604
2997 msgid "If the per-cpuset Boolean flag file I<cpuset.memory_spread_slab> is set, then the kernel will spread some filesystem-related slab caches, such as those for inodes and directory entries, evenly over all the nodes that the faulting process is allowed to use, instead of preferring to put those pages on the node where the process is running."
2998 msgstr ""
2999
3000 #. type: Plain text
3001 #: build/C/man7/cpuset.7:609
3002 msgid "The setting of these flags does not affect the data segment (see B<brk>(2))  or stack segment pages of a process."
3003 msgstr ""
3004
3005 #. type: Plain text
3006 #: build/C/man7/cpuset.7:617
3007 msgid "By default, both kinds of memory spreading are off and the kernel prefers to allocate memory pages on the node local to where the requesting process is running.  If that node is not allowed by the process's NUMA memory policy or cpuset configuration or if there are insufficient free memory pages on that node, then the kernel looks for the nearest node that is allowed and has sufficient free memory."
3008 msgstr ""
3009
3010 #. type: Plain text
3011 #: build/C/man7/cpuset.7:620
3012 msgid "When new cpusets are created, they inherit the memory spread settings of their parent."
3013 msgstr ""
3014
3015 #. type: Plain text
3016 #: build/C/man7/cpuset.7:635
3017 msgid "Setting memory spreading causes allocations for the affected page or slab caches to ignore the process's NUMA memory policy and be spread instead.  However, the effect of these changes in memory placement caused by cpuset-specified memory spreading is hidden from the B<mbind>(2)  or B<set_mempolicy>(2)  calls.  These two NUMA memory policy calls always appear to behave as if no cpuset-specified memory spreading is in effect, even if it is.  If cpuset memory spreading is subsequently turned off, the NUMA memory policy most recently specified by these calls is automatically reapplied."
3018 msgstr ""
3019
3020 #. type: Plain text
3021 #: build/C/man7/cpuset.7:644
3022 msgid "Both I<cpuset.memory_spread_page> and I<cpuset.memory_spread_slab> are Boolean flag files.  By default they contain \"0\", meaning that the feature is off for that cpuset.  If a \"1\" is written to that file, that turns the named feature on."
3023 msgstr ""
3024
3025 #. type: Plain text
3026 #: build/C/man7/cpuset.7:647
3027 msgid "Cpuset-specified memory spreading behaves similarly to what is known (in other contexts) as round-robin or interleave memory placement."
3028 msgstr ""
3029
3030 #. type: Plain text
3031 #: build/C/man7/cpuset.7:650
3032 msgid "Cpuset-specified memory spreading can provide substantial performance improvements for jobs that:"
3033 msgstr ""
3034
3035 #. type: IP
3036 #: build/C/man7/cpuset.7:650 build/C/man7/user_namespaces.7:384
3037 #, no-wrap
3038 msgid "a)"
3039 msgstr "a)"
3040
3041 #. type: Plain text
3042 #: build/C/man7/cpuset.7:654
3043 msgid "need to place thread-local data on memory nodes close to the CPUs which are running the threads that most frequently access that data; but also"
3044 msgstr ""
3045
3046 #. type: IP
3047 #: build/C/man7/cpuset.7:654 build/C/man7/user_namespaces.7:389
3048 #, no-wrap
3049 msgid "b)"
3050 msgstr "b)"
3051
3052 #. type: Plain text
3053 #: build/C/man7/cpuset.7:657
3054 msgid "need to access large filesystem data sets that must to be spread across the several nodes in the job's cpuset in order to fit."
3055 msgstr ""
3056
3057 #.  ================== Memory Migration ==================
3058 #. type: Plain text
3059 #: build/C/man7/cpuset.7:664
3060 msgid "Without this policy, the memory allocation across the nodes in the job's cpuset can become very uneven, especially for jobs that might have just a single thread initializing or reading in the data set."
3061 msgstr ""
3062
3063 #. type: SS
3064 #: build/C/man7/cpuset.7:664
3065 #, no-wrap
3066 msgid "Memory migration"
3067 msgstr ""
3068
3069 #. type: Plain text
3070 #: build/C/man7/cpuset.7:673
3071 msgid "Normally, under the default setting (disabled) of I<cpuset.memory_migrate>, once a page is allocated (given a physical page of main memory), then that page stays on whatever node it was allocated, so long as it remains allocated, even if the cpuset's memory-placement policy I<mems> subsequently changes."
3072 msgstr ""
3073
3074 #. type: Plain text
3075 #: build/C/man7/cpuset.7:679
3076 msgid "When memory migration is enabled in a cpuset, if the I<mems> setting of the cpuset is changed, then any memory page in use by any process in the cpuset that is on a memory node that is no longer allowed will be migrated to a memory node that is allowed."
3077 msgstr ""
3078
3079 #. type: Plain text
3080 #: build/C/man7/cpuset.7:685
3081 msgid "Furthermore, if a process is moved into a cpuset with I<memory_migrate> enabled, any memory pages it uses that were on memory nodes allowed in its previous cpuset, but which are not allowed in its new cpuset, will be migrated to a memory node allowed in the new cpuset."
3082 msgstr ""
3083
3084 #.  ================== Scheduler Load Balancing ==================
3085 #. type: Plain text
3086 #: build/C/man7/cpuset.7:693
3087 msgid "The relative placement of a migrated page within the cpuset is preserved during these migration operations if possible.  For example, if the page was on the second valid node of the prior cpuset, then the page will be placed on the second valid node of the new cpuset, if possible."
3088 msgstr ""
3089
3090 #. type: SS
3091 #: build/C/man7/cpuset.7:693
3092 #, no-wrap
3093 msgid "Scheduler load balancing"
3094 msgstr ""
3095
3096 #. type: Plain text
3097 #: build/C/man7/cpuset.7:700
3098 msgid "The kernel scheduler automatically load balances processes.  If one CPU is underutilized, the kernel will look for processes on other more overloaded CPUs and move those processes to the underutilized CPU, within the constraints of such placement mechanisms as cpusets and B<sched_setaffinity>(2)."
3099 msgstr ""
3100
3101 #. type: Plain text
3102 #: build/C/man7/cpuset.7:713
3103 msgid "The algorithmic cost of load balancing and its impact on key shared kernel data structures such as the process list increases more than linearly with the number of CPUs being balanced.  For example, it costs more to load balance across one large set of CPUs than it does to balance across two smaller sets of CPUs, each of half the size of the larger set.  (The precise relationship between the number of CPUs being balanced and the cost of load balancing depends on implementation details of the kernel process scheduler, which is subject to change over time, as improved kernel scheduler algorithms are implemented.)"
3104 msgstr ""
3105
3106 #. type: Plain text
3107 #: build/C/man7/cpuset.7:719
3108 msgid "The per-cpuset flag I<sched_load_balance> provides a mechanism to suppress this automatic scheduler load balancing in cases where it is not needed and suppressing it would have worthwhile performance benefits."
3109 msgstr ""
3110
3111 #. type: Plain text
3112 #: build/C/man7/cpuset.7:723
3113 msgid "By default, load balancing is done across all CPUs, except those marked isolated using the kernel boot time \"isolcpus=\" argument.  (See B<Scheduler Relax Domain Level>, below, to change this default.)"
3114 msgstr ""
3115
3116 #. type: Plain text
3117 #: build/C/man7/cpuset.7:726
3118 msgid "This default load balancing across all CPUs is not well suited to the following two situations:"
3119 msgstr ""
3120
3121 #. type: Plain text
3122 #: build/C/man7/cpuset.7:730
3123 msgid "On large systems, load balancing across many CPUs is expensive.  If the system is managed using cpusets to place independent jobs on separate sets of CPUs, full load balancing is unnecessary."
3124 msgstr ""
3125
3126 #. type: Plain text
3127 #: build/C/man7/cpuset.7:734
3128 msgid "Systems supporting real-time on some CPUs need to minimize system overhead on those CPUs, including avoiding process load balancing if that is not needed."
3129 msgstr ""
3130
3131 #. type: Plain text
3132 #: build/C/man7/cpuset.7:744
3133 msgid "When the per-cpuset flag I<sched_load_balance> is enabled (the default setting), it requests load balancing across all the CPUs in that cpuset's allowed CPUs, ensuring that load balancing can move a process (not otherwise pinned, as by B<sched_setaffinity>(2))  from any CPU in that cpuset to any other."
3134 msgstr ""
3135
3136 #. type: Plain text
3137 #: build/C/man7/cpuset.7:753
3138 msgid "When the per-cpuset flag I<sched_load_balance> is disabled, then the scheduler will avoid load balancing across the CPUs in that cpuset, I<except> in so far as is necessary because some overlapping cpuset has I<sched_load_balance> enabled."
3139 msgstr ""
3140
3141 #. type: Plain text
3142 #: build/C/man7/cpuset.7:761
3143 msgid "So, for example, if the top cpuset has the flag I<sched_load_balance> enabled, then the scheduler will load balance across all CPUs, and the setting of the I<sched_load_balance> flag in other cpusets has no effect, as we're already fully load balancing."
3144 msgstr ""
3145
3146 #. type: Plain text
3147 #: build/C/man7/cpuset.7:766
3148 msgid "Therefore in the above two situations, the flag I<sched_load_balance> should be disabled in the top cpuset, and only some of the smaller, child cpusets would have this flag enabled."
3149 msgstr ""
3150
3151 #. type: Plain text
3152 #: build/C/man7/cpuset.7:774
3153 msgid "When doing this, you don't usually want to leave any unpinned processes in the top cpuset that might use nontrivial amounts of CPU, as such processes may be artificially constrained to some subset of CPUs, depending on the particulars of this flag setting in descendant cpusets.  Even if such a process could use spare CPU cycles in some other CPUs, the kernel scheduler might not consider the possibility of load balancing that process to the underused CPU."
3154 msgstr ""
3155
3156 #.  ================== Scheduler Relax Domain Level ==================
3157 #. type: Plain text
3158 #: build/C/man7/cpuset.7:780
3159 msgid "Of course, processes pinned to a particular CPU can be left in a cpuset that disables I<sched_load_balance> as those processes aren't going anywhere else anyway."
3160 msgstr ""
3161
3162 #. type: SS
3163 #: build/C/man7/cpuset.7:780
3164 #, no-wrap
3165 msgid "Scheduler relax domain level"
3166 msgstr ""
3167
3168 #. type: Plain text
3169 #: build/C/man7/cpuset.7:801
3170 msgid "The kernel scheduler performs immediate load balancing whenever a CPU becomes free or another task becomes runnable.  This load balancing works to ensure that as many CPUs as possible are usefully employed running tasks.  The kernel also performs periodic load balancing off the software clock described in B<time>(7).  The setting of I<sched_relax_domain_level> applies only to immediate load balancing.  Regardless of the I<sched_relax_domain_level> setting, periodic load balancing is attempted over all CPUs (unless disabled by turning off I<sched_load_balance>.)  In any case, of course, tasks will be scheduled to run only on CPUs allowed by their cpuset, as modified by B<sched_setaffinity>(2)  system calls."
3171 msgstr ""
3172
3173 #. type: Plain text
3174 #: build/C/man7/cpuset.7:809
3175 msgid "On small systems, such as those with just a few CPUs, immediate load balancing is useful to improve system interactivity and to minimize wasteful idle CPU cycles.  But on large systems, attempting immediate load balancing across a large number of CPUs can be more costly than it is worth, depending on the particular performance characteristics of the job mix and the hardware."
3176 msgstr ""
3177
3178 #. type: Plain text
3179 #: build/C/man7/cpuset.7:817
3180 msgid "The exact meaning of the small integer values of I<sched_relax_domain_level> will depend on internal implementation details of the kernel scheduler code and on the non-uniform architecture of the hardware.  Both of these will evolve over time and vary by system architecture and kernel version."
3181 msgstr ""
3182
3183 #. type: Plain text
3184 #: build/C/man7/cpuset.7:822
3185 msgid "As of this writing, when this capability was introduced in Linux 2.6.26, on certain popular architectures, the positive values of I<sched_relax_domain_level> have the following meanings."
3186 msgstr ""
3187
3188 #. type: IP
3189 #: build/C/man7/cpuset.7:824
3190 #, no-wrap
3191 msgid "B<(1)>"
3192 msgstr "B<(1)>"
3193
3194 #. type: Plain text
3195 #: build/C/man7/cpuset.7:827
3196 msgid "Perform immediate load balancing across Hyper-Thread siblings on the same core."
3197 msgstr ""
3198
3199 #. type: IP
3200 #: build/C/man7/cpuset.7:827
3201 #, no-wrap
3202 msgid "B<(2)>"
3203 msgstr "B<(2)>"
3204
3205 #. type: Plain text
3206 #: build/C/man7/cpuset.7:829
3207 msgid "Perform immediate load balancing across other cores in the same package."
3208 msgstr ""
3209
3210 #. type: IP
3211 #: build/C/man7/cpuset.7:829
3212 #, no-wrap
3213 msgid "B<(3)>"
3214 msgstr "B<(3)>"
3215
3216 #. type: Plain text
3217 #: build/C/man7/cpuset.7:832
3218 msgid "Perform immediate load balancing across other CPUs on the same node or blade."
3219 msgstr ""
3220
3221 #. type: IP
3222 #: build/C/man7/cpuset.7:832
3223 #, no-wrap
3224 msgid "B<(4)>"
3225 msgstr "B<(4)>"
3226
3227 #. type: Plain text
3228 #: build/C/man7/cpuset.7:835
3229 msgid "Perform immediate load balancing across over several (implementation detail) nodes [On NUMA systems]."
3230 msgstr ""
3231
3232 #. type: IP
3233 #: build/C/man7/cpuset.7:835
3234 #, no-wrap
3235 msgid "B<(5)>"
3236 msgstr "B<(5)>"
3237
3238 #. type: Plain text
3239 #: build/C/man7/cpuset.7:838
3240 msgid "Perform immediate load balancing across over all CPUs in system [On NUMA systems]."
3241 msgstr ""
3242
3243 #. type: Plain text
3244 #: build/C/man7/cpuset.7:847
3245 msgid "The I<sched_relax_domain_level> value of zero (0) always means don't perform immediate load balancing, hence that load balancing is done only periodically, not immediately when a CPU becomes available or another task becomes runnable."
3246 msgstr ""
3247
3248 #. type: Plain text
3249 #: build/C/man7/cpuset.7:855
3250 msgid "The I<sched_relax_domain_level> value of minus one (-1)  always means use the system default value.  The system default value can vary by architecture and kernel version.  This system default value can be changed by kernel boot-time \"relax_domain_level=\" argument."
3251 msgstr ""
3252
3253 #. type: Plain text
3254 #: build/C/man7/cpuset.7:863
3255 msgid "In the case of multiple overlapping cpusets which have conflicting I<sched_relax_domain_level> values, then the highest such value applies to all CPUs in any of the overlapping cpusets.  In such cases, the value B<minus one (-1)> is the lowest value, overridden by any other value, and the value B<zero (0)> is the next lowest value."
3256 msgstr ""
3257
3258 #. type: SH
3259 #: build/C/man7/cpuset.7:863
3260 #, no-wrap
3261 msgid "FORMATS"
3262 msgstr ""
3263
3264 #.  ================== Mask Format ==================
3265 #. type: Plain text
3266 #: build/C/man7/cpuset.7:867
3267 msgid "The following formats are used to represent sets of CPUs and memory nodes."
3268 msgstr ""
3269
3270 #. type: SS
3271 #: build/C/man7/cpuset.7:867
3272 #, no-wrap
3273 msgid "Mask format"
3274 msgstr ""
3275
3276 #. type: Plain text
3277 #: build/C/man7/cpuset.7:872
3278 msgid "The B<Mask Format> is used to represent CPU and memory-node bit masks in the I</proc/E<lt>pidE<gt>/status> file."
3279 msgstr ""
3280
3281 #. type: Plain text
3282 #: build/C/man7/cpuset.7:880
3283 msgid "This format displays each 32-bit word in hexadecimal (using ASCII characters \"0\" - \"9\" and \"a\" - \"f\"); words are filled with leading zeros, if required.  For masks longer than one word, a comma separator is used between words.  Words are displayed in big-endian order, which has the most significant bit first.  The hex digits within a word are also in big-endian order."
3284 msgstr ""
3285
3286 #. type: Plain text
3287 #: build/C/man7/cpuset.7:883
3288 msgid "The number of 32-bit words displayed is the minimum number needed to display all bits of the bit mask, based on the size of the bit mask."
3289 msgstr ""
3290
3291 #. type: Plain text
3292 #: build/C/man7/cpuset.7:885
3293 msgid "Examples of the B<Mask Format>:"
3294 msgstr ""
3295
3296 #. type: Plain text
3297 #: build/C/man7/cpuset.7:893
3298 #, no-wrap
3299 msgid ""
3300 "00000001                        # just bit 0 set\n"
3301 "40000000,00000000,00000000      # just bit 94 set\n"
3302 "00000001,00000000,00000000      # just bit 64 set\n"
3303 "000000ff,00000000               # bits 32-39 set\n"
3304 "00000000,000e3862               # 1,5,6,11-13,17-19 set\n"
3305 msgstr ""
3306 "00000001                        # just bit 0 set\n"
3307 "40000000,00000000,00000000      # just bit 94 set\n"
3308 "00000001,00000000,00000000      # just bit 64 set\n"
3309 "000000ff,00000000               # bits 32-39 set\n"
3310 "00000000,000e3862               # 1,5,6,11-13,17-19 set\n"
3311
3312 #. type: Plain text
3313 #: build/C/man7/cpuset.7:897
3314 msgid "A mask with bits 0, 1, 2, 4, 8, 16, 32, and 64 set displays as:"
3315 msgstr ""
3316
3317 #. type: Plain text
3318 #: build/C/man7/cpuset.7:901
3319 #, no-wrap
3320 msgid "00000001,00000001,00010117\n"
3321 msgstr "00000001,00000001,00010117\n"
3322
3323 #.  ================== List Format ==================
3324 #. type: Plain text
3325 #: build/C/man7/cpuset.7:908
3326 msgid "The first \"1\" is for bit 64, the second for bit 32, the third for bit 16, the fourth for bit 8, the fifth for bit 4, and the \"7\" is for bits 2, 1, and 0."
3327 msgstr ""
3328
3329 #. type: SS
3330 #: build/C/man7/cpuset.7:908
3331 #, no-wrap
3332 msgid "List format"
3333 msgstr ""
3334
3335 #. type: Plain text
3336 #: build/C/man7/cpuset.7:915
3337 msgid "The B<List Format> for I<cpus> and I<mems> is a comma-separated list of CPU or memory-node numbers and ranges of numbers, in ASCII decimal."
3338 msgstr ""
3339
3340 #. type: Plain text
3341 #: build/C/man7/cpuset.7:917
3342 msgid "Examples of the B<List Format>:"
3343 msgstr ""
3344
3345 #. type: Plain text
3346 #: build/C/man7/cpuset.7:922
3347 #, no-wrap
3348 msgid ""
3349 "0-4,9           # bits 0, 1, 2, 3, 4, and 9 set\n"
3350 "0-2,7,12-14     # bits 0, 1, 2, 7, 12, 13, and 14 set\n"
3351 msgstr ""
3352 "0-4,9           # bits 0, 1, 2, 3, 4, and 9 set\n"
3353 "0-2,7,12-14     # bits 0, 1, 2, 7, 12, 13, and 14 set\n"
3354
3355 #.  ================== RULES ==================
3356 #. type: SH
3357 #: build/C/man7/cpuset.7:925
3358 #, no-wrap
3359 msgid "RULES"
3360 msgstr ""
3361
3362 #. type: Plain text
3363 #: build/C/man7/cpuset.7:927
3364 msgid "The following rules apply to each cpuset:"
3365 msgstr ""
3366
3367 #. type: Plain text
3368 #: build/C/man7/cpuset.7:930
3369 msgid "Its CPUs and memory nodes must be a (possibly equal)  subset of its parent's."
3370 msgstr ""
3371
3372 #. type: Plain text
3373 #: build/C/man7/cpuset.7:934
3374 msgid "It can be marked I<cpu_exclusive> only if its parent is."
3375 msgstr ""
3376
3377 #. type: Plain text
3378 #: build/C/man7/cpuset.7:938
3379 msgid "It can be marked I<mem_exclusive> only if its parent is."
3380 msgstr ""
3381
3382 #. type: Plain text
3383 #: build/C/man7/cpuset.7:942
3384 msgid "If it is I<cpu_exclusive>, its CPUs may not overlap any sibling."
3385 msgstr ""
3386
3387 #.  ================== PERMISSIONS ==================
3388 #. type: Plain text
3389 #: build/C/man7/cpuset.7:947
3390 msgid "If it is I<memory_exclusive>, its memory nodes may not overlap any sibling."
3391 msgstr ""
3392
3393 #. type: SH
3394 #: build/C/man7/cpuset.7:947
3395 #, no-wrap
3396 msgid "PERMISSIONS"
3397 msgstr ""
3398
3399 #. type: Plain text
3400 #: build/C/man7/cpuset.7:952
3401 msgid "The permissions of a cpuset are determined by the permissions of the directories and pseudo-files in the cpuset filesystem, normally mounted at I</dev/cpuset>."
3402 msgstr ""
3403
3404 #. type: Plain text
3405 #: build/C/man7/cpuset.7:961
3406 msgid "For instance, a process can put itself in some other cpuset (than its current one) if it can write the I<tasks> file for that cpuset.  This requires execute permission on the encompassing directories and write permission on the I<tasks> file."
3407 msgstr ""
3408
3409 #. type: Plain text
3410 #: build/C/man7/cpuset.7:968
3411 msgid "An additional constraint is applied to requests to place some other process in a cpuset.  One process may not attach another to a cpuset unless it would have permission to send that process a signal (see B<kill>(2))."
3412 msgstr ""
3413
3414 #. type: Plain text
3415 #: build/C/man7/cpuset.7:979
3416 msgid "A process may create a child cpuset if it can access and write the parent cpuset directory.  It can modify the CPUs or memory nodes in a cpuset if it can access that cpuset's directory (execute permissions on the each of the parent directories) and write the corresponding I<cpus> or I<mems> file."
3417 msgstr ""
3418
3419 #. type: Plain text
3420 #: build/C/man7/cpuset.7:1000
3421 msgid "There is one minor difference between the manner in which these permissions are evaluated and the manner in which normal filesystem operation permissions are evaluated.  The kernel interprets relative pathnames starting at a process's current working directory.  Even if one is operating on a cpuset file, relative pathnames are interpreted relative to the process's current working directory, not relative to the process's current cpuset.  The only ways that cpuset paths relative to a process's current cpuset can be used are if either the process's current working directory is its cpuset (it first did a B<cd> or B<chdir>(2)  to its cpuset directory beneath I</dev/cpuset>, which is a bit unusual)  or if some user code converts the relative cpuset path to a full filesystem path."
3422 msgstr ""
3423
3424 #.  ================== WARNINGS ==================
3425 #. type: Plain text
3426 #: build/C/man7/cpuset.7:1015
3427 msgid "In theory, this means that user code should specify cpusets using absolute pathnames, which requires knowing the mount point of the cpuset filesystem (usually, but not necessarily, I</dev/cpuset>).  In practice, all user level code that this author is aware of simply assumes that if the cpuset filesystem is mounted, then it is mounted at I</dev/cpuset>.  Furthermore, it is common practice for carefully written user code to verify the presence of the pseudo-file I</dev/cpuset/tasks> in order to verify that the cpuset pseudo-filesystem is currently mounted."
3428 msgstr ""
3429
3430 #. type: SH
3431 #: build/C/man7/cpuset.7:1015
3432 #, no-wrap
3433 msgid "WARNINGS"
3434 msgstr ""
3435
3436 #. type: SS
3437 #: build/C/man7/cpuset.7:1016
3438 #, no-wrap
3439 msgid "Enabling memory_pressure"
3440 msgstr ""
3441
3442 #. type: Plain text
3443 #: build/C/man7/cpuset.7:1025
3444 msgid "By default, the per-cpuset file I<cpuset.memory_pressure> always contains zero (0).  Unless this feature is enabled by writing \"1\" to the pseudo-file I</dev/cpuset/cpuset.memory_pressure_enabled>, the kernel does not compute per-cpuset I<memory_pressure>."
3445 msgstr ""
3446
3447 #. type: SS
3448 #: build/C/man7/cpuset.7:1025
3449 #, no-wrap
3450 msgid "Using the echo command"
3451 msgstr ""
3452
3453 #.  Gack!  csh(1)'s echo does this
3454 #. type: Plain text
3455 #: build/C/man7/cpuset.7:1036
3456 msgid "When using the B<echo> command at the shell prompt to change the values of cpuset files, beware that the built-in B<echo> command in some shells does not display an error message if the B<write>(2)  system call fails.  For example, if the command:"
3457 msgstr ""
3458
3459 #. type: Plain text
3460 #: build/C/man7/cpuset.7:1040
3461 #, no-wrap
3462 msgid "echo 19 E<gt> cpuset.mems\n"
3463 msgstr "echo 19 E<gt> cpuset.mems\n"
3464
3465 #. type: Plain text
3466 #: build/C/man7/cpuset.7:1053
3467 msgid "failed because memory node 19 was not allowed (perhaps the current system does not have a memory node 19), then the B<echo> command might not display any error.  It is better to use the B</bin/echo> external command to change cpuset file settings, as this command will display B<write>(2)  errors, as in the example:"
3468 msgstr ""
3469
3470 #. type: Plain text
3471 #: build/C/man7/cpuset.7:1058
3472 #, no-wrap
3473 msgid ""
3474 "/bin/echo 19 E<gt> cpuset.mems\n"
3475 "/bin/echo: write error: Invalid argument\n"
3476 msgstr ""
3477 "/bin/echo 19 E<gt> cpuset.mems\n"
3478 "/bin/echo: write error: Invalid argument\n"
3479
3480 #.  ================== EXCEPTIONS ==================
3481 #. type: SH
3482 #: build/C/man7/cpuset.7:1061
3483 #, no-wrap
3484 msgid "EXCEPTIONS"
3485 msgstr ""
3486
3487 #. type: SS
3488 #: build/C/man7/cpuset.7:1062
3489 #, no-wrap
3490 msgid "Memory placement"
3491 msgstr ""
3492
3493 #. type: Plain text
3494 #: build/C/man7/cpuset.7:1065
3495 msgid "Not all allocations of system memory are constrained by cpusets, for the following reasons."
3496 msgstr ""
3497
3498 #. type: Plain text
3499 #: build/C/man7/cpuset.7:1080
3500 msgid "If hot-plug functionality is used to remove all the CPUs that are currently assigned to a cpuset, then the kernel will automatically update the I<cpus_allowed> of all processes attached to CPUs in that cpuset to allow all CPUs.  When memory hot-plug functionality for removing memory nodes is available, a similar exception is expected to apply there as well.  In general, the kernel prefers to violate cpuset placement, rather than starving a process that has had all its allowed CPUs or memory nodes taken offline.  User code should reconfigure cpusets to refer only to online CPUs and memory nodes when using hot-plug to add or remove such resources."
3501 msgstr ""
3502
3503 #. type: Plain text
3504 #: build/C/man7/cpuset.7:1088
3505 msgid "A few kernel-critical, internal memory-allocation requests, marked GFP_ATOMIC, must be satisfied immediately.  The kernel may drop some request or malfunction if one of these allocations fail.  If such a request cannot be satisfied within the current process's cpuset, then we relax the cpuset, and look for memory anywhere we can find it.  It's better to violate the cpuset than stress the kernel."
3506 msgstr ""
3507
3508 #. type: Plain text
3509 #: build/C/man7/cpuset.7:1092
3510 msgid "Allocations of memory requested by kernel drivers while processing an interrupt lack any relevant process context, and are not confined by cpusets."
3511 msgstr ""
3512
3513 #. type: SS
3514 #: build/C/man7/cpuset.7:1092
3515 #, no-wrap
3516 msgid "Renaming cpusets"
3517 msgstr ""
3518
3519 #.  ================== ERRORS ==================
3520 #. type: Plain text
3521 #: build/C/man7/cpuset.7:1100
3522 msgid "You can use the B<rename>(2)  system call to rename cpusets.  Only simple renaming is supported; that is, changing the name of a cpuset directory is permitted, but moving a directory into a different directory is not permitted."
3523 msgstr ""
3524
3525 #. type: Plain text
3526 #: build/C/man7/cpuset.7:1104
3527 msgid "The Linux kernel implementation of cpusets sets I<errno> to specify the reason for a failed system call affecting cpusets."
3528 msgstr ""
3529
3530 #. type: Plain text
3531 #: build/C/man7/cpuset.7:1109
3532 msgid "The possible I<errno> settings and their meaning when set on a failed cpuset call are as listed below."
3533 msgstr ""
3534
3535 #. type: TP
3536 #: build/C/man7/cpuset.7:1109
3537 #, no-wrap
3538 msgid "B<E2BIG>"
3539 msgstr "B<E2BIG>"
3540
3541 #. type: Plain text
3542 #: build/C/man7/cpuset.7:1116
3543 msgid "Attempted a B<write>(2)  on a special cpuset file with a length larger than some kernel-determined upper limit on the length of such writes."
3544 msgstr ""
3545
3546 #. type: Plain text
3547 #: build/C/man7/cpuset.7:1123
3548 msgid "Attempted to B<write>(2)  the process ID (PID) of a process to a cpuset I<tasks> file when one lacks permission to move that process."
3549 msgstr ""
3550
3551 #. type: Plain text
3552 #: build/C/man7/cpuset.7:1129
3553 msgid "Attempted to add, using B<write>(2), a CPU or memory node to a cpuset, when that CPU or memory node was not already in its parent."
3554 msgstr ""
3555
3556 #. type: Plain text
3557 #: build/C/man7/cpuset.7:1137
3558 msgid "Attempted to set, using B<write>(2), I<cpuset.cpu_exclusive> or I<cpuset.mem_exclusive> on a cpuset whose parent lacks the same setting."
3559 msgstr ""
3560
3561 #. type: Plain text
3562 #: build/C/man7/cpuset.7:1144
3563 msgid "Attempted to B<write>(2)  a I<cpuset.memory_pressure> file."
3564 msgstr ""
3565
3566 #. type: Plain text
3567 #: build/C/man7/cpuset.7:1147
3568 msgid "Attempted to create a file in a cpuset directory."
3569 msgstr ""
3570
3571 #. type: TP
3572 #: build/C/man7/cpuset.7:1147 build/C/man7/cpuset.7:1152
3573 #: build/C/man7/cpuset.7:1157
3574 #, no-wrap
3575 msgid "B<EBUSY>"
3576 msgstr "B<EBUSY>"
3577
3578 #. type: Plain text
3579 #: build/C/man7/cpuset.7:1152
3580 msgid "Attempted to remove, using B<rmdir>(2), a cpuset with attached processes."
3581 msgstr ""
3582
3583 #. type: Plain text
3584 #: build/C/man7/cpuset.7:1157
3585 msgid "Attempted to remove, using B<rmdir>(2), a cpuset with child cpusets."
3586 msgstr ""
3587
3588 #. type: Plain text
3589 #: build/C/man7/cpuset.7:1162
3590 msgid "Attempted to remove a CPU or memory node from a cpuset that is also in a child of that cpuset."
3591 msgstr ""
3592
3593 #. type: TP
3594 #: build/C/man7/cpuset.7:1162 build/C/man7/cpuset.7:1167
3595 #, no-wrap
3596 msgid "B<EEXIST>"
3597 msgstr "B<EEXIST>"
3598
3599 #. type: Plain text
3600 #: build/C/man7/cpuset.7:1167
3601 msgid "Attempted to create, using B<mkdir>(2), a cpuset that already exists."
3602 msgstr ""
3603
3604 #. type: Plain text
3605 #: build/C/man7/cpuset.7:1172
3606 msgid "Attempted to B<rename>(2)  a cpuset to a name that already exists."
3607 msgstr ""
3608
3609 #. type: Plain text
3610 #: build/C/man7/cpuset.7:1180
3611 msgid "Attempted to B<read>(2)  or B<write>(2)  a cpuset file using a buffer that is outside the writing processes accessible address space."
3612 msgstr ""
3613
3614 #. type: Plain text
3615 #: build/C/man7/cpuset.7:1189
3616 msgid "Attempted to change a cpuset, using B<write>(2), in a way that would violate a I<cpu_exclusive> or I<mem_exclusive> attribute of that cpuset or any of its siblings."
3617 msgstr ""
3618
3619 #. type: Plain text
3620 #: build/C/man7/cpuset.7:1198
3621 msgid "Attempted to B<write>(2)  an empty I<cpuset.cpus> or I<cpuset.mems> list to a cpuset which has attached processes or child cpusets."
3622 msgstr ""
3623
3624 #. type: Plain text
3625 #: build/C/man7/cpuset.7:1208
3626 msgid "Attempted to B<write>(2)  a I<cpuset.cpus> or I<cpuset.mems> list which included a range with the second number smaller than the first number."
3627 msgstr ""
3628
3629 #. type: Plain text
3630 #: build/C/man7/cpuset.7:1217
3631 msgid "Attempted to B<write>(2)  a I<cpuset.cpus> or I<cpuset.mems> list which included an invalid character in the string."
3632 msgstr ""
3633
3634 #. type: Plain text
3635 #: build/C/man7/cpuset.7:1224
3636 msgid "Attempted to B<write>(2)  a list to a I<cpuset.cpus> file that did not include any online CPUs."
3637 msgstr ""
3638
3639 #. type: Plain text
3640 #: build/C/man7/cpuset.7:1231
3641 msgid "Attempted to B<write>(2)  a list to a I<cpuset.mems> file that did not include any online memory nodes."
3642 msgstr ""
3643
3644 #. type: Plain text
3645 #: build/C/man7/cpuset.7:1238
3646 msgid "Attempted to B<write>(2)  a list to a I<cpuset.mems> file that included a node that held no memory."
3647 msgstr ""
3648
3649 #. type: Plain text
3650 #: build/C/man7/cpuset.7:1246
3651 msgid "Attempted to B<write>(2)  a string to a cpuset I<tasks> file that does not begin with an ASCII decimal integer."
3652 msgstr ""
3653
3654 #. type: Plain text
3655 #: build/C/man7/cpuset.7:1251
3656 msgid "Attempted to B<rename>(2)  a cpuset into a different directory."
3657 msgstr ""
3658
3659 #. type: Plain text
3660 #: build/C/man7/cpuset.7:1258
3661 msgid "Attempted to B<read>(2)  a I</proc/E<lt>pidE<gt>/cpuset> file for a cpuset path that is longer than the kernel page size."
3662 msgstr ""
3663
3664 #. type: Plain text
3665 #: build/C/man7/cpuset.7:1263
3666 msgid "Attempted to create, using B<mkdir>(2), a cpuset whose base directory name is longer than 255 characters."
3667 msgstr ""
3668
3669 #. type: Plain text
3670 #: build/C/man7/cpuset.7:1270
3671 msgid "Attempted to create, using B<mkdir>(2), a cpuset whose full pathname, including the mount point (typically \"/dev/cpuset/\") prefix, is longer than 4095 characters."
3672 msgstr ""
3673
3674 #. type: TP
3675 #: build/C/man7/cpuset.7:1270
3676 #, no-wrap
3677 msgid "B<ENODEV>"
3678 msgstr "B<ENODEV>"
3679
3680 #. type: Plain text
3681 #: build/C/man7/cpuset.7:1275
3682 msgid "The cpuset was removed by another process at the same time as a B<write>(2)  was attempted on one of the pseudo-files in the cpuset directory."
3683 msgstr ""
3684
3685 #. type: Plain text
3686 #: build/C/man7/cpuset.7:1280
3687 msgid "Attempted to create, using B<mkdir>(2), a cpuset in a parent cpuset that doesn't exist."
3688 msgstr ""
3689
3690 #. type: Plain text
3691 #: build/C/man7/cpuset.7:1287
3692 msgid "Attempted to B<access>(2)  or B<open>(2)  a nonexistent file in a cpuset directory."
3693 msgstr ""
3694
3695 #. type: Plain text
3696 #: build/C/man7/cpuset.7:1292
3697 msgid "Insufficient memory is available within the kernel; can occur on a variety of system calls affecting cpusets, but only if the system is extremely short of memory."
3698 msgstr ""
3699
3700 #. type: TP
3701 #: build/C/man7/cpuset.7:1292 build/C/man7/cpuset.7:1304
3702 #, no-wrap
3703 msgid "B<ENOSPC>"
3704 msgstr "B<ENOSPC>"
3705
3706 #. type: Plain text
3707 #: build/C/man7/cpuset.7:1304
3708 msgid "Attempted to B<write>(2)  the process ID (PID)  of a process to a cpuset I<tasks> file when the cpuset had an empty I<cpuset.cpus> or empty I<cpuset.mems> setting."
3709 msgstr ""
3710
3711 #. type: Plain text
3712 #: build/C/man7/cpuset.7:1314
3713 msgid "Attempted to B<write>(2)  an empty I<cpuset.cpus> or I<cpuset.mems> setting to a cpuset that has tasks attached."
3714 msgstr ""
3715
3716 #. type: Plain text
3717 #: build/C/man7/cpuset.7:1319
3718 msgid "Attempted to B<rename>(2)  a nonexistent cpuset."
3719 msgstr ""
3720
3721 #. type: Plain text
3722 #: build/C/man7/cpuset.7:1322
3723 msgid "Attempted to remove a file from a cpuset directory."
3724 msgstr ""
3725
3726 #. type: TP
3727 #: build/C/man7/cpuset.7:1322
3728 #, no-wrap
3729 msgid "B<ERANGE>"
3730 msgstr "B<ERANGE>"
3731
3732 #. type: Plain text
3733 #: build/C/man7/cpuset.7:1330
3734 msgid "Specified a I<cpuset.cpus> or I<cpuset.mems> list to the kernel which included a number too large for the kernel to set in its bit masks."
3735 msgstr ""
3736
3737 #.  ================== VERSIONS ==================
3738 #. type: Plain text
3739 #: build/C/man7/cpuset.7:1338
3740 msgid "Attempted to B<write>(2)  the process ID (PID) of a nonexistent process to a cpuset I<tasks> file."
3741 msgstr ""
3742
3743 #.  ================== NOTES ==================
3744 #. type: Plain text
3745 #: build/C/man7/cpuset.7:1341
3746 msgid "Cpusets appeared in version 2.6.12 of the Linux kernel."
3747 msgstr ""
3748
3749 #.  ================== BUGS ==================
3750 #. type: Plain text
3751 #: build/C/man7/cpuset.7:1352
3752 msgid "Despite its name, the I<pid> parameter is actually a thread ID, and each thread in a threaded group can be attached to a different cpuset.  The value returned from a call to B<gettid>(2)  can be passed in the argument I<pid>."
3753 msgstr ""
3754
3755 #. type: SH
3756 #: build/C/man7/cpuset.7:1352 build/C/man2/getpriority.2:225
3757 #: build/C/man2/getrlimit.2:577 build/C/man2/ioprio_set.2:337
3758 #: build/C/man2/setfsgid.2:106 build/C/man2/setfsuid.2:114
3759 #, no-wrap
3760 msgid "BUGS"
3761 msgstr "バグ"
3762
3763 #.  ================== EXAMPLE ==================
3764 #. type: Plain text
3765 #: build/C/man7/cpuset.7:1365
3766 msgid "I<cpuset.memory_pressure> cpuset files can be opened for writing, creation, or truncation, but then the B<write>(2)  fails with I<errno> set to B<EACCES>, and the creation and truncation options on B<open>(2)  have no effect."
3767 msgstr ""
3768
3769 #. type: SH
3770 #: build/C/man7/cpuset.7:1365 build/C/man2/getrlimit.2:710
3771 #: build/C/man7/namespaces.7:361 build/C/man7/pid_namespaces.7:353
3772 #: build/C/man7/user_namespaces.7:677 build/C/man2/seccomp.2:476
3773 #, no-wrap
3774 msgid "EXAMPLE"
3775 msgstr "例"
3776
3777 #. type: Plain text
3778 #: build/C/man7/cpuset.7:1368
3779 msgid "The following examples demonstrate querying and setting cpuset options using shell commands."
3780 msgstr ""
3781
3782 #. type: SS
3783 #: build/C/man7/cpuset.7:1368
3784 #, no-wrap
3785 msgid "Creating and attaching to a cpuset."
3786 msgstr ""
3787
3788 #. type: Plain text
3789 #: build/C/man7/cpuset.7:1371
3790 msgid "To create a new cpuset and attach the current command shell to it, the steps are:"
3791 msgstr ""
3792
3793 #. type: IP
3794 #: build/C/man7/cpuset.7:1373 build/C/man7/cpuset.7:1412
3795 #, no-wrap
3796 msgid "1)"
3797 msgstr "1)"
3798
3799 #. type: Plain text
3800 #: build/C/man7/cpuset.7:1375
3801 msgid "mkdir /dev/cpuset (if not already done)"
3802 msgstr ""
3803
3804 #. type: IP
3805 #: build/C/man7/cpuset.7:1375 build/C/man7/cpuset.7:1418
3806 #, no-wrap
3807 msgid "2)"
3808 msgstr "2)"
3809
3810 #. type: Plain text
3811 #: build/C/man7/cpuset.7:1377
3812 msgid "mount -t cpuset none /dev/cpuset (if not already done)"
3813 msgstr ""
3814
3815 #. type: IP
3816 #: build/C/man7/cpuset.7:1377 build/C/man7/cpuset.7:1421
3817 #, no-wrap
3818 msgid "3)"
3819 msgstr "3)"
3820
3821 #. type: Plain text
3822 #: build/C/man7/cpuset.7:1380
3823 msgid "Create the new cpuset using B<mkdir>(1)."
3824 msgstr ""
3825
3826 #. type: IP
3827 #: build/C/man7/cpuset.7:1380 build/C/man7/cpuset.7:1424
3828 #, no-wrap
3829 msgid "4)"
3830 msgstr "4)"
3831
3832 #. type: Plain text
3833 #: build/C/man7/cpuset.7:1382
3834 msgid "Assign CPUs and memory nodes to the new cpuset."
3835 msgstr ""
3836
3837 #. type: IP
3838 #: build/C/man7/cpuset.7:1382 build/C/man7/cpuset.7:1429
3839 #, no-wrap
3840 msgid "5)"
3841 msgstr "5)"
3842
3843 #. type: Plain text
3844 #: build/C/man7/cpuset.7:1384
3845 msgid "Attach the shell to the new cpuset."
3846 msgstr ""
3847
3848 #. type: Plain text
3849 #: build/C/man7/cpuset.7:1389
3850 msgid "For example, the following sequence of commands will set up a cpuset named \"Charlie\", containing just CPUs 2 and 3, and memory node 1, and then attach the current shell to that cpuset."
3851 msgstr ""
3852
3853 #. type: Plain text
3854 #: build/C/man7/cpuset.7:1403
3855 #, no-wrap
3856 msgid ""
3857 "$B< mkdir /dev/cpuset>\n"
3858 "$B< mount -t cpuset cpuset /dev/cpuset>\n"
3859 "$B< cd /dev/cpuset>\n"
3860 "$B< mkdir Charlie>\n"
3861 "$B< cd Charlie>\n"
3862 "$B< /bin/echo 2-3 E<gt> cpuset.cpus>\n"
3863 "$B< /bin/echo 1 E<gt> cpuset.mems>\n"
3864 "$B< /bin/echo $$ E<gt> tasks>\n"
3865 "# The current shell is now running in cpuset Charlie\n"
3866 "# The next line should display '/Charlie'\n"
3867 "$B< cat /proc/self/cpuset>\n"
3868 msgstr ""
3869 "$B< mkdir /dev/cpuset>\n"
3870 "$B< mount -t cpuset cpuset /dev/cpuset>\n"
3871 "$B< cd /dev/cpuset>\n"
3872 "$B< mkdir Charlie>\n"
3873 "$B< cd Charlie>\n"
3874 "$B< /bin/echo 2-3 E<gt> cpuset.cpus>\n"
3875 "$B< /bin/echo 1 E<gt> cpuset.mems>\n"
3876 "$B< /bin/echo $$ E<gt> tasks>\n"
3877 "# The current shell is now running in cpuset Charlie\n"
3878 "# The next line should display '/Charlie'\n"
3879 "$B< cat /proc/self/cpuset>\n"
3880
3881 #. type: SS
3882 #: build/C/man7/cpuset.7:1405
3883 #, no-wrap
3884 msgid "Migrating a job to different memory nodes."
3885 msgstr ""
3886
3887 #. type: Plain text
3888 #: build/C/man7/cpuset.7:1410
3889 msgid "To migrate a job (the set of processes attached to a cpuset)  to different CPUs and memory nodes in the system, including moving the memory pages currently allocated to that job, perform the following steps."
3890 msgstr ""
3891
3892 #. type: Plain text
3893 #: build/C/man7/cpuset.7:1418
3894 msgid "Let's say we want to move the job in cpuset I<alpha> (CPUs 4-7 and memory nodes 2-3) to a new cpuset I<beta> (CPUs 16-19 and memory nodes 8-9)."
3895 msgstr ""
3896
3897 #. type: Plain text
3898 #: build/C/man7/cpuset.7:1421
3899 msgid "First create the new cpuset I<beta>."
3900 msgstr ""
3901
3902 #. type: Plain text
3903 #: build/C/man7/cpuset.7:1424
3904 msgid "Then allow CPUs 16-19 and memory nodes 8-9 in I<beta>."
3905 msgstr ""
3906
3907 #. type: Plain text
3908 #: build/C/man7/cpuset.7:1429
3909 msgid "Then enable I<memory_migration> in I<beta>."
3910 msgstr ""
3911
3912 #. type: Plain text
3913 #: build/C/man7/cpuset.7:1434
3914 msgid "Then move each process from I<alpha> to I<beta>."
3915 msgstr ""
3916
3917 #. type: Plain text
3918 #: build/C/man7/cpuset.7:1437
3919 msgid "The following sequence of commands accomplishes this."
3920 msgstr ""
3921
3922 #. type: Plain text
3923 #: build/C/man7/cpuset.7:1447
3924 #, no-wrap
3925 msgid ""
3926 "$B< cd /dev/cpuset>\n"
3927 "$B< mkdir beta>\n"
3928 "$B< cd beta>\n"
3929 "$B< /bin/echo 16-19 E<gt> cpuset.cpus>\n"
3930 "$B< /bin/echo 8-9 E<gt> cpuset.mems>\n"
3931 "$B< /bin/echo 1 E<gt> cpuset.memory_migrate>\n"
3932 "$B< while read i; do /bin/echo $i; done E<lt> ../alpha/tasks E<gt> tasks>\n"
3933 msgstr ""
3934 "$B< cd /dev/cpuset>\n"
3935 "$B< mkdir beta>\n"
3936 "$B< cd beta>\n"
3937 "$B< /bin/echo 16-19 E<gt> cpuset.cpus>\n"
3938 "$B< /bin/echo 8-9 E<gt> cpuset.mems>\n"
3939 "$B< /bin/echo 1 E<gt> cpuset.memory_migrate>\n"
3940 "$B< while read i; do /bin/echo $i; done E<lt> ../alpha/tasks E<gt> tasks>\n"
3941
3942 #. type: Plain text
3943 #: build/C/man7/cpuset.7:1456
3944 msgid "The above should move any processes in I<alpha> to I<beta>, and any memory held by these processes on memory nodes 2-3 to memory nodes 8-9, respectively."
3945 msgstr ""
3946
3947 #. type: Plain text
3948 #: build/C/man7/cpuset.7:1458
3949 msgid "Notice that the last step of the above sequence did not do:"
3950 msgstr ""
3951
3952 #. type: Plain text
3953 #: build/C/man7/cpuset.7:1462
3954 #, no-wrap
3955 msgid "$B< cp ../alpha/tasks tasks>\n"
3956 msgstr "$B< cp ../alpha/tasks tasks>\n"
3957
3958 #. type: Plain text
3959 #: build/C/man7/cpuset.7:1473
3960 msgid "The I<while> loop, rather than the seemingly easier use of the B<cp>(1)  command, was necessary because only one process PID at a time may be written to the I<tasks> file."
3961 msgstr ""
3962
3963 #. type: Plain text
3964 #: build/C/man7/cpuset.7:1481
3965 msgid "The same effect (writing one PID at a time) as the I<while> loop can be accomplished more efficiently, in fewer keystrokes and in syntax that works on any shell, but alas more obscurely, by using the B<-u> (unbuffered) option of B<sed>(1):"
3966 msgstr ""
3967
3968 #. type: Plain text
3969 #: build/C/man7/cpuset.7:1485
3970 #, no-wrap
3971 msgid "$B< sed -un p E<lt> ../alpha/tasks E<gt> tasks>\n"
3972 msgstr "$B< sed -un p E<lt> ../alpha/tasks E<gt> tasks>\n"
3973
3974 #. type: Plain text
3975 #: build/C/man7/cpuset.7:1503
3976 msgid "B<taskset>(1), B<get_mempolicy>(2), B<getcpu>(2), B<mbind>(2), B<sched_getaffinity>(2), B<sched_setaffinity>(2), B<sched_setscheduler>(2), B<set_mempolicy>(2), B<CPU_SET>(3), B<proc>(5), B<numa>(7), B<sched>(7), B<migratepages>(8), B<numactl>(8)"
3977 msgstr "B<taskset>(1), B<get_mempolicy>(2), B<getcpu>(2), B<mbind>(2), B<sched_getaffinity>(2), B<sched_setaffinity>(2), B<sched_setscheduler>(2), B<set_mempolicy>(2), B<CPU_SET>(3), B<proc>(5), B<numa>(7), B<sched>(7), B<migratepages>(8), B<numactl>(8)"
3978
3979 #. type: Plain text
3980 #: build/C/man7/cpuset.7:1506
3981 msgid "I<Documentation/cpusets.txt> in the Linux kernel source tree"
3982 msgstr "Linux カーネルソース内の I<Documentation/cpusets.txt>"
3983
3984 #. type: TH
3985 #: build/C/man7/credentials.7:27
3986 #, no-wrap
3987 msgid "CREDENTIALS"
3988 msgstr "CREDENTIALS"
3989
3990 #. type: TH
3991 #: build/C/man7/credentials.7:27 build/C/man2/setsid.2:31
3992 #, no-wrap
3993 msgid "2014-12-31"
3994 msgstr "2014-12-31"
3995
3996 #. type: Plain text
3997 #: build/C/man7/credentials.7:30
3998 msgid "credentials - process identifiers"
3999 msgstr "credentials - 認証に用いられるプロセスの識別子"
4000
4001 #. type: SS
4002 #: build/C/man7/credentials.7:31
4003 #, no-wrap
4004 msgid "Process ID (PID)"
4005 msgstr "プロセスID (PID)"
4006
4007 #. type: Plain text
4008 #: build/C/man7/credentials.7:41
4009 msgid "Each process has a unique nonnegative integer identifier that is assigned when the process is created using B<fork>(2).  A process can obtain its PID using B<getpid>(2).  A PID is represented using the type I<pid_t> (defined in I<E<lt>sys/types.hE<gt>>)."
4010 msgstr "各プロセスは、負でない整数の一意な識別子を持つ。 この識別子は B<fork>(2)  を使ってプロセスが生成される際に割り当てられる。 プロセスは B<getpid>(2)  を使って自分の PID を取得できる。 PID は I<pid_t> 型で表現される (I<pid_t> は I<E<lt>sys/types.hE<gt>> で定義されている)。"
4011
4012 #.  .BR sched_rr_get_interval (2),
4013 #.  .BR sched_getaffinity (2),
4014 #.  .BR sched_setaffinity (2),
4015 #.  .BR sched_getparam (2),
4016 #.  .BR sched_setparam (2),
4017 #.  .BR sched_setscheduler (2),
4018 #.  .BR sched_getscheduler (2),
4019 #.  .BR getsid (2),
4020 #.  .BR waitid (2),
4021 #.  .BR wait4 (2),
4022 #. type: Plain text
4023 #: build/C/man7/credentials.7:62
4024 msgid "PIDs are used in a range of system calls to identify the process affected by the call, for example: B<kill>(2), B<ptrace>(2), B<setpriority>(2)  B<setpgid>(2), B<setsid>(2), B<sigqueue>(3), and B<waitpid>(2)."
4025 msgstr "PID は各種のシステムコールでそのシステムコールが作用するプロセスを 特定するために使用される。以下に例を挙げる: B<kill>(2), B<ptrace>(2), B<setpriority>(2), B<setpgid>(2), B<setsid>(2), B<sigqueue>(3), B<waitpid>(2)."
4026
4027 #. type: Plain text
4028 #: build/C/man7/credentials.7:65
4029 msgid "A process's PID is preserved across an B<execve>(2)."
4030 msgstr "プロセスの PID は B<execve>(2)  の前後で不変である。"
4031
4032 #. type: SS
4033 #: build/C/man7/credentials.7:65
4034 #, no-wrap
4035 msgid "Parent process ID (PPID)"
4036 msgstr "親プロセス ID (PPID)"
4037
4038 #. type: Plain text
4039 #: build/C/man7/credentials.7:73
4040 msgid "A process's parent process ID identifies the process that created this process using B<fork>(2).  A process can obtain its PPID using B<getppid>(2).  A PPID is represented using the type I<pid_t>."
4041 msgstr "プロセスの親プロセスの ID は、 B<fork>(2)  を使ってそのプロセスを生成したプロセスを示す。 プロセスは B<getppid>(2)  を使って自分の PPID を取得できる。 PPID は I<pid_t> 型で表現される。"
4042
4043 #. type: Plain text
4044 #: build/C/man7/credentials.7:76
4045 msgid "A process's PPID is preserved across an B<execve>(2)."
4046 msgstr "プロセスの PPID は B<execve>(2)  の前後で不変である。"
4047
4048 #. type: SS
4049 #: build/C/man7/credentials.7:76
4050 #, no-wrap
4051 msgid "Process group ID and session ID"
4052 msgstr "プロセスグループ ID とセッション ID"
4053
4054 #. type: Plain text
4055 #: build/C/man7/credentials.7:84
4056 msgid "Each process has a session ID and a process group ID, both represented using the type I<pid_t>.  A process can obtain its session ID using B<getsid>(2), and its process group ID using B<getpgrp>(2)."
4057 msgstr "各プロセスはセッション ID とプロセスグループ ID を持つ。 これらの ID はどちらも I<pid_t> 型で表現される。 プロセスは、それぞれ B<getsid>(2), B<getpgrp>(2)  を使って自分のセッション ID、プロセスグループ ID を取得できる。"
4058
4059 #. type: Plain text
4060 #: build/C/man7/credentials.7:90
4061 msgid "A child created by B<fork>(2)  inherits its parent's session ID and process group ID.  A process's session ID and process group ID are preserved across an B<execve>(2)."
4062 msgstr "B<fork>(2)  で生成された子プロセスは親プロセスのセッション ID とプロセスグループ ID を継承する。プロセスのセッション ID とプロセスグループ ID は B<execve>(2)  の前後で不変である。"
4063
4064 #. type: Plain text
4065 #: build/C/man7/credentials.7:103
4066 msgid "Sessions and process groups are abstractions devised to support shell job control.  A process group (sometimes called a \"job\") is a collection of processes that share the same process group ID; the shell creates a new process group for the process(es) used to execute single command or pipeline (e.g., the two processes created to execute the command \"ls\\ |\\ wc\" are placed in the same process group).  A process's group membership can be set using B<setpgid>(2).  The process whose process ID is the same as its process group ID is the I<process group leader> for that group."
4067 msgstr "セッションとプロセスグループの概念は、シェルのジョブ制御を行うために 考案されたものである。 プロセスグループ (時には「ジョブ」と呼ばれることもある) は、 同じプロセスグループ ID を共有するプロセスの集まりである。 シェルは、一つのコマンドもしくはパイプラインの実行に使われるプロセス群に 対して一つのプロセスグループを生成する (例えば、コマンド \"ls\\ |\\ wc\" を実行するために生成される二つのプロセスは 同じプロセスグループに置かれる)。 所属するプロセスグループは B<setpgid>(2)  を使って設定できる。 自身のプロセス ID がプロセスグループ ID と同じプロセスは、 そのグループの「プロセスグループリーダー」である。"
4068
4069 #. type: Plain text
4070 #: build/C/man7/credentials.7:115
4071 msgid "A session is a collection of processes that share the same session ID.  All of the members of a process group also have the same session ID (i.e., all of the members of a process group always belong to the same session, so that sessions and process groups form a strict two-level hierarchy of processes.)  A new session is created when a process calls B<setsid>(2), which creates a new session whose session ID is the same as the PID of the process that called B<setsid>(2).  The creator of the session is called the I<session leader>."
4072 msgstr "セッションは、同じセッション ID を共有するプロセスの集まりである。 ある一つのプロセスグループの全メンバーは同じセッション ID を持つ (つまり、一つのプロセスグループのメンバーは全て同じセッションに所属し、 これにより、セッションとプロセスグループで二階層のプロセス階層が形成できる)。 新たなセッションの生成はプロセスが B<setsid>(2)  を呼び出すことで行う。 B<setsid>(2)  は、 B<setsid>(2)  を呼び出したプロセスの PID と同じ値のセッション ID を持つ 新たなセッションを生成する。 セッションの生成者は「セッションリーダー」と呼ばれる。"
4073
4074 #. type: Plain text
4075 #: build/C/man7/credentials.7:124
4076 msgid "All of the processes in a session share a I<controlling terminal>.  The controlling terminal is established when the session leader first opens a terminal (unless the B<O_NOCTTY> flag is specified when calling B<open>(2)).  A terminal may be the controlling terminal of at most one session."
4077 msgstr "あるセッションの全プロセスは一つの I<制御端末> を共有する。 セッションリーダーが最初に端末をオープンした際に制御端末は設定される (B<open>(2) の呼び出しで B<O_NOCTTY> フラグが指定された場合を除く)。 一つの端末は、最大でも一つのセッションの制御端末にしかなれない。"
4078
4079 #. type: Plain text
4080 #: build/C/man7/credentials.7:146
4081 msgid "At most one of the jobs in a session may be the I<foreground job>; other jobs in the session are I<background jobs>.  Only the foreground job may read from the terminal; when a process in the background attempts to read from the terminal, its process group is sent a B<SIGTTIN> signal, which suspends the job.  If the B<TOSTOP> flag has been set for the terminal (see B<termios>(3)), then only the foreground job may write to the terminal; writes from background job cause a B<SIGTTOU> signal to be generated, which suspends the job.  When terminal keys that generate a signal (such as the I<interrupt> key, normally control-C)  are pressed, the signal is sent to the processes in the foreground job."
4082 msgstr "一つのセッションのジョブの中で、I<フォアグラウンドジョブ>になれるのは最大でも一つで、そのセッションの他のジョブはI<バックグラウンドジョブ>である。 フォアグラウンドジョブだけが端末からの読み込みを行える。 バックグラウンドのプロセスが端末から読み込みを行おうとした場合、 フォアグラウンドジョブを停止させるシグナルである B<SIGTTIN> が所属するプロセスグループに対して送信される。 端末に B<TOSTOP> フラグがセットされていた場合 (B<termios>(3) 参照)、 フォアグラウンドジョブだけが端末への書き込みを行える。 バックグラウンドのプロセスが端末への書き込みを行おうとした場合、 フォアグラウンドジョブを停止させるシグナルである B<SIGTTOU> が生成される。 シグナルを生成する端末キー (例えば I<中断>キー、通常は control-C) が押された場合、 そのシグナルはフォアグラウンドジョブのプロセスに送信される。"
4083
4084 #. type: Plain text
4085 #: build/C/man7/credentials.7:167
4086 msgid "Various system calls and library functions may operate on all members of a process group, including B<kill>(2), B<killpg>(2), B<getpriority>(2), B<setpriority>(2), B<ioprio_get>(2), B<ioprio_set>(2), B<waitid>(2), and B<waitpid>(2).  See also the discussion of the B<F_GETOWN>, B<F_GETOWN_EX>, B<F_SETOWN>, and B<F_SETOWN_EX> operations in B<fcntl>(2)."
4087 msgstr "様々なシステムコールやライブラリ関数で、プロセスグループの全メンバーに対して操作を行うことができる。 例えば、 B<kill>(2), B<killpg>(2), B<getpriority>(2), B<setpriority>(2), B<ioprio_get>(2), B<ioprio_set>(2), B<waitid>(2), B<waitpid>(2) など。 B<fcntl>(2) の操作 B<F_GETOWN>, B<F_GETOWN_EX>, B<F_SETOWN>, B<F_SETOWN_EX> の議論も参照。"
4088
4089 #. type: SS
4090 #: build/C/man7/credentials.7:167
4091 #, no-wrap
4092 msgid "User and group identifiers"
4093 msgstr "ユーザ ID とグループ ID"
4094
4095 #. type: Plain text
4096 #: build/C/man7/credentials.7:175
4097 msgid "Each process has various associated user and groups IDs.  These IDs are integers, respectively represented using the types I<uid_t> and I<gid_t> (defined in I<E<lt>sys/types.hE<gt>>)."
4098 msgstr "各プロセスは、数種類のユーザ ID とグループ ID を持つ。 ユーザ ID、グループ ID は整数で、それぞれ I<uid_t>, I<gid_t> 型で表現される (これらは I<E<lt>sys/types.hE<gt>> で定義されている)。"
4099
4100 #. type: Plain text
4101 #: build/C/man7/credentials.7:177
4102 msgid "On Linux, each process has the following user and group identifiers:"
4103 msgstr "Linux では、各プロセスは以下のような種類のユーザ ID とグループ ID を持つ。"
4104
4105 #. type: Plain text
4106 #: build/C/man7/credentials.7:183
4107 msgid "Real user ID and real group ID.  These IDs determine who owns the process.  A process can obtain its real user (group) ID using B<getuid>(2)  (B<getgid>(2))."
4108 msgstr "実ユーザ ID と実グループ ID。 これらの ID によりプロセスの所有者が決定される。 プロセスが自分の実ユーザ ID、実グループ ID を取得するには、それぞれ B<getuid>(2), B<getgid>(2)  を使用する。"
4109
4110 #. type: Plain text
4111 #: build/C/man7/credentials.7:195
4112 msgid "Effective user ID and effective group ID.  These IDs are used by the kernel to determine the permissions that the process will have when accessing shared resources such as message queues, shared memory, and semaphores.  On most UNIX systems, these IDs also determine the permissions when accessing files.  However, Linux uses the filesystem IDs described below for this task.  A process can obtain its effective user (group) ID using B<geteuid>(2)  (B<getegid>(2))."
4113 msgstr "実効ユーザ ID と実効グループ ID。 これらの ID は、メッセージキュー、共有メモリ、セマフォなどの 共有リソースにアクセスしようとした際にそのプロセスがアクセス許可を 持っているかをカーネルが判定するのに使用される。 ほとんどの UNIX システムでは、これらの ID はファイルへのアクセス時の アクセス許可の判定にも使用される。 しかしながら、Linux ではファイルへのアクセス許可の判定には 後述のファイルシステム ID が使用される。 プロセスが自分の実効ユーザ ID、実効グループ ID を取得するには、それぞれ B<geteuid>(2), B<getegid>(2)  を使用する。"
4114
4115 #. type: Plain text
4116 #: build/C/man7/credentials.7:217
4117 msgid "Saved set-user-ID and saved set-group-ID.  These IDs are used in set-user-ID and set-group-ID programs to save a copy of the corresponding effective IDs that were set when the program was executed (see B<execve>(2)).  A set-user-ID program can assume and drop privileges by switching its effective user ID back and forth between the values in its real user ID and saved set-user-ID.  This switching is done via calls to B<seteuid>(2), B<setreuid>(2), or B<setresuid>(2).  A set-group-ID program performs the analogous tasks using B<setegid>(2), B<setregid>(2), or B<setresgid>(2).  A process can obtain its saved set-user-ID (set-group-ID) using B<getresuid>(2)  (B<getresgid>(2))."
4118 msgstr "保存 (saved) set-user-ID と保存 set-group-ID。 これらの ID は、set-user-ID や set-group-ID されたプログラムにおいて、 プログラムの実行時に設定された実効 ID のコピーを保存するために 使用される (B<execve>(2)  参照)。 set-user-ID プログラムは、実効ユーザ ID を実ユーザID と保存 set-user-ID の間で行ったり来たり切り替えることで、特権を得たり落としたりできる。 この切り替えは B<seteuid>(2), B<setreuid>(2), B<setresuid>(2)  を呼び出すことで実行できる。 set-group-ID プログラムは、 B<setegid>(2), B<setregid>(2), B<setresgid>(2)  を使って同様のことができる。 プロセスが自分の保存 set-user-ID、保存 set-group-ID を取得するには、 B<getresuid(2),> B<getresgids>(2)  をそれぞれ使用する。"
4119
4120 #. type: Plain text
4121 #: build/C/man7/credentials.7:234
4122 msgid "Filesystem user ID and filesystem group ID (Linux-specific).  These IDs, in conjunction with the supplementary group IDs described below, are used to determine permissions for accessing files; see B<path_resolution>(7)  for details.  Whenever a process's effective user (group) ID is changed, the kernel also automatically changes the filesystem user (group) ID to the same value.  Consequently, the filesystem IDs normally have the same values as the corresponding effective ID, and the semantics for file-permission checks are thus the same on Linux as on other UNIX systems.  The filesystem IDs can be made to differ from the effective IDs by calling B<setfsuid>(2)  and B<setfsgid>(2)."
4123 msgstr "ファイルシステムユーザ ID とファイルシステムグループ ID (Linux 固有)。 これらの ID は、後述の補助グループ ID と組み合わせて使用され、 ファイルへのアクセス権の決定に利用される。詳細は B<path_resolution>(7)  を参照。 プロセスの実効 ID (ユーザ ID や グループ ID) が変更されるたびに、 カーネルは自動的に対応するファイルシステム ID を同じ値に変更する。 その結果、ファイルシステム ID は通常は対応する実効 ID と同じ値となり、 ファイルのアクセス権のチェック方法は Linux と他の UNIX システムで同じである。 ファイルシステム ID は実効 ID とは異なる値にすることができ、 変更は B<setfsuid>(2)  と B<setfsgid>(2)  を呼び出して行う。"
4124
4125 #.  Since kernel 2.6.4, the limit is visible via the read-only file
4126 #.  /proc/sys/kernel/ngroups_max.
4127 #.  As at 2.6.22-rc2, this file is still read-only.
4128 #. type: Plain text
4129 #: build/C/man7/credentials.7:253
4130 msgid "Supplementary group IDs.  This is a set of additional group IDs that are used for permission checks when accessing files and other shared resources.  On Linux kernels before 2.6.4, a process can be a member of up to 32 supplementary groups; since kernel 2.6.4, a process can be a member of up to 65536 supplementary groups.  The call I<sysconf(_SC_NGROUPS_MAX)> can be used to determine the number of supplementary groups of which a process may be a member.  A process can obtain its set of supplementary group IDs using B<getgroups>(2), and can modify the set using B<setgroups>(2)."
4131 msgstr "補助グループ ID。 この ID は、ファイルや他の共有リソースへのアクセス時にアクセス許可の チェックに使用される、追加のグループ ID の集合である。 カーネル 2.6.4 より前の Linux では、一つのプロセスあたりの 補助グループのメンバー数は最大で 32 である。 カーネル 2.6.4 以降では、一つのプロセスあたりの 補助グループのメンバー数は最大で 65536 である。 I<sysconf(_SC_NGROUPS_MAX)> を呼び出すことで、あるプロセスがメンバーとなることができる可能性のある 補助グループ数を知ることができる。 プロセスは、自分の補助グループ ID の集合を B<getgroups>(2)  で取得でき、 B<setgroups>(2)  で集合を変更できる。"
4132
4133 #. type: Plain text
4134 #: build/C/man7/credentials.7:263
4135 msgid "A child process created by B<fork>(2)  inherits copies of its parent's user and groups IDs.  During an B<execve>(2), a process's real user and group ID and supplementary group IDs are preserved; the effective and saved set IDs may be changed, as described in B<execve>(2)."
4136 msgstr "B<fork>(2)  で生成された子プロセスは親プロセスのユーザ ID とグループ ID を継承する。 B<execve>(2)  の間、プロセスの実ユーザ/グループ ID と補助グループ ID 集合は不変である。 実効 ID と保存セット ID は変更される可能性がある (B<execve>(2)  で説明されている)。"
4137
4138 #. type: Plain text
4139 #: build/C/man7/credentials.7:266
4140 msgid "Aside from the purposes noted above, a process's user IDs are also employed in a number of other contexts:"
4141 msgstr "上記の目的以外にも、プロセスのユーザ ID は他の様々な場面で利用される。"
4142
4143 #. type: Plain text
4144 #: build/C/man7/credentials.7:269
4145 msgid "when determining the permissions for sending signals (see B<kill>(2));"
4146 msgstr "シグナルを送る許可の判定時 (B<kill>(2)  参照)"
4147
4148 #. type: Plain text
4149 #: build/C/man7/credentials.7:280
4150 msgid "when determining the permissions for setting process-scheduling parameters (nice value, real time scheduling policy and priority, CPU affinity, I/O priority) using B<setpriority>(2), B<sched_setaffinity>(2), B<sched_setscheduler>(2), B<sched_setparam>(2), B<sched_setattr>(2), and B<ioprio_set>(2);"
4151 msgstr "プロセスのスケジューリング関連のパラメータ (nice 値、 リアルタイムスケジューリングポリシーや優先度、CPU affinity、 入出力優先度) の設定許可の判定時。 スケジューリング関連のパラメータ設定には B<setpriority>(2), B<sched_setaffinity>(2), B<sched_setscheduler>(2), B<sched_setparam>(2), B<sched_setattr>(2), B<ioprio_set>(2)  が使用される。"
4152
4153 #. type: Plain text
4154 #: build/C/man7/credentials.7:283
4155 msgid "when checking resource limits (see B<getrlimit>(2));"
4156 msgstr "リソース上限のチェック時 (B<getrlimit>(2)  参照)"
4157
4158 #. type: Plain text
4159 #: build/C/man7/credentials.7:287
4160 msgid "when checking the limit on the number of inotify instances that the process may create (see B<inotify>(7))."
4161 msgstr "プロセスが生成できる inotify インスタンス数の上限のチェック時 (B<inotify>(7) 参照)"
4162
4163 #. type: Plain text
4164 #: build/C/man7/credentials.7:293
4165 msgid "Process IDs, parent process IDs, process group IDs, and session IDs are specified in POSIX.1-2001.  The real, effective, and saved set user and groups IDs, and the supplementary group IDs, are specified in POSIX.1-2001.  The filesystem user and group IDs are a Linux extension."
4166 msgstr "プロセス ID、親プロセス ID、プロセスグループ ID、セッション ID は POSIX.1-2001 で規定されている。 実 ID、実効 ID、保存セット ID のユーザ ID / グループ ID および 補助グループ ID は POSIX.1-2001 で規定されている。 ファイルシステムユーザ ID / グループ ID は Linux による拡張である。"
4167
4168 #. type: Plain text
4169 #: build/C/man7/credentials.7:304
4170 msgid "The POSIX threads specification requires that credentials are shared by all of the threads in a process.  However, at the kernel level, Linux maintains separate user and group credentials for each thread.  The NPTL threading implementation does some work to ensure that any change to user or group credentials (e.g., calls to B<setuid>(2), B<setresuid>(2))  is carried through to all of the POSIX threads in a process."
4171 msgstr "POSIX のスレッド仕様では、これらの識別子がプロセス内の全スレッドで 共有されることを求めている。 しかしながら、カーネルのレベルでは、Linux はスレッド毎に別々の ユーザとグループに関する識別子を管理している。 NPTL スレッド実装が、(例えば B<setuid>(2), B<setresuid>(2)  などの呼び出しによる) ユーザやグループに関する識別子に対する変更が プロセス内の全ての POSIX スレッドに対して反映されることを保証する ための処理を行っている。"
4172
4173 #. type: Plain text
4174 #: build/C/man7/credentials.7:340
4175 msgid "B<bash>(1), B<csh>(1), B<ps>(1), B<access>(2), B<execve>(2), B<faccessat>(2), B<fork>(2), B<getgroups>(2), B<getpgrp>(2), B<getpid>(2), B<getppid>(2), B<getsid>(2), B<kill>(2), B<killpg>(2), B<setegid>(2), B<seteuid>(2), B<setfsgid>(2), B<setfsuid>(2), B<setgid>(2), B<setgroups>(2), B<setresgid>(2), B<setresuid>(2), B<setuid>(2), B<waitpid>(2), B<euidaccess>(3), B<initgroups>(3), B<tcgetpgrp>(3), B<tcsetpgrp>(3), B<capabilities>(7), B<namespaces>(7), B<path_resolution>(7), B<pid_namespaces>(7), B<signal>(7), B<user_namespaces>(7), B<unix>(7)"
4176 msgstr "B<bash>(1), B<csh>(1), B<ps>(1), B<access>(2), B<execve>(2), B<faccessat>(2), B<fork>(2), B<getgroups>(2), B<getpgrp>(2), B<getpid>(2), B<getppid>(2), B<getsid>(2), B<kill>(2), B<killpg>(2), B<setegid>(2), B<seteuid>(2), B<setfsgid>(2), B<setfsuid>(2), B<setgid>(2), B<setgroups>(2), B<setresgid>(2), B<setresuid>(2), B<setuid>(2), B<waitpid>(2), B<euidaccess>(3), B<initgroups>(3), B<tcgetpgrp>(3), B<tcsetpgrp>(3), B<capabilities>(7), B<namespaces>(7), B<path_resolution>(7), B<pid_namespaces>(7), B<signal>(7), B<user_namespaces>(7), B<unix>(7)"
4177
4178 #. type: TH
4179 #: build/C/man2/getgid.2:25
4180 #, no-wrap
4181 msgid "GETGID"
4182 msgstr "GETGID"
4183
4184 #. type: TH
4185 #: build/C/man2/getgid.2:25 build/C/man2/getresuid.2:28
4186 #: build/C/man2/getuid.2:26
4187 #, no-wrap
4188 msgid "2010-11-22"
4189 msgstr "2010-11-22"
4190
4191 #. type: Plain text
4192 #: build/C/man2/getgid.2:28
4193 msgid "getgid, getegid - get group identity"
4194 msgstr "getgid, getegid - グループ ID を得る"
4195
4196 #. type: Plain text
4197 #: build/C/man2/getgid.2:30 build/C/man2/getgroups.2:38
4198 #: build/C/man2/getpid.2:32 build/C/man2/getresuid.2:35
4199 #: build/C/man2/getsid.2:31 build/C/man2/getuid.2:31
4200 #: build/C/man3/group_member.3:30 build/C/man2/seteuid.2:36
4201 #: build/C/man2/setgid.2:36 build/C/man2/setpgid.2:53
4202 #: build/C/man2/setresuid.2:33 build/C/man2/setreuid.2:52
4203 #: build/C/man2/setsid.2:37 build/C/man2/setuid.2:37
4204 msgid "B<#include E<lt>unistd.hE<gt>>"
4205 msgstr "B<#include E<lt>unistd.hE<gt>>"
4206
4207 #. type: Plain text
4208 #: build/C/man2/getgid.2:32 build/C/man2/getgroups.2:36
4209 #: build/C/man2/getpid.2:30 build/C/man2/getuid.2:33 build/C/man2/seteuid.2:34
4210 #: build/C/man2/setgid.2:34 build/C/man2/setreuid.2:50
4211 #: build/C/man2/setuid.2:35
4212 msgid "B<#include E<lt>sys/types.hE<gt>>"
4213 msgstr "B<#include E<lt>sys/types.hE<gt>>"
4214
4215 #. type: Plain text
4216 #: build/C/man2/getgid.2:34
4217 msgid "B<gid_t getgid(void);>"
4218 msgstr "B<gid_t getgid(void);>"
4219
4220 #. type: Plain text
4221 #: build/C/man2/getgid.2:36
4222 msgid "B<gid_t getegid(void);>"
4223 msgstr "B<gid_t getegid(void);>"
4224
4225 #. type: Plain text
4226 #: build/C/man2/getgid.2:39
4227 msgid "B<getgid>()  returns the real group ID of the calling process."
4228 msgstr "B<getgid>()  は呼び出し元のプロセスの実グループ ID を返す。"
4229
4230 #. type: Plain text
4231 #: build/C/man2/getgid.2:42
4232 msgid "B<getegid>()  returns the effective group ID of the calling process."
4233 msgstr "B<getegid>()  は呼び出し元のプロセスの実効グループ ID を返す。"
4234
4235 #. type: Plain text
4236 #: build/C/man2/getgid.2:44 build/C/man2/getpid.2:46 build/C/man2/getuid.2:45
4237 msgid "These functions are always successful."
4238 msgstr "これらの関数は常に成功する。"
4239
4240 #. type: Plain text
4241 #: build/C/man2/getgid.2:46 build/C/man2/getuid.2:47
4242 msgid "POSIX.1-2001, 4.3BSD."
4243 msgstr "POSIX.1-2001, 4.3BSD."
4244
4245 #. type: Plain text
4246 #: build/C/man2/getgid.2:62
4247 msgid "The original Linux B<getgid>()  and B<getegid>()  system calls supported only 16-bit group IDs.  Subsequently, Linux 2.4 added B<getgid32>()  and B<getegid32>(), supporting 32-bit IDs.  The glibc B<getgid>()  and B<getegid>()  wrapper functions transparently deal with the variations across kernel versions."
4248 msgstr ""
4249 "元々の Linux の B<getgid>() と B<getegid>() システムコールは\n"
4250 "16 ビットのグループ ID だけに対応していた。\n"
4251 "その後、Linux 2.4 で、32 ビットの ID に対応した\n"
4252 "B<getgid32>() と B<getegid32>() が追加された。\n"
4253 "glibc の B<getgid>() と B<getegid>() のラッパー関数は\n"
4254 "カーネルバージョンによるこの違いを吸収している。"
4255
4256 #. type: Plain text
4257 #: build/C/man2/getgid.2:67
4258 msgid "B<getresgid>(2), B<setgid>(2), B<setregid>(2), B<credentials>(7)"
4259 msgstr "B<getresgid>(2), B<setgid>(2), B<setregid>(2), B<credentials>(7)"
4260
4261 #. type: TH
4262 #: build/C/man2/getgroups.2:31
4263 #, no-wrap
4264 msgid "GETGROUPS"
4265 msgstr "GETGROUPS"
4266
4267 #. type: TH
4268 #: build/C/man2/getgroups.2:31 build/C/man2/getpriority.2:45
4269 #, no-wrap
4270 msgid "2014-08-19"
4271 msgstr "2014-08-19"
4272
4273 #. type: Plain text
4274 #: build/C/man2/getgroups.2:34
4275 msgid "getgroups, setgroups - get/set list of supplementary group IDs"
4276 msgstr "getgroups, setgroups - 補助グループ ID のリストを取得/設定する"
4277
4278 #. type: Plain text
4279 #: build/C/man2/getgroups.2:40
4280 msgid "B<int getgroups(int >I<size>B<, gid_t >I<list>B<[]);>"
4281 msgstr "B<int getgroups(int >I<size>B<, gid_t >I<list>B<[]);>"
4282
4283 #. type: Plain text
4284 #: build/C/man2/getgroups.2:42
4285 msgid "B<#include E<lt>grp.hE<gt>>"
4286 msgstr "B<#include E<lt>grp.hE<gt>>"
4287
4288 #. type: Plain text
4289 #: build/C/man2/getgroups.2:44
4290 msgid "B<int setgroups(size_t >I<size>B<, const gid_t *>I<list>B<);>"
4291 msgstr "B<int setgroups(size_t >I<size>B<, const gid_t *>I<list>B<);>"
4292
4293 #. type: Plain text
4294 #: build/C/man2/getgroups.2:52
4295 msgid "B<setgroups>(): _BSD_SOURCE"
4296 msgstr "B<setgroups>(): _BSD_SOURCE"
4297
4298 #. type: Plain text
4299 #: build/C/man2/getgroups.2:70
4300 msgid "B<getgroups>()  returns the supplementary group IDs of the calling process in I<list>.  The argument I<size> should be set to the maximum number of items that can be stored in the buffer pointed to by I<list>.  If the calling process is a member of more than I<size> supplementary groups, then an error results.  It is unspecified whether the effective group ID of the calling process is included in the returned list.  (Thus, an application should also call B<getegid>(2)  and add or remove the resulting value.)"
4301 msgstr "B<getgroups>()  は呼び出し元プロセスの補助グループ (supplementary group) ID を I<list> に返す。 I<size> 引き数には、 I<list> により参照されるバッファに格納できる要素の最大数を設定すべきである。 呼び出し元プロセスが I<size> 個より多くの補助グループのメンバの場合には、エラーとなる。 この関数を呼び出したプロセスの実効グループ ID が、 返されるリストに含まれるかどうかは規定されていない (したがって、アプリケーションは B<getegid>(2)  を呼び出し、その結果の値を追加・削除すべきである)。"
4302
4303 #. type: Plain text
4304 #: build/C/man2/getgroups.2:81
4305 msgid "If I<size> is zero, I<list> is not modified, but the total number of supplementary group IDs for the process is returned.  This allows the caller to determine the size of a dynamically allocated I<list> to be used in a further call to B<getgroups>()."
4306 msgstr "I<size> が 0 ならば、 I<list> は修正されないが、そのプロセスの補助グループ ID の合計数が返される。 これを使うことで、それ以降の B<getgroups>()  の呼び出しで必要となる動的割り当てバッファ I<list> のサイズを、呼び出し元が決定することができる。"
4307
4308 #. type: Plain text
4309 #: build/C/man2/getgroups.2:92
4310 msgid "B<setgroups>()  sets the supplementary group IDs for the calling process.  Appropriate privileges (Linux: the B<CAP_SETGID> capability) are required.  The I<size> argument specifies the number of supplementary group IDs in the buffer pointed to by I<list>."
4311 msgstr "B<setgroups>()  は、呼び出し元プロセスの補助グループ ID を設定する。 適切な特権 (Linux では B<CAP_SETGID> ケーパビリティ (capability)) が必要である。 I<size> 引き数には、 I<list> により参照されるバッファに格納された補助グループ ID の数を指定する。"
4312
4313 #. type: Plain text
4314 #: build/C/man2/getgroups.2:99
4315 msgid "On success, B<getgroups>()  returns the number of supplementary group IDs.  On error, -1 is returned, and I<errno> is set appropriately."
4316 msgstr "B<getgroups>()  は、成功すると補助グループ ID の数を返す。 エラーの場合 -1 を返し、 I<errno> を適切に設定する。"
4317
4318 #. type: Plain text
4319 #: build/C/man2/getgroups.2:106
4320 msgid "On success, B<setgroups>()  returns 0.  On error, -1 is returned, and I<errno> is set appropriately."
4321 msgstr "B<setgroups>()  は、成功すると 0 を返す。 エラーの場合 -1 を返し、 I<errno> を適切に設定する。"
4322
4323 #. type: Plain text
4324 #: build/C/man2/getgroups.2:111
4325 msgid "I<list> has an invalid address."
4326 msgstr "I<list> が不正なアドレスである。"
4327
4328 #. type: Plain text
4329 #: build/C/man2/getgroups.2:114
4330 msgid "B<getgroups>()  can additionally fail with the following error:"
4331 msgstr "B<getgroups>()  は、上記に加えて以下のエラーで失敗する可能性がある。"
4332
4333 #. type: Plain text
4334 #: build/C/man2/getgroups.2:118
4335 msgid "I<size> is less than the number of supplementary group IDs, but is not zero."
4336 msgstr "I<size> が補助グループ ID の数より小さいが 0 でない。"
4337
4338 #. type: Plain text
4339 #: build/C/man2/getgroups.2:121
4340 msgid "B<setgroups>()  can additionally fail with the following errors:"
4341 msgstr "B<setgroups>()  は、上記に加えて以下のエラーで失敗する可能性がある。"
4342
4343 #. type: Plain text
4344 #: build/C/man2/getgroups.2:127
4345 msgid "I<size> is greater than B<NGROUPS_MAX> (32 before Linux 2.6.4; 65536 since Linux 2.6.4)."
4346 msgstr "I<size> が B<NGROUPS_MAX> より大きい (B<NGROUPS_MAX> は Linux 2.6.4 より前では 32、Linux 2.6.4 以降では 65536)。"
4347
4348 #. type: Plain text
4349 #: build/C/man2/getgroups.2:133
4350 msgid "The calling process has insufficient privilege."
4351 msgstr "呼び出し元プロセスが十分な特権を持っていない。"
4352
4353 #. type: Plain text
4354 #: build/C/man2/getgroups.2:141
4355 msgid "SVr4, 4.3BSD.  The B<getgroups>()  function is in POSIX.1-2001.  Since B<setgroups>()  requires privilege, it is not covered by POSIX.1-2001."
4356 msgstr "SVr4, 4.3BSD.  B<getgroups>()  関数は POSIX.1-2001 に準拠している。 B<setgroups>()  は特権を必要とするため、POSIX.1-2001 に従っていない。"
4357
4358 #. type: Plain text
4359 #: build/C/man2/getgroups.2:153
4360 msgid "A process can have up to B<NGROUPS_MAX> supplementary group IDs in addition to the effective group ID.  The constant B<NGROUPS_MAX> is defined in I<E<lt>limits.hE<gt>>.  The set of supplementary group IDs is inherited from the parent process, and preserved across an B<execve>(2)."
4361 msgstr "プロセスは、実効グループ ID に加え、最大 B<NGROUPS_MAX> までの補助グループ ID を持つことができる。 定数 B<NGROUPS_MAX> は I<E<lt>limits.hE<gt>> で定義されている。 補助グループ ID の集合は親プロセスから継承され、 B<execve>(2)  の前後で保持される。"
4362
4363 #. type: Plain text
4364 #: build/C/man2/getgroups.2:156
4365 msgid "The maximum number of supplementary group IDs can be found at run time using B<sysconf>(3):"
4366 msgstr "補助グループ ID の最大数は、実行時に B<sysconf>(3)  を使って以下のようにして調べることができる:"
4367
4368 #. type: Plain text
4369 #: build/C/man2/getgroups.2:160
4370 #, no-wrap
4371 msgid ""
4372 "    long ngroups_max;\n"
4373 "    ngroups_max = sysconf(_SC_NGROUPS_MAX);\n"
4374 msgstr ""
4375 "    long ngroups_max;\n"
4376 "    ngroups_max = sysconf(_SC_NGROUPS_MAX);\n"
4377
4378 #. type: Plain text
4379 #: build/C/man2/getgroups.2:168
4380 msgid "The maximum return value of B<getgroups>()  cannot be larger than one more than this value.  Since Linux 2.6.4, the maximum number of supplementary group IDs is also exposed via the Linux-specific read-only file, I</proc/sys/kernel/ngroups_max>."
4381 msgstr "B<getgroups>() の返り値の最大値は、この値より大きくなることはない。 Linux 2.6.4 以降では、補助グループ ID の最大数も Linux 固有の読み込み専用のファイル I</proc/sys/kernel/ngroups_max> 経由で公開されている。"
4382
4383 #. type: Plain text
4384 #: build/C/man2/getgroups.2:178
4385 msgid "The original Linux B<getgroups>()  system call supported only 16-bit group IDs.  Subsequently, Linux 2.4 added B<getgroups32>(), supporting 32-bit IDs.  The glibc B<getgroups>()  wrapper function transparently deals with the variation across kernel versions."
4386 msgstr ""
4387 "元々の Linux の B<getgroups>() システムコールは 16 ビットのグループ ID だけ\n"
4388 "に対応していた。その後、Linux 2.4 で、32 ビットの ID に対応した\n"
4389 "B<getgroups>() が追加された。glibc の B<getgroups> のラッパー関数はカーネル\n"
4390 "バージョンによるこの違いを吸収している。"
4391
4392 #. type: Plain text
4393 #: build/C/man2/getgroups.2:186
4394 msgid "B<getgid>(2), B<setgid>(2), B<getgrouplist>(3), B<group_member>(3), B<initgroups>(3), B<capabilities>(7), B<credentials>(7)"
4395 msgstr "B<getgid>(2), B<setgid>(2), B<getgrouplist>(3), B<group_member>(3), B<initgroups>(3), B<capabilities>(7), B<credentials>(7)"
4396
4397 #. type: TH
4398 #: build/C/man2/getpid.2:25
4399 #, no-wrap
4400 msgid "GETPID"
4401 msgstr "GETPID"
4402
4403 #. type: Plain text
4404 #: build/C/man2/getpid.2:28
4405 msgid "getpid, getppid - get process identification"
4406 msgstr "getpid, getppid - プロセス ID を得る"
4407
4408 #. type: Plain text
4409 #: build/C/man2/getpid.2:34
4410 msgid "B<pid_t getpid(void);>"
4411 msgstr "B<pid_t getpid(void);>"
4412
4413 #. type: Plain text
4414 #: build/C/man2/getpid.2:36
4415 msgid "B<pid_t getppid(void);>"
4416 msgstr "B<pid_t getppid(void);>"
4417
4418 #. type: Plain text
4419 #: build/C/man2/getpid.2:41
4420 msgid "B<getpid>()  returns the process ID of the calling process.  (This is often used by routines that generate unique temporary filenames.)"
4421 msgstr "B<getpid>()  は呼び出し元のプロセスのプロセス ID を返す。(テンポラリ用のファイル名として 他と重ならない名前を生成するルーチンでしばしば使用される。)"
4422
4423 #. type: Plain text
4424 #: build/C/man2/getpid.2:44
4425 msgid "B<getppid>()  returns the process ID of the parent of the calling process."
4426 msgstr "B<getppid>()  は呼び出し元のプロセスの親プロセスのプロセス ID を返す。"
4427
4428 #. type: Plain text
4429 #: build/C/man2/getpid.2:48
4430 msgid "POSIX.1-2001, 4.3BSD, SVr4."
4431 msgstr "POSIX.1-2001, 4.3BSD, SVr4."
4432
4433 #.  The following program demonstrates this "feature":
4434 #.  #define _GNU_SOURCE
4435 #.  #include <sys/syscall.h>
4436 #.  #include <sys/wait.h>
4437 #.  #include <stdio.h>
4438 #.  #include <stdlib.h>
4439 #.  #include <unistd.h>
4440 #.  int
4441 #.  main(int argc, char *argv[])
4442 #.  {
4443 #.     /* The following statement fills the getpid() cache */
4444 #.     printf("parent PID = %ld
4445 #. ", (long) getpid());
4446 #.     if (syscall(SYS_fork) == 0) {
4447 #.         if (getpid() != syscall(SYS_getpid))
4448 #.             printf("child getpid() mismatch: getpid()=%ld; "
4449 #.                     "syscall(SYS_getpid)=%ld
4450 #. ",
4451 #.                     (long) getpid(), (long) syscall(SYS_getpid));
4452 #.         exit(EXIT_SUCCESS);
4453 #.     }
4454 #.     wait(NULL);
4455 #. }
4456 #. type: Plain text
4457 #: build/C/man2/getpid.2:100
4458 msgid "Since glibc version 2.3.4, the glibc wrapper function for B<getpid>()  caches PIDs, so as to avoid additional system calls when a process calls B<getpid>()  repeatedly.  Normally this caching is invisible, but its correct operation relies on support in the wrapper functions for B<fork>(2), B<vfork>(2), and B<clone>(2): if an application bypasses the glibc wrappers for these system calls by using B<syscall>(2), then a call to B<getpid>()  in the child will return the wrong value (to be precise: it will return the PID of the parent process).  See also B<clone>(2)  for discussion of a case where B<getpid>()  may return the wrong value even when invoking B<clone>(2)  via the glibc wrapper function."
4459 msgstr "glibc バージョン 2.3.4 以降では、 glibc の B<getpid>()  のラッパー関数は PID をキャッシュする。 これは、プロセスが繰り返し B<getpid>()  を呼び出した場合にその都度システムコールを呼ぶのを避けるためである。 通常は、このキャッシュ処理が見えることはないが、 キャッシュ処理が正しく働くためには B<fork>(2), B<vfork>(2), B<clone>(2)  のラッパー関数でのサポートが必要である。 アプリケーションがこれらのシステムコールを呼び出す際に、 glibc のラッパー関数を経由せずに B<syscall>(2)  を使った場合には、子プロセスで B<getpid>()  を呼び出すと間違った値が返ることだろう (正確にいうと、親プロセスの PID が返される)。 B<clone>(2)  を glibc のラッパー関数経由で起動した際にも B<getpid>()  が間違った値を返す場合があり、これに関する議論は B<clone>(2)  も参照してほしい。"
4460
4461 #. type: Plain text
4462 #: build/C/man2/getpid.2:111
4463 msgid "B<clone>(2), B<fork>(2), B<kill>(2), B<exec>(3), B<mkstemp>(3), B<tempnam>(3), B<tmpfile>(3), B<tmpnam>(3), B<credentials>(7), B<pid_namespaces>(7)"
4464 msgstr "B<clone>(2), B<fork>(2), B<kill>(2), B<exec>(3), B<mkstemp>(3), B<tempnam>(3), B<tmpfile>(3), B<tmpnam>(3), B<credentials>(7), B<pid_namespaces>(7)"
4465
4466 #. type: TH
4467 #: build/C/man2/getpriority.2:45
4468 #, no-wrap
4469 msgid "GETPRIORITY"
4470 msgstr "GETPRIORITY"
4471
4472 #. type: Plain text
4473 #: build/C/man2/getpriority.2:48
4474 msgid "getpriority, setpriority - get/set program scheduling priority"
4475 msgstr "getpriority, setpriority - プログラムのスケジューリングの優先度を取得/設定する"
4476
4477 #. type: Plain text
4478 #: build/C/man2/getpriority.2:50 build/C/man2/getrlimit.2:69
4479 #: build/C/man2/getrusage.2:44
4480 msgid "B<#include E<lt>sys/time.hE<gt>>"
4481 msgstr "B<#include E<lt>sys/time.hE<gt>>"
4482
4483 #. type: Plain text
4484 #: build/C/man2/getpriority.2:52 build/C/man2/getrlimit.2:71
4485 #: build/C/man2/getrusage.2:46
4486 msgid "B<#include E<lt>sys/resource.hE<gt>>"
4487 msgstr "B<#include E<lt>sys/resource.hE<gt>>"
4488
4489 #. type: Plain text
4490 #: build/C/man2/getpriority.2:54
4491 msgid "B<int getpriority(int >I<which>B<, id_t >I<who>B<);>"
4492 msgstr "B<int getpriority(int >I<which>B<, id_t >I<who>B<);>"
4493
4494 #. type: Plain text
4495 #: build/C/man2/getpriority.2:56
4496 msgid "B<int setpriority(int >I<which>B<, id_t >I<who>B<, int >I<prio>B<);>"
4497 msgstr "B<int setpriority(int >I<which>B<, id_t >I<who>B<, int >I<prio>B<);>"
4498
4499 #. type: Plain text
4500 #: build/C/man2/getpriority.2:67
4501 msgid "The scheduling priority of the process, process group, or user, as indicated by I<which> and I<who> is obtained with the B<getpriority>()  call and set with the B<setpriority>()  call."
4502 msgstr "システムコール B<getpriority>()  や B<setpriority>()  は、 I<which> と I<who> で指定されたプロセス、プロセスグループ、ユーザーの スケジューリング優先度 (scheduling priority) の 取得や設定をそれぞれ行う。"
4503
4504 #. type: Plain text
4505 #: build/C/man2/getpriority.2:94
4506 msgid "The value I<which> is one of B<PRIO_PROCESS>, B<PRIO_PGRP>, or B<PRIO_USER>, and I<who> is interpreted relative to I<which> (a process identifier for B<PRIO_PROCESS>, process group identifier for B<PRIO_PGRP>, and a user ID for B<PRIO_USER>).  A zero value for I<who> denotes (respectively) the calling process, the process group of the calling process, or the real user ID of the calling process.  I<Prio> is a value in the range -20 to 19 (but see the Notes below).  The default priority is 0; lower priorities cause more favorable scheduling."
4507 msgstr "I<which> の値は B<PRIO_PROCESS>, B<PRIO_PGRP>, B<PRIO_USER>, のどれか一つで、 I<who> は I<which> に応じて解釈される (B<PRIO_PROCESS> だとプロセス識別子、 B<PRIO_PGRP> だとプロセスグループ識別子、 B<PRIO_USER> だと UID (ユーザID) と解釈される)。 I<who> がゼロならば、(それぞれ)呼び出したプロセス、 呼び出したプロセスのプロセスグループ、 呼び出したプロセスの実UID を意味する。 I<prio> は -20 から 19 の範囲の値で (但し以下の注意の項を参照のこと)、 デフォルトの優先度は 0 である; 小さな数字ほど、有利なスケジューリングとなる。"
4508
4509 #. type: Plain text
4510 #: build/C/man2/getpriority.2:104
4511 msgid "The B<getpriority>()  call returns the highest priority (lowest numerical value)  enjoyed by any of the specified processes.  The B<setpriority>()  call sets the priorities of all of the specified processes to the specified value.  Only the superuser may lower priorities."
4512 msgstr "B<getpriority>()  コールは指定したプロセスの中の最も高い優先度 (数値的には最小の値) を返す。 B<setpriority>()  コールは指定したプロセス全ての優先度を指定した値に設定する。 優先度を今より小さい値に設定できるのはスーパーユーザーだけである。"
4513
4514 #. type: Plain text
4515 #: build/C/man2/getpriority.2:117
4516 msgid "Since B<getpriority>()  can legitimately return the value -1, it is necessary to clear the external variable I<errno> prior to the call, then check it afterward to determine if -1 is an error or a legitimate value.  The B<setpriority>()  call returns 0 if there is no error, or -1 if there is."
4517 msgstr "B<getpriority>()  は成功した場合にも -1 の値を返す可能性があるので、 呼び出しの前に外部変数の I<errno> をクリアし、呼び出しの後に返り値の -1 が正当な値か エラーかを判別する必要がある。 B<setpriority>()  コールはエラーがなければ 0 を返し、エラーがあれば -1 を返す。"
4518
4519 #. type: Plain text
4520 #: build/C/man2/getpriority.2:126
4521 msgid "I<which> was not one of B<PRIO_PROCESS>, B<PRIO_PGRP>, or B<PRIO_USER>."
4522 msgstr "I<which> が B<PRIO_PROCESS>, B<PRIO_PGRP>, B<PRIO_USER> のいずれでもない。"
4523
4524 #. type: Plain text
4525 #: build/C/man2/getpriority.2:133
4526 msgid "No process was located using the I<which> and I<who> values specified."
4527 msgstr "I<which> と I<who> で指定されたプロセスが存在しない。"
4528
4529 #. type: Plain text
4530 #: build/C/man2/getpriority.2:137
4531 msgid "In addition to the errors indicated above, B<setpriority>()  may fail if:"
4532 msgstr "上記のものに加えて B<setpriority>()  では以下のエラーがある:"
4533
4534 #. type: Plain text
4535 #: build/C/man2/getpriority.2:149
4536 msgid "The caller attempted to lower a process priority, but did not have the required privilege (on Linux: did not have the B<CAP_SYS_NICE> capability).  Since Linux 2.6.12, this error occurs only if the caller attempts to set a process priority outside the range of the B<RLIMIT_NICE> soft resource limit of the target process; see B<getrlimit>(2)  for details."
4537 msgstr "呼び出し元がプロセスの優先度を下げようとしたが、必要な特権を 持っていなかった (Linux の場合、 B<CAP_SYS_NICE> ケーパビリティがなかった)。 Linux 2.6.12 以降では、呼び出し元が、あるプロセスの優先度を、 変更対象のプロセスのリソース B<RLIMIT_NICE> のソフトリミットの範囲外に設定しようとした場合にのみ、 このエラーが発生する。詳細は B<getrlimit>(2)  を参照。"
4538
4539 #. type: Plain text
4540 #: build/C/man2/getpriority.2:157
4541 msgid "A process was located, but its effective user ID did not match either the effective or the real user ID of the caller, and was not privileged (on Linux: did not have the B<CAP_SYS_NICE> capability).  But see NOTES below."
4542 msgstr "プロセスは見つかったが、そのプロセスの実効 (effective) UID が 呼び出し元の実効UID にも実 (real) UID にも一致せず、 呼び出し元が特権も持っていなかった (Linux の場合、 B<CAP_SYS_NICE> ケーパビリティがなかった)。 以下の「注意」も参照のこと。"
4543
4544 #. type: Plain text
4545 #: build/C/man2/getpriority.2:160
4546 msgid "SVr4, 4.4BSD (these function calls first appeared in 4.2BSD), POSIX.1-2001."
4547 msgstr "SVr4, 4.4BSD (これらの関数は 4.2BSD で最初に登場した), POSIX.1-2001."
4548
4549 #. type: Plain text
4550 #: build/C/man2/getpriority.2:166
4551 msgid "A child created by B<fork>(2)  inherits its parent's nice value.  The nice value is preserved across B<execve>(2)."
4552 msgstr "B<fork>(2)  で作成された子プロセスは、 親プロセスの nice 値を継承する。 B<execve>(2)  の前後で nice 値は保存される。"
4553
4554 #. type: Plain text
4555 #: build/C/man2/getpriority.2:177
4556 msgid "The degree to which their relative nice value affects the scheduling of processes varies across UNIX systems, and, on Linux, across kernel versions.  Starting with kernel 2.6.23, Linux adopted an algorithm that causes relative differences in nice values to have a much stronger effect.  This causes very low nice values (+19) to truly provide little CPU to a process whenever there is any other higher priority load on the system, and makes high nice values (-20) deliver most of the CPU to applications that require it (e.g., some audio applications)."
4557 msgstr "相対的な nice 値の違いがプロセス間のスケジューリングにどの程度影響を与えるか は、UNIX システム間で異なり、Linux ではカーネルバージョンにより異なる。 Linux は、カーネル 2.6.23 以降で、nice 値の相対的な違いが、非常に強い影響を 与えるアルゴリズムを採用した。このアルゴリズムでは、 他に優先度の高いものがシステムに存在する時には、 非常に低い nice 値 (+19) ではプロセスに本当にほとんど CPU が割り当てられない。 また、高い nice 値 (-20) では CPU を必要とするアプリケーション (例えば オーディオアプリケーション) に CPU のほとんどが割り当てられる。"
4558
4559 #. type: Plain text
4560 #: build/C/man2/getpriority.2:192
4561 msgid "The details on the condition for B<EPERM> depend on the system.  The above description is what POSIX.1-2001 says, and seems to be followed on all System\\ V-like systems.  Linux kernels before 2.6.12 required the real or effective user ID of the caller to match the real user of the process I<who> (instead of its effective user ID).  Linux 2.6.12 and later require the effective user ID of the caller to match the real or effective user ID of the process I<who>.  All BSD-like systems (SunOS 4.1.3, Ultrix 4.2, 4.3BSD, FreeBSD 4.3, OpenBSD-2.5, ...) behave in the same manner as Linux 2.6.12 and later."
4562 msgstr "B<EPERM> が発生する条件の詳細はシステムに依存する。 上記の説明は POSIX.1-2001 のものであり、全ての System\\ V 風システムは これに従っているようである。 2.6.12 より前の Linux カーネルでは、呼び出し元の実 UID または 実効 UID がプロセス I<who> の (実効 UID でなく)  実 UID に一致する必要がある。 Linux 2.6.12 以降では、呼び出し元の実行 UID がプロセス I<who> の実 UID か実効 UID のいずれかと一致する必要がある。 全ての BSD 風システム (SunOS 4.1.3, Ultrix 4.2, 4.3BSD, FreeBSD 4.3, OpenBSD-2.5等) は、 Linux 2.6.12 以降と同じ動作をする。"
4563
4564 #. type: Plain text
4565 #: build/C/man2/getpriority.2:197
4566 msgid "The actual priority range varies between kernel versions.  Linux before 1.3.36 had -infinity..15.  Since kernel 1.3.43, Linux has the range -20..19.  On some other systems, the range of nice values is -20..20."
4567 msgstr "実際の優先度の範囲はカーネルのバージョンにより異なる。 バージョン 1.3.36 より前の Linux では -infinity(マイナス無限大)..15 である。 カーネル 1.3.43 以降の Linux では、 -20..19 である。 他のいくつかのシステムでは、この範囲が -20..20 である。"
4568
4569 #. type: Plain text
4570 #: build/C/man2/getpriority.2:210
4571 msgid "Including I<E<lt>sys/time.hE<gt>> is not required these days, but increases portability.  (Indeed, I<E<lt>sys/resource.hE<gt>> defines the I<rusage> structure with fields of type I<struct timeval> defined in I<E<lt>sys/time.hE<gt>>.)"
4572 msgstr "現在では I<E<lt>sys/time.hE<gt>> をインクルードする必要はないが、インクルードすれば移植性を高めることができる (実際には I<E<lt>sys/resource.hE<gt>> で I<rusage> 構造体が定義されているが、そのフィールドで使用されている I<struct timeval> 型は I<E<lt>sys/time.hE<gt>> で定義されている)。"
4573
4574 #. type: SS
4575 #: build/C/man2/getpriority.2:210 build/C/man2/seteuid.2:132
4576 #, no-wrap
4577 msgid "C library/kernel ABI differences"
4578 msgstr "C ライブラリとカーネル ABI の違い"
4579
4580 #. type: Plain text
4581 #: build/C/man2/getpriority.2:225
4582 msgid "Within the kernel, nice values are actually represented using the range 40..1 (since negative numbers are error codes) and these are the values employed by the B<setpriority>()  and B<getpriority>()  system calls.  The glibc wrapper functions for these system calls handle the translations between the user-land and kernel representations of the nice value according to the formula I<unice\\ =\\ 20\\ -\\ knice>.  (Thus, the kernels 40..1 range corresponds to the range -20..19 as seen by user space.)"
4583 msgstr "カーネル内部では、nice 値は実際には 40 〜 1 の範囲を使って 表現されており (負の値はエラーコードとなるため)、こちらの値が システムコール B<setpriority>()  と B<getpriority>()  で使用されている。 glibc のこれらのシステムコールのラッパー関数において、nice 値の ユーザ領域 (user-land) とカーネル表現の間の変換が行われる。 変換式は I<unice\\ =\\ 20\\ -\\ knice> となる。 (したがって、カーネルの 40..1 の範囲はユーザー空間で見える -20..19 の範囲に対応する。)"
4584
4585 #. type: Plain text
4586 #: build/C/man2/getpriority.2:232
4587 msgid "According to POSIX, the nice value is a per-process setting.  However, under the current Linux/NPTL implementation of POSIX threads, the nice value is a per-thread attribute: different threads in the same process can have different nice values.  Portable applications should avoid relying on the Linux behavior, which may be made standards conformant in the future."
4588 msgstr "POSIX では nice 値はプロセス単位の設定となっている。 一方、 現在の POSIX スレッドの Linux/NPTL 実装では、 nice 値はスレッド単位の属性である。 同じプロセスの別々のスレッドが異なる nice 値を持つ場合がある。 移植性が必要なアプリケーションではこの Linux の動作を前提するのは避けるべきである。 Linux の動作は将来標準に準拠した動作になるかもしれない。"
4589
4590 #. type: Plain text
4591 #: build/C/man2/getpriority.2:238
4592 msgid "B<nice>(1), B<renice>(1), B<fork>(2), B<capabilities>(7), B<sched>(7)"
4593 msgstr "B<nice>(1), B<renice>(1), B<fork>(2), B<capabilities>(7), B<sched>(7)"
4594
4595 #. type: Plain text
4596 #: build/C/man2/getpriority.2:241
4597 msgid "I<Documentation/scheduler/sched-nice-design.txt> in the Linux kernel source tree (since Linux 2.6.23)"
4598 msgstr "Linux カーネルのソースツリー内の I<Documentation/scheduler/sched-nice-design.txt> (Linux 2.6.23 以降)"
4599
4600 #. type: TH
4601 #: build/C/man2/getresuid.2:28
4602 #, no-wrap
4603 msgid "GETRESUID"
4604 msgstr "GETRESUID"
4605
4606 #. type: Plain text
4607 #: build/C/man2/getresuid.2:31
4608 msgid "getresuid, getresgid - get real, effective and saved user/group IDs"
4609 msgstr "getresuid, getresgid - 実、実効、保存、ユーザー ID / グループ ID を取得する"
4610
4611 #. type: Plain text
4612 #: build/C/man2/getresuid.2:33 build/C/man2/setresuid.2:31
4613 msgid "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */"
4614 msgstr "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */"
4615
4616 #. type: Plain text
4617 #: build/C/man2/getresuid.2:37
4618 msgid "B<int getresuid(uid_t *>I<ruid>B<, uid_t *>I<euid>B<, uid_t *>I<suid>B<);>"
4619 msgstr "B<int getresuid(uid_t *>I<ruid>B<, uid_t *>I<euid>B<, uid_t *>I<suid>B<);>"
4620
4621 #. type: Plain text
4622 #: build/C/man2/getresuid.2:39
4623 msgid "B<int getresgid(gid_t *>I<rgid>B<, gid_t *>I<egid>B<, gid_t *>I<sgid>B<);>"
4624 msgstr "B<int getresgid(gid_t *>I<rgid>B<, gid_t *>I<egid>B<, gid_t *>I<sgid>B<);>"
4625
4626 #. type: Plain text
4627 #: build/C/man2/getresuid.2:50
4628 msgid "B<getresuid>()  returns the real UID, the effective UID, and the saved set-user-ID of the calling process, in the arguments I<ruid>, I<euid>, and I<suid>, respectively.  B<getresgid>()  performs the analogous task for the process's group IDs."
4629 msgstr "B<getresuid>()  は、呼び出したプロセスの実 (real) UID、実効 (effective) UID、 保存 (saved) set-user-ID (B<getresgid> の場合はグループ ID) を、 それぞれ引き数 I<ruid>, I<euid>, I<suid> に格納して返す。 B<getresgid>()  は、呼び出したプロセスのグループ ID について同様の処理を行う。"
4630
4631 #. type: Plain text
4632 #: build/C/man2/getresuid.2:60
4633 msgid "One of the arguments specified an address outside the calling program's address space."
4634 msgstr "指定した引き数のどれかが、呼び出したプログラムのアドレス空間の外の アドレスである。"
4635
4636 #. type: Plain text
4637 #: build/C/man2/getresuid.2:62
4638 msgid "These system calls appeared on Linux starting with kernel 2.1.44."
4639 msgstr "これらのシステムコールはカーネル 2.1.44 から Linux に登場した。"
4640
4641 #. type: Plain text
4642 #: build/C/man2/getresuid.2:67
4643 msgid "The prototypes are given by glibc since version 2.3.2, provided B<_GNU_SOURCE> is defined."
4644 msgstr "プロトタイプ宣言は 2.3.2 以降の glibc では B<_GNU_SOURCE> を定義していると得られる。"
4645
4646 #. type: Plain text
4647 #: build/C/man2/getresuid.2:70 build/C/man2/setresuid.2:112
4648 msgid "These calls are nonstandard; they also appear on HP-UX and some of the BSDs."
4649 msgstr "これらのコールは非標準である。 HP-UX や BSD 系のいくつかにも存在する。"
4650
4651 #. type: Plain text
4652 #: build/C/man2/getresuid.2:86
4653 msgid "The original Linux B<getresuid>()  and B<getresgid>()  system calls supported only 16-bit user and group IDs.  Subsequently, Linux 2.4 added B<getresuid32>()  and B<getresgid32>(), supporting 32-bit IDs.  The glibc B<getresuid>()  and B<getresgid>()  wrapper functions transparently deal with the variations across kernel versions."
4654 msgstr ""
4655 "元々の Linux の B<getresuid>() と B<getresgid>() システムコールは\n"
4656 "16 ビットのグループ ID だけに対応していた。\n"
4657 "その後、Linux 2.4 で、32 ビットの ID に対応した\n"
4658 "B<getresuid32>() と B<getresgid32>() が追加された。\n"
4659 "glibc の B<getresuid>() と B<getresgid>() のラッパー関数は\n"
4660 "カーネルバージョンによるこの違いを吸収している。"
4661
4662 #. type: Plain text
4663 #: build/C/man2/getresuid.2:92
4664 msgid "B<getuid>(2), B<setresuid>(2), B<setreuid>(2), B<setuid>(2), B<credentials>(7)"
4665 msgstr "B<getuid>(2), B<setresuid>(2), B<setreuid>(2), B<setuid>(2), B<credentials>(7)"
4666
4667 #. type: TH
4668 #: build/C/man2/getrlimit.2:64
4669 #, no-wrap
4670 msgid "GETRLIMIT"
4671 msgstr "GETRLIMIT"
4672
4673 #. type: TH
4674 #: build/C/man2/getrlimit.2:64
4675 #, no-wrap
4676 msgid "2015-01-22"
4677 msgstr "2015-01-22"
4678
4679 #. type: Plain text
4680 #: build/C/man2/getrlimit.2:67
4681 msgid "getrlimit, setrlimit, prlimit - get/set resource limits"
4682 msgstr "getrlimit, setrlimit, prlimit - 資源の制限を取得/設定する"
4683
4684 #. type: Plain text
4685 #: build/C/man2/getrlimit.2:73
4686 msgid "B<int getrlimit(int >I<resource>B<, struct rlimit *>I<rlim>B<);>"
4687 msgstr "B<int getrlimit(int >I<resource>B<, struct rlimit *>I<rlim>B<);>"
4688
4689 #. type: Plain text
4690 #: build/C/man2/getrlimit.2:75
4691 msgid "B<int setrlimit(int >I<resource>B<, const struct rlimit *>I<rlim>B<);>"
4692 msgstr "B<int setrlimit(int >I<resource>B<, const struct rlimit *>I<rlim>B<);>"
4693
4694 #. type: Plain text
4695 #: build/C/man2/getrlimit.2:78
4696 msgid "B<int prlimit(pid_t >I<pid>B<, int >I<resource>B<, const struct rlimit *>I<new_limit>B<,>"
4697 msgstr "B<int prlimit(pid_t >I<pid>B<, int >I<resource>B<, const struct rlimit *>I<new_limit>B<,>"
4698
4699 #. type: Plain text
4700 #: build/C/man2/getrlimit.2:80
4701 msgid "B< struct rlimit *>I<old_limit>B<);>"
4702 msgstr "B< struct rlimit *>I<old_limit>B<);>"
4703
4704 #. type: Plain text
4705 #: build/C/man2/getrlimit.2:88
4706 msgid "B<prlimit>(): _GNU_SOURCE && _FILE_OFFSET_BITS == 64"
4707 msgstr "B<prlimit>(): _GNU_SOURCE && _FILE_OFFSET_BITS == 64"
4708
4709 #. type: Plain text
4710 #: build/C/man2/getrlimit.2:97
4711 msgid "The B<getrlimit>()  and B<setrlimit>()  system calls get and set resource limits respectively.  Each resource has an associated soft and hard limit, as defined by the I<rlimit> structure:"
4712 msgstr ""
4713 "B<getrlimit>() と B<setrlimit>() はそれぞれ資源 (resource) の制限\n"
4714 "(limit) の設定と取得を行う。 各リソースには、それに対応するソフトリミッ\n"
4715 "トとハードリミットがあり、 I<rlimit> 構造体で定義される:"
4716
4717 #. type: Plain text
4718 #: build/C/man2/getrlimit.2:104
4719 #, no-wrap
4720 msgid ""
4721 "struct rlimit {\n"
4722 "    rlim_t rlim_cur;  /* Soft limit */\n"
4723 "    rlim_t rlim_max;  /* Hard limit (ceiling for rlim_cur) */\n"
4724 "};\n"
4725 msgstr ""
4726 "struct rlimit {\n"
4727 "    rlim_t rlim_cur;  /* ソフトリミット */\n"
4728 "    rlim_t rlim_max;  /* ハードリミット\n"
4729 "                         (rlim_cur より小さくない) */\n"
4730 "};\n"
4731
4732 #. type: Plain text
4733 #: build/C/man2/getrlimit.2:115
4734 msgid "The soft limit is the value that the kernel enforces for the corresponding resource.  The hard limit acts as a ceiling for the soft limit: an unprivileged process may set only its soft limit to a value in the range from 0 up to the hard limit, and (irreversibly) lower its hard limit.  A privileged process (under Linux: one with the B<CAP_SYS_RESOURCE> capability) may make arbitrary changes to either limit value."
4735 msgstr "ソフトリミットは、カーネルが対応するリソースに対して課す制限値である。 ハードリミットはソフトリミットの上限として働く。 特権を持たないプロセスは、ソフトリミットの値を 0 からハードリミットの範囲に設定することと、 ハードリミットを下げることのみができる (一度下げたハードリミットは上げられない)。 特権プロセス (Linux では B<CAP_SYS_RESOURCE> ケーパビリティ (capability) を持つプロセス) は ソフトリミットとハードリミットを自由に変更できる。"
4736
4737 #. type: Plain text
4738 #: build/C/man2/getrlimit.2:122
4739 msgid "The value B<RLIM_INFINITY> denotes no limit on a resource (both in the structure returned by B<getrlimit>()  and in the structure passed to B<setrlimit>())."
4740 msgstr "値 B<RLIM_INFINITY> はリソースに制限がないことを表す (この値は B<getrlimit>()  が返す構造体と B<setrlimit>()  に渡す構造体の両方で使用される)。"
4741
4742 #. type: Plain text
4743 #: build/C/man2/getrlimit.2:126
4744 msgid "The I<resource> argument must be one of:"
4745 msgstr "I<resource> 引き数は次のいずれか 1 つである。"
4746
4747 #. type: TP
4748 #: build/C/man2/getrlimit.2:126
4749 #, no-wrap
4750 msgid "B<RLIMIT_AS>"
4751 msgstr "B<RLIMIT_AS>"
4752
4753 #.  since 2.0.27 / 2.1.12
4754 #. type: Plain text
4755 #: build/C/man2/getrlimit.2:146
4756 msgid "The maximum size of the process's virtual memory (address space) in bytes.  This limit affects calls to B<brk>(2), B<mmap>(2), and B<mremap>(2), which fail with the error B<ENOMEM> upon exceeding this limit.  Also automatic stack expansion will fail (and generate a B<SIGSEGV> that kills the process if no alternate stack has been made available via B<sigaltstack>(2)).  Since the value is a I<long>, on machines with a 32-bit I<long> either this limit is at most 2 GiB, or this resource is unlimited."
4757 msgstr "プロセスの仮想メモリ (アドレス空間) の最大サイズ (バイト単位)。 この制限は B<brk>(2), B<mmap>(2), B<mremap>(2)  の呼び出しに影響し、この制限を超えた場合は エラー B<ENOMEM> で失敗する。 また自動的なスタック拡張にも失敗する (さらに B<sigaltstack>(2)  を使った代替スタックを利用可能にしていなかった場合には、 B<SIGSEGV> を生成してそのプロセスを kill する)。 この値は I<long> 型なので、32 ビットの I<long> 型を持つマシンでは、 この制限は最大で 2 GiB になるか、この資源が無制限になる。"
4758
4759 #. type: TP
4760 #: build/C/man2/getrlimit.2:146
4761 #, no-wrap
4762 msgid "B<RLIMIT_CORE>"
4763 msgstr "B<RLIMIT_CORE>"
4764
4765 #. type: Plain text
4766 #: build/C/man2/getrlimit.2:154
4767 msgid "Maximum size of a I<core> file (see B<core>(5)).  When 0 no core dump files are created.  When nonzero, larger dumps are truncated to this size."
4768 msgstr "I<core> ファイルの最大サイズ (B<core>(5) 参照)。 0 の場合、core ファイルは生成されない。 0 以外の場合、このサイズより大きいダンプは切り詰められる。"
4769
4770 #. type: TP
4771 #: build/C/man2/getrlimit.2:154
4772 #, no-wrap
4773 msgid "B<RLIMIT_CPU>"
4774 msgstr "B<RLIMIT_CPU>"
4775
4776 #. type: Plain text
4777 #: build/C/man2/getrlimit.2:174
4778 msgid "CPU time limit in seconds.  When the process reaches the soft limit, it is sent a B<SIGXCPU> signal.  The default action for this signal is to terminate the process.  However, the signal can be caught, and the handler can return control to the main program.  If the process continues to consume CPU time, it will be sent B<SIGXCPU> once per second until the hard limit is reached, at which time it is sent B<SIGKILL>.  (This latter point describes Linux behavior.  Implementations vary in how they treat processes which continue to consume CPU time after reaching the soft limit.  Portable applications that need to catch this signal should perform an orderly termination upon first receipt of B<SIGXCPU>.)"
4779 msgstr ""
4780 "CPU 時間の上限 (秒数)。プロセスがソフトリミットに達した場合に、\n"
4781 "B<SIGXCPU> シグナルを送る。このシグナルに対するデフォルトの動作は、\n"
4782 "プロセスの終了である。ただし、シグナルをキャッチして、ハンドラがメイン\n"
4783 "プログラムに制御を返すこともできる。プロセスが CPU 時間を使い続けた\n"
4784 "場合は、ハードリミットに達するまで 1 秒毎にプロセスに B<SIGXCPU> を送り、\n"
4785 "ハードリミットに達すると B<SIGKILL> を送る。\n"
4786 "(ソフトリミットを超過したときの動作は、 Linux における動作である。ソフ\n"
4787 "トリミットを超えて CPU 時間を使い続けるプロセスの扱い方についての実装は\n"
4788 "変化してきている。 このシグナルをキャッチする必要のある 移植性を考えた\n"
4789 "アプリケーションでは、 最初に B<SIGXCPU> を受け取った時点で正しく終了\n"
4790 "すべきである。)"
4791
4792 #. type: TP
4793 #: build/C/man2/getrlimit.2:174
4794 #, no-wrap
4795 msgid "B<RLIMIT_DATA>"
4796 msgstr "B<RLIMIT_DATA>"
4797
4798 #. type: Plain text
4799 #: build/C/man2/getrlimit.2:185
4800 msgid "The maximum size of the process's data segment (initialized data, uninitialized data, and heap).  This limit affects calls to B<brk>(2)  and B<sbrk>(2), which fail with the error B<ENOMEM> upon encountering the soft limit of this resource."
4801 msgstr "プロセスのデータセグメント (初期化されたデータ・初期化されていないデータ・ヒープ) の最大値。 このリミットは B<brk>(2)  と B<sbrk>(2)  の呼び出しに影響する。 これらの関数は、このリソースのソフトリミットに達すると、 エラー B<ENOMEM> で失敗する。"
4802
4803 #. type: TP
4804 #: build/C/man2/getrlimit.2:185
4805 #, no-wrap
4806 msgid "B<RLIMIT_FSIZE>"
4807 msgstr "B<RLIMIT_FSIZE>"
4808
4809 #. type: Plain text
4810 #: build/C/man2/getrlimit.2:197
4811 msgid "The maximum size of files that the process may create.  Attempts to extend a file beyond this limit result in delivery of a B<SIGXFSZ> signal.  By default, this signal terminates a process, but a process can catch this signal instead, in which case the relevant system call (e.g., B<write>(2), B<truncate>(2))  fails with the error B<EFBIG>."
4812 msgstr "プロセスが作成できるファイルサイズの最大値。 このサイズを超えてファイルを拡張すると、 B<SIGXFSZ> シグナルを送る。 デフォルトでは、このシグナルはプロセスを終了する。 プロセスをキャッチすることもできるが、 関連するシステムコール (B<write>(2), B<truncate>(2)  など) はエラー B<EFBIG> で失敗する。"
4813
4814 #. type: TP
4815 #: build/C/man2/getrlimit.2:197
4816 #, no-wrap
4817 msgid "B<RLIMIT_LOCKS> (Early Linux 2.4 only)"
4818 msgstr "B<RLIMIT_LOCKS> (初期の Linux 2.4 のみ)"
4819
4820 #.  to be precise: Linux 2.4.0-test9; no longer in 2.4.25 / 2.5.65
4821 #. type: Plain text
4822 #: build/C/man2/getrlimit.2:205
4823 msgid "A limit on the combined number of B<flock>(2)  locks and B<fcntl>(2)  leases that this process may establish."
4824 msgstr "このプロセスが実行できる B<flock>(2)  ロック数と B<fcntl>(2)  リース数の合計値を制限する。"
4825
4826 #. type: TP
4827 #: build/C/man2/getrlimit.2:205
4828 #, no-wrap
4829 msgid "B<RLIMIT_MEMLOCK>"
4830 msgstr "B<RLIMIT_MEMLOCK>"
4831
4832 #. type: Plain text
4833 #: build/C/man2/getrlimit.2:243
4834 msgid "The maximum number of bytes of memory that may be locked into RAM.  In effect this limit is rounded down to the nearest multiple of the system page size.  This limit affects B<mlock>(2)  and B<mlockall>(2)  and the B<mmap>(2)  B<MAP_LOCKED> operation.  Since Linux 2.6.9 it also affects the B<shmctl>(2)  B<SHM_LOCK> operation, where it sets a maximum on the total bytes in shared memory segments (see B<shmget>(2))  that may be locked by the real user ID of the calling process.  The B<shmctl>(2)  B<SHM_LOCK> locks are accounted for separately from the per-process memory locks established by B<mlock>(2), B<mlockall>(2), and B<mmap>(2)  B<MAP_LOCKED>; a process can lock bytes up to this limit in each of these two categories.  In Linux kernels before 2.6.9, this limit controlled the amount of memory that could be locked by a privileged process.  Since Linux 2.6.9, no limits are placed on the amount of memory that a privileged process may lock, and this limit instead governs the amount of memory that an unprivileged process may lock."
4835 msgstr "RAM 内にロックできるメモリの最大バイト数。 実際には、この制限はシステムページサイズの最も近い倍数に 切り捨てて丸められる。 この制限は B<mlock>(2), B<mlockall>(2), B<mmap>(2)  の B<MAP_LOCKED> 操作に影響する。 Linux 2.6.9 以降では B<shmctl>(2)  B<SHM_LOCK> 操作にも影響する。 この操作は呼び出し元プロセスの実 (real) ユーザー ID にロックされる 共有メモリセグメント (B<shmget>(2)  を参照) の合計バイト数の最大値を設定する。 B<shmctl>(2)  B<SHM_LOCK> によるロックは、 B<mlock>(2), B<mlockall>(2), B<mmap>(2)  の B<MAP_LOCKED> によって確立されるプロセス毎のメモリロックとは分けて数える。 1 つのプロセスはこの制限までのバイトをロックできる。 この制限には 2 つの種類がある。 2.6.9 より前の Linux カーネル では、 この制限は特権プロセスによってロックされるメモリの合計を制御していた。 Linux 2.6.9 以降では、特権プロセスがロックするメモリの合計に制限はなく、 代わりにこの制限は非特権プロセスがロックするメモリの合計に 適用されるようになった。"
4836
4837 #. type: TP
4838 #: build/C/man2/getrlimit.2:243
4839 #, no-wrap
4840 msgid "B<RLIMIT_MSGQUEUE> (since Linux 2.6.8)"
4841 msgstr "B<RLIMIT_MSGQUEUE> (Linux 2.6.8 以降)"
4842
4843 #. type: Plain text
4844 #: build/C/man2/getrlimit.2:251
4845 msgid "Specifies the limit on the number of bytes that can be allocated for POSIX message queues for the real user ID of the calling process.  This limit is enforced for B<mq_open>(3).  Each message queue that the user creates counts (until it is removed)  against this limit according to the formula:"
4846 msgstr "呼び出し元プロセスの実ユーザー ID に対して、 POSIX メッセージキューのために確保できるバイト数の制限を指定する。 この制限は B<mq_open>(3)  に対して適用される。 ユーザが作成した各々のメッセージキューのバイト数は 以下の式により計算され、(そのキューが削除されるまでの間)  この制限の計算対象に含められる。"
4847
4848 #. type: Plain text
4849 #: build/C/man2/getrlimit.2:260
4850 #, no-wrap
4851 msgid ""
4852 "    Since Linux 3.5:\n"
4853 "        bytes = attr.mq_maxmsg * sizeof(struct msg_msg) +\n"
4854 "                min(attr.mq_maxmsg, MQ_PRIO_MAX) *\n"
4855 "                      sizeof(struct posix_msg_tree_node)+\n"
4856 "                                /* For overhead */\n"
4857 "                attr.mq_maxmsg * attr.mq_msgsize;\n"
4858 "                                /* For message data */\n"
4859 msgstr ""
4860 "    Linux 3.5 以降:\n"
4861 "        bytes = attr.mq_maxmsg * sizeof(struct msg_msg) +\n"
4862 "                min(attr.mq_maxmsg, MQ_PRIO_MAX) *\n"
4863 "                      sizeof(struct posix_msg_tree_node)+\n"
4864 "                                /* オーバーヘッド分 */\n"
4865 "                attr.mq_maxmsg * attr.mq_msgsize;\n"
4866 "                                /* メッセージデータ分 */\n"
4867
4868 #. type: Plain text
4869 #: build/C/man2/getrlimit.2:266
4870 #, no-wrap
4871 msgid ""
4872 "    Linux 3.4 and earlier:\n"
4873 "        bytes = attr.mq_maxmsg * sizeof(struct msg_msg *) +\n"
4874 "                                /* For overhead */\n"
4875 "                attr.mq_maxmsg * attr.mq_msgsize;\n"
4876 "                                /* For message data */\n"
4877 msgstr ""
4878 "    Linux 3.4 以前:\n"
4879 "        bytes = attr.mq_maxmsg * sizeof(struct msg_msg *) +\n"
4880 "                                /* オーバーヘッド分 */\n"
4881 "                attr.mq_maxmsg * attr.mq_msgsize;\n"
4882 "                                /* メッセージデータ分 */\n"
4883
4884 #. type: Plain text
4885 #: build/C/man2/getrlimit.2:279
4886 msgid "where I<attr> is the I<mq_attr> structure specified as the fourth argument to B<mq_open>(3), and the I<msg_msg> and I<posix_msg_tree_node> structures are kernel-internal structures."
4887 msgstr "ここで I<attr> は I<mq_attr> 構造体であり、 B<mq_open>(3)  の第 4 引き数として指定される。 また、構造体 I<msg_msg> と I<posix_msg_tree_node> はカーネル内部の構造体である。"
4888
4889 #. type: Plain text
4890 #: build/C/man2/getrlimit.2:285
4891 msgid "The \"overhead\" addend in the formula accounts for overhead bytes required by the implementation and ensures that the user cannot create an unlimited number of zero-length messages (such messages nevertheless each consume some system memory for bookkeeping overhead)."
4892 msgstr "上記の式での「オーバーヘッド」加算分は、実装において必要となるオーバーヘッドを考慮したものである。 また、これにより、ユーザーが長さ 0 のメッセージを無制限に作れないことが保証される (このようなメッセージであっても、 記録のためのオーバーヘッドでシステムメモリを消費する)。"
4893
4894 #. type: TP
4895 #: build/C/man2/getrlimit.2:285
4896 #, no-wrap
4897 msgid "B<RLIMIT_NICE> (since Linux 2.6.12, but see BUGS below)"
4898 msgstr "B<RLIMIT_NICE> (Linux 2.6.12 以降, 下記の「バグ」の節も参照)"
4899
4900 #. type: Plain text
4901 #: build/C/man2/getrlimit.2:298
4902 msgid "Specifies a ceiling to which the process's nice value can be raised using B<setpriority>(2)  or B<nice>(2).  The actual ceiling for the nice value is calculated as I<20\\ -\\ rlim_cur>.  (This strangeness occurs because negative numbers cannot be specified as resource limit values, since they typically have special meanings.  For example, B<RLIM_INFINITY> typically is the same as -1.)"
4903 msgstr "B<setpriority>(2)  や B<nice>(2)  を使って引き上げられるプロセスの nice 値の上限を指定する。 nice 値の実際の上限は I<20\\ -\\ rlim_cur> で計算される (このような変な状況は、リソース制限値として負の数を指定できないため 発生する。通常、負の値は特別な意味を持っているからである。 例えば、通常は B<RLIM_INFINITY> の値は -1 である)。"
4904
4905 #. type: TP
4906 #: build/C/man2/getrlimit.2:298
4907 #, no-wrap
4908 msgid "B<RLIMIT_NOFILE>"
4909 msgstr "B<RLIMIT_NOFILE>"
4910
4911 #. type: Plain text
4912 #: build/C/man2/getrlimit.2:312
4913 msgid "Specifies a value one greater than the maximum file descriptor number that can be opened by this process.  Attempts (B<open>(2), B<pipe>(2), B<dup>(2), etc.)  to exceed this limit yield the error B<EMFILE>.  (Historically, this limit was named B<RLIMIT_OFILE> on BSD.)"
4914 msgstr "このプロセスがオープンできるファイルディスクリプタ数の最大値より 1 大きい値を指定する。 (B<open>(2), B<pipe>(2), B<dup>(2)  などにより) この上限を超えようとした場合、エラー B<EMFILE> が発生する (歴史的に、BSD ではこの上限は B<RLIMIT_OFILE> という名前となっている)。"
4915
4916 #. type: TP
4917 #: build/C/man2/getrlimit.2:312
4918 #, no-wrap
4919 msgid "B<RLIMIT_NPROC>"
4920 msgstr "B<RLIMIT_NPROC>"
4921
4922 #. type: Plain text
4923 #: build/C/man2/getrlimit.2:325
4924 msgid "The maximum number of processes (or, more precisely on Linux, threads)  that can be created for the real user ID of the calling process.  Upon encountering this limit, B<fork>(2)  fails with the error B<EAGAIN>.  This limit is not enforced for processes that have either the B<CAP_SYS_ADMIN> or the B<CAP_SYS_RESOURCE> capability."
4925 msgstr "呼び出したプロセスの実ユーザー ID で作成できる最大プロセス数 (より正確には Linux ではスレッド数)。 この上限に達すると、 B<fork>(2)  はエラー B<EAGAIN> で失敗する。 この上限値は、ケーパビリティ B<CAP_SYS_ADMIN> か B<CAP_SYS_RESOURCE> のどちらかを持つプロセスには適用されない。"
4926
4927 #. type: TP
4928 #: build/C/man2/getrlimit.2:325
4929 #, no-wrap
4930 msgid "B<RLIMIT_RSS>"
4931 msgstr "B<RLIMIT_RSS>"
4932
4933 #.  As at kernel 2.6.12, this limit still does nothing in 2.6 though
4934 #.  talk of making it do something has surfaced from time to time in LKML
4935 #.        -- MTK, Jul 05
4936 #. type: Plain text
4937 #: build/C/man2/getrlimit.2:337
4938 msgid "Specifies the limit (in pages) of the process's resident set (the number of virtual pages resident in RAM).  This limit has effect only in Linux 2.4.x, x E<lt> 30, and there affects only calls to B<madvise>(2)  specifying B<MADV_WILLNEED>."
4939 msgstr "プロセスの resident set (RAM 上に存在する仮想ページの数) の 上限を (ページ数で) 指定する。 この制限は 2.4.30 より前でしか影響がなく、 B<madvise>(2)  に B<MADV_WILLNEED> を指定した関数コールにしか影響しない。"
4940
4941 #. type: TP
4942 #: build/C/man2/getrlimit.2:337
4943 #, no-wrap
4944 msgid "B<RLIMIT_RTPRIO> (since Linux 2.6.12, but see BUGS)"
4945 msgstr "B<RLIMIT_RTPRIO> (Linux 2.6.12 以降, バグの節も参照)"
4946
4947 #. type: Plain text
4948 #: build/C/man2/getrlimit.2:344
4949 msgid "Specifies a ceiling on the real-time priority that may be set for this process using B<sched_setscheduler>(2)  and B<sched_setparam>(2)."
4950 msgstr "B<sched_setscheduler>(2)  や B<sched_setparam>(2)  を使って設定できる、そのプロセスのリアルタイム優先度の上限を指定する。"
4951
4952 #. type: TP
4953 #: build/C/man2/getrlimit.2:344
4954 #, no-wrap
4955 msgid "B<RLIMIT_RTTIME> (since Linux 2.6.25)"
4956 msgstr "B<RLIMIT_RTTIME> (Linux 2.6.25 以降)"
4957
4958 #. type: Plain text
4959 #: build/C/man2/getrlimit.2:356
4960 msgid "Specifies a limit (in microseconds)  on the amount of CPU time that a process scheduled under a real-time scheduling policy may consume without making a blocking system call.  For the purpose of this limit, each time a process makes a blocking system call, the count of its consumed CPU time is reset to zero.  The CPU time count is not reset if the process continues trying to use the CPU but is preempted, its time slice expires, or it calls B<sched_yield>(2)."
4961 msgstr "リアルタイムスケジューリング方針でスケジューリングされるプロセスが ブロッキング型のシステムコールを呼び出さずに消費することのできる CPU 時間の合計についての上限を (マイクロ秒単位で) 指定する。 この上限の目的のため、プロセスがブロッキング型のシステムコールを 呼び出す度に、消費された CPU 時間のカウントは 0 にリセットされる。 プロセスが CPU を使い続けようとしたが他のプロセスに置き換えられた (preempted) 場合や、そのプロセスのタイムスライスが満了した場合、 そのプロセスが B<sched_yield>(2)  を呼び出した場合は、CPU 時間のカウントはリセットされない。"
4962
4963 #. type: Plain text
4964 #: build/C/man2/getrlimit.2:367
4965 msgid "Upon reaching the soft limit, the process is sent a B<SIGXCPU> signal.  If the process catches or ignores this signal and continues consuming CPU time, then B<SIGXCPU> will be generated once each second until the hard limit is reached, at which point the process is sent a B<SIGKILL> signal."
4966 msgstr "ソフトリミットに達すると、そのプロセスに B<SIGXCPU> シグナルが送られる。そのプロセスがこのシグナルを捕捉するか 無視して、CPU 時間を消費し続けた場合には、 ハードリミットに達するまで 1 秒に 1 回 B<SIGXCPU> が生成され続けることになる。 ハードリミットに達した時点で、そのプロセスには B<SIGKILL> シグナルが送られる。"
4967
4968 #. type: Plain text
4969 #: build/C/man2/getrlimit.2:370
4970 msgid "The intended use of this limit is to stop a runaway real-time process from locking up the system."
4971 msgstr "この上限を意図的に使用するのは、暴走したリアルタイムプロセスを 停止して、システムが動かなくなるのを避ける場合である。"
4972
4973 #. type: TP
4974 #: build/C/man2/getrlimit.2:370
4975 #, no-wrap
4976 msgid "B<RLIMIT_SIGPENDING> (since Linux 2.6.8)"
4977 msgstr "B<RLIMIT_SIGPENDING> (Linux 2.6.8 以降)"
4978
4979 #.  This replaces the /proc/sys/kernel/rtsig-max system-wide limit
4980 #.  that was present in kernels <= 2.6.7.  MTK Dec 04
4981 #. type: Plain text
4982 #: build/C/man2/getrlimit.2:384
4983 msgid "Specifies the limit on the number of signals that may be queued for the real user ID of the calling process.  Both standard and real-time signals are counted for the purpose of checking this limit.  However, the limit is enforced only for B<sigqueue>(3); it is always possible to use B<kill>(2)  to queue one instance of any of the signals that are not already queued to the process."
4984 msgstr ""
4985 "呼び出し元プロセスの実ユーザー ID に対して キューに入れられるシグナルの\n"
4986 "数の制限を指定する。この制限をチェックするため、標準シグナルとリアルタ\n"
4987 "イムシグナルの両方がカウントされる。しかし、この制限は B<sigqueue>(3)\n"
4988 "に対してのみ適用され、 B<kill>(2) 使うことで、そのプロセスに対してま\n"
4989 "だキューに入れられていない シグナルのインスタンスをキューに入れることが\n"
4990 "できる。"
4991
4992 #. type: TP
4993 #: build/C/man2/getrlimit.2:384
4994 #, no-wrap
4995 msgid "B<RLIMIT_STACK>"
4996 msgstr "B<RLIMIT_STACK>"
4997
4998 #. type: Plain text
4999 #: build/C/man2/getrlimit.2:392
5000 msgid "The maximum size of the process stack, in bytes.  Upon reaching this limit, a B<SIGSEGV> signal is generated.  To handle this signal, a process must employ an alternate signal stack (B<sigaltstack>(2))."
5001 msgstr "プロセススタックの最大サイズをバイト単位で指定する。 この上限に達すると、 B<SIGSEGV> シグナルが生成される。 このシグナルを扱うためには、 プロセスは代りのシグナルスタック (B<sigaltstack>(2))  を使用しなければならない。"
5002
5003 #. type: Plain text
5004 #: build/C/man2/getrlimit.2:397
5005 msgid "Since Linux 2.6.23, this limit also determines the amount of space used for the process's command-line arguments and environment variables; for details, see B<execve>(2)."
5006 msgstr "Linux 2.6.23 以降では、この制限はプロセスのコマンドライン引き数と環境変数 に使用される空間の合計サイズの上限の決定にも使用される。詳細については B<execve>(2)  を参照。"
5007
5008 #. type: SS
5009 #: build/C/man2/getrlimit.2:397
5010 #, no-wrap
5011 msgid "prlimit()"
5012 msgstr "prlimit()"
5013
5014 #.  commit c022a0acad534fd5f5d5f17280f6d4d135e74e81
5015 #.  Author: Jiri Slaby <jslaby@suse.cz>
5016 #.  Date:   Tue May 4 18:03:50 2010 +0200
5017 #.      rlimits: implement prlimit64 syscall
5018 #.  commit 6a1d5e2c85d06da35cdfd93f1a27675bfdc3ad8c
5019 #.  Author: Jiri Slaby <jslaby@suse.cz>
5020 #.  Date:   Wed Mar 24 17:06:58 2010 +0100
5021 #.      rlimits: add rlimit64 structure
5022 #. type: Plain text
5023 #: build/C/man2/getrlimit.2:417
5024 msgid "The Linux-specific B<prlimit>()  system call combines and extends the functionality of B<setrlimit>()  and B<getrlimit>().  It can be used to both set and get the resource limits of an arbitrary process."
5025 msgstr "Linux 固有の B<prlimit>() システムコールは、 B<setrlimit>() と B<getrlimit> の機能を合わせて拡張したものである。 このシステムコールを使って、任意のプロセスのリソース上限の設定と取得を行うことができる。"
5026
5027 #. type: Plain text
5028 #: build/C/man2/getrlimit.2:424
5029 msgid "The I<resource> argument has the same meaning as for B<setrlimit>()  and B<getrlimit>()."
5030 msgstr "I<resource> 引き数は B<setrlimit>() や B<getrlimit>() と同じ意味である。"
5031
5032 #. type: Plain text
5033 #: build/C/man2/getrlimit.2:442
5034 msgid "If the I<new_limit> argument is a not NULL, then the I<rlimit> structure to which it points is used to set new values for the soft and hard limits for I<resource>.  If the I<old_limit> argument is a not NULL, then a successful call to B<prlimit>()  places the previous soft and hard limits for I<resource> in the I<rlimit> structure pointed to by I<old_limit>."
5035 msgstr "I<new_limit> 引き数が NULL 以外の場合、 I<new_limit> が指す I<rlimit> 構造体を使って I<resource> のソフトリミットとハードリミットの新しい値が設定される。 I<old_limit> 引き数が NULL 以外の場合、 B<prlimit>() の呼び出しが成功すると、 I<resource> の直前のソフトリミットとハードリミットが I<old_limit> が指す I<rlimit> 構造体に格納される。"
5036
5037 #.  FIXME . this permission check is strange
5038 #.  Asked about this on LKML, 7 Nov 2010
5039 #.      "Inconsistent credential checking in prlimit() syscall"
5040 #. type: Plain text
5041 #: build/C/man2/getrlimit.2:461
5042 msgid "The I<pid> argument specifies the ID of the process on which the call is to operate.  If I<pid> is 0, then the call applies to the calling process.  To set or get the resources of a process other than itself, the caller must have the B<CAP_SYS_RESOURCE> capability, or the real, effective, and saved set user IDs of the target process must match the real user ID of the caller I<and> the real, effective, and saved set group IDs of the target process must match the real group ID of the caller."
5043 msgstr "I<pid> 引き数は呼び出しの操作対象となるプロセス ID を指定する。 I<pid> が 0 の場合、呼び出しは呼び出し元プロセスに対して適用される。 自分以外のプロセスのリソースの設定と取得を行うためには、 呼び出し元プロセスが B<CAP_SYS_RESOURCE> ケーパビリティを持っているか、 対象となるプロセスの実ユーザ ID、 実効ユーザ ID、 保存 set-user-ID が呼び出し元プロセスの実ユーザ ID と一致し、 かつ、 対象となるプロセスの実グループ ID、 実効グループ ID、 保存 set-group-ID が呼び出し元プロセスの実グループ ID と一致していなければならない。"
5044
5045 #. type: Plain text
5046 #: build/C/man2/getrlimit.2:466
5047 msgid "On success, these system calls return 0.  On error, -1 is returned, and I<errno> is set appropriately."
5048 msgstr ""
5049 "成功した場合、これらのシステムコールは 0 を返す。\n"
5050 "エラーの場合は -1 が返され、 I<errno> が適切に設定される。"
5051
5052 #. type: Plain text
5053 #: build/C/man2/getrlimit.2:471
5054 msgid "A pointer argument points to a location outside the accessible address space."
5055 msgstr "場所を指すポインタ引き数がアクセス可能なアドレス空間外を指している。"
5056
5057 #. type: Plain text
5058 #: build/C/man2/getrlimit.2:483
5059 msgid "The value specified in I<resource> is not valid; or, for B<setrlimit>()  or B<prlimit>(): I<rlim-E<gt>rlim_cur> was greater than I<rlim-E<gt>rlim_max>."
5060 msgstr ""
5061 "I<resource> で指定された値が有効でない。\n"
5062 "または、 B<setrlimit>() や B<prlimit>() で、\n"
5063 "I<rlim-E<gt>rlim_cur> が I<rlim-E<gt>rlim_max> よりも大きかった。"
5064
5065 #. type: Plain text
5066 #: build/C/man2/getrlimit.2:488
5067 msgid "An unprivileged process tried to raise the hard limit; the B<CAP_SYS_RESOURCE> capability is required to do this."
5068 msgstr "非特権プロセスがハードリミットを増やそうとした。 この操作には B<CAP_SYS_RESOURCE> ケーパビリティが必要である。"
5069
5070 #. type: Plain text
5071 #: build/C/man2/getrlimit.2:496
5072 msgid "The caller tried to increase the hard B<RLIMIT_NOFILE> limit above the maximum defined by I</proc/sys/fs/nr_open> (see B<proc>(5))"
5073 msgstr "呼び出し元がハードリミット B<RLIMIT_NOFILE> を I</proc/sys/fs/nr_open> (B<proc>(5) 参照) で定義される最大値より大きな値に増やそうとした。"
5074
5075 #. type: Plain text
5076 #: build/C/man2/getrlimit.2:502
5077 msgid "(B<prlimit>())  The calling process did not have permission to set limits for the process specified by I<pid>."
5078 msgstr "(B<prlimit>()) 呼び出し元のプロセスが I<pid> で指定されたプロセスの上限を設定する許可を持っていなかった。"
5079
5080 #. type: Plain text
5081 #: build/C/man2/getrlimit.2:506
5082 msgid "Could not find a process with the ID specified in I<pid>."
5083 msgstr "I<pid> で指定された ID のプロセスが見つからなかった。"
5084
5085 #. type: Plain text
5086 #: build/C/man2/getrlimit.2:511
5087 msgid "The B<prlimit>()  system call is available since Linux 2.6.36.  Library support is available since glibc 2.13."
5088 msgstr "B<prlimit>() システムコールは Linux 2.6.36 以降で利用できる。 ライブラリのサポートは glibc 2.13 以降で利用できる。"
5089
5090 #. type: Plain text
5091 #: build/C/man2/getrlimit.2:515
5092 msgid "B<getrlimit>(), B<setrlimit>(): SVr4, 4.3BSD, POSIX.1-2001."
5093 msgstr "B<getrlimit>(), B<setrlimit>(): SVr4, 4.3BSD, POSIX.1-2001."
5094
5095 #. type: Plain text
5096 #: build/C/man2/getrlimit.2:518
5097 msgid "B<prlimit>(): Linux-specific."
5098 msgstr "B<prlimit>(): Linux 固有。"
5099
5100 #. type: Plain text
5101 #: build/C/man2/getrlimit.2:534
5102 msgid "B<RLIMIT_MEMLOCK> and B<RLIMIT_NPROC> derive from BSD and are not specified in POSIX.1-2001; they are present on the BSDs and Linux, but on few other implementations.  B<RLIMIT_RSS> derives from BSD and is not specified in POSIX.1-2001; it is nevertheless present on most implementations.  B<RLIMIT_MSGQUEUE>, B<RLIMIT_NICE>, B<RLIMIT_RTPRIO>, B<RLIMIT_RTTIME>, and B<RLIMIT_SIGPENDING> are Linux-specific."
5103 msgstr ""
5104 "B<RLIMIT_MEMLOCK> と B<RLIMIT_NPROC> は BSD から派生し、\n"
5105 "POSIX.1-2001 には指定されていない。\n"
5106 "これらは BSD 系と Linux に存在するが、他の実装は少ない。\n"
5107 "B<RLIMIT_RSS> は BSD から派生し、POSIX.1-2001 には指定されていない。\n"
5108 "それにも関わらず多くの実装で存在する。\n"
5109 "B<RLIMIT_MSGQUEUE>, B<RLIMIT_NICE>, B<RLIMIT_RTPRIO>, B<RLIMIT_RTTIME>,\n"
5110 "B<RLIMIT_SIGPENDING> は Linux 固有のものである。"
5111
5112 #. type: Plain text
5113 #: build/C/man2/getrlimit.2:540
5114 msgid "A child process created via B<fork>(2)  inherits its parent's resource limits.  Resource limits are preserved across B<execve>(2)."
5115 msgstr "B<fork>(2)  で作成された作成された子プロセスは、 親プロセスのリソース制限を継承する。 B<execve>(2)  の前後でリソース制限は保存される。"
5116
5117 #. type: Plain text
5118 #: build/C/man2/getrlimit.2:545
5119 msgid "Lowering the soft limit for a resource below the process's current consumption of that resource will succeed (but will prevent the process from further increasing its consumption of the resource)."
5120 msgstr "リソースのソフトリミットをそのプロセスが現在のリソース使用量より小さい値に設定することはできる (但し、そのプロセスはそれ以降そのリソースの使用量を増やすことができなくなる)。"
5121
5122 #. type: Plain text
5123 #: build/C/man2/getrlimit.2:554
5124 msgid "One can set the resource limits of the shell using the built-in I<ulimit> command (I<limit> in B<csh>(1)).  The shell's resource limits are inherited by the processes that it creates to execute commands."
5125 msgstr "シェルのリソース制限は、シェルの組み込みコマンドである I<ulimit> (B<csh>(1)  では I<limit )> を使って設定することができる。 このシェルのリソース制限は、コマンドを実行してシェルが生成するプロセス に引き継がれる。"
5126
5127 #. type: Plain text
5128 #: build/C/man2/getrlimit.2:559
5129 msgid "Since Linux 2.6.24, the resource limits of any process can be inspected via I</proc/[pid]/limits>; see B<proc>(5)."
5130 msgstr "Linux 2.6.24 以降では、 プロセスのリソース上限は I</proc/[pid]/limits> で知ることができる。 B<proc>(5) 参照。"
5131
5132 #. type: Plain text
5133 #: build/C/man2/getrlimit.2:568
5134 msgid "Ancient systems provided a B<vlimit>()  function with a similar purpose to B<setrlimit>().  For backward compatibility, glibc also provides B<vlimit>().  All new applications should be written using B<setrlimit>()."
5135 msgstr "古いシステムでは、 B<setrlimit>()  と同様の目的を持つ関数 B<vlimit>()  が提供されていた。 後方互換性のため、glibc でも B<vlimit>()  を提供している。 全ての新しいアプリケーションでは、 B<setrlimit>()  を使用すべきである。"
5136
5137 #. type: SS
5138 #: build/C/man2/getrlimit.2:568
5139 #, no-wrap
5140 msgid "C library/ kernel ABI differences"
5141 msgstr "C ライブラリとカーネル ABI の違い"
5142
5143 #. type: Plain text
5144 #: build/C/man2/getrlimit.2:577
5145 msgid "Since version 2.13, the glibc B<getrlimit>()  and B<setrlimit>()  wrapper functions no longer invoke the corresponding system calls, but instead employ B<prlimit>(), for the reasons described in BUGS."
5146 msgstr "バージョン 2.13 以降では、 glibc の B<getrlimit>() と B<setrlimit>() のラッパー関数はもはや対応するシステムコールを呼び出さず、 代わりに「バグ」の節で説明されている理由から B<prlimit>() を利用している。"
5147
5148 #. type: Plain text
5149 #: build/C/man2/getrlimit.2:586
5150 msgid "In older Linux kernels, the B<SIGXCPU> and B<SIGKILL> signals delivered when a process encountered the soft and hard B<RLIMIT_CPU> limits were delivered one (CPU) second later than they should have been.  This was fixed in kernel 2.6.8."
5151 msgstr "以前の Linux カーネルでは、プロセスがソフトまたはハード B<RLIMIT_CPU> リミットに達した場合に送られる B<SIGXCPU> と B<SIGKILL> シグナルが、本来送られるべき時点の 1 (CPU) 秒後に送られてしまう。 これはカーネル 2.6.8 で修正された。"
5152
5153 #.  see http://marc.theaimsgroup.com/?l=linux-kernel&m=114008066530167&w=2
5154 #. type: Plain text
5155 #: build/C/man2/getrlimit.2:594
5156 msgid "In 2.6.x kernels before 2.6.17, a B<RLIMIT_CPU> limit of 0 is wrongly treated as \"no limit\" (like B<RLIM_INFINITY>).  Since Linux 2.6.17, setting a limit of 0 does have an effect, but is actually treated as a limit of 1 second."
5157 msgstr "2.6.17 より前の 2.6.x カーネルでは、 B<RLIMIT_CPU> リミットが 0 の場合、 (B<RLIM_INFINITY> と同じように) 「制限なし」と間違って解釈されていた。 Linux 2.6.17 以降では、リミットを 0 に設定した場合にも 効果を持つようになっているが、実際にはリミットの値は 1 秒となる。"
5158
5159 #.  See https://lwn.net/Articles/145008/
5160 #. type: Plain text
5161 #: build/C/man2/getrlimit.2:599
5162 msgid "A kernel bug means that B<RLIMIT_RTPRIO> does not work in kernel 2.6.12; the problem is fixed in kernel 2.6.13."
5163 msgstr "カーネル 2.6.12 には、 B<RLIMIT_RTPRIO> が動作しないというバグがある。この問題はカーネル 2.6.13 で修正されている。"
5164
5165 #.  see http://marc.theaimsgroup.com/?l=linux-kernel&m=112256338703880&w=2
5166 #. type: Plain text
5167 #: build/C/man2/getrlimit.2:610
5168 msgid "In kernel 2.6.12, there was an off-by-one mismatch between the priority ranges returned by B<getpriority>(2)  and B<RLIMIT_NICE>.  This had the effect that the actual ceiling for the nice value was calculated as I<19\\ -\\ rlim_cur>.  This was fixed in kernel 2.6.13."
5169 msgstr "カーネル 2.6.12 では、 B<getpriority>(2)  と B<RLIMIT_NICE> が返す優先度の範囲が一つずれていた。このため、nice 値の実際の上限が I<19\\ -\\ rlim_cur> になってしまうという影響があった。これはカーネル 2.6.13 で修正された。"
5170
5171 #.  The relevant patch, sent to LKML, seems to be
5172 #.  http://thread.gmane.org/gmane.linux.kernel/273462
5173 #.  From: Roland McGrath <roland <at> redhat.com>
5174 #.  Subject: [PATCH 7/7] make RLIMIT_CPU/SIGXCPU per-process
5175 #.  Date: 2005-01-23 23:27:46 GMT
5176 #.  Tested Solaris 10, FreeBSD 9, OpenBSD 5.0
5177 #.  FIXME . https://bugzilla.kernel.org/show_bug.cgi?id=50951
5178 #. type: Plain text
5179 #: build/C/man2/getrlimit.2:637
5180 msgid "Since Linux 2.6.12, if a process reaches its soft B<RLIMIT_CPU> limit and has a handler installed for B<SIGXCPU>, then, in addition to invoking the signal handler, the kernel increases the soft limit by one second.  This behavior repeats if the process continues to consume CPU time, until the hard limit is reached, at which point the process is killed.  Other implementations do not change the B<RLIMIT_CPU> soft limit in this manner, and the Linux behavior is probably not standards conformant; portable applications should avoid relying on this Linux-specific behavior.  The Linux-specific B<RLIMIT_RTTIME> limit exhibits the same behavior when the soft limit is encountered."
5181 msgstr "Linux 2.6.12 以降では、 プロセスがその B<RLIMIT_CPU> ソフトリミットに達し、 B<SIGXCPU> に対してシグナルハンドラが設定されている場合、 シグナルハンドラを起動するだけでなく、 カーネルは 1 秒間ソフトリミットを増やす。 そのプロセスが CPU 時間を消費し続けている限り、 ハードリミットに達するまで、この動作が繰り返される。 ハードリミットに達すると、その時点でプロセスは kill される。 他の実装では、上記のような B<RLIMIT_CPU> ソフトリミットの変更は行われず、 おそらく Linux の動作は標準に準拠していない。 移植性が必要なアプリケーションではこの Linux 固有の動作を前提にするのは避けるべきである。 Linux 固有の上限 B<RLIMIT_RTTIME> でも、 ソフトリミットに達した場合に同じ動作となる。"
5182
5183 #. type: Plain text
5184 #: build/C/man2/getrlimit.2:647
5185 msgid "Kernels before 2.4.22 did not diagnose the error B<EINVAL> for B<setrlimit>()  when I<rlim-E<gt>rlim_cur> was greater than I<rlim-E<gt>rlim_max>."
5186 msgstr "2.4.22 より前のカーネルでは、 I<rlim-E<gt>rlim_cur> が I<rlim-E<gt>rlim_max> より大きかった場合、 B<setrlimit>()  での B<EINVAL> エラーを検出できない。"
5187
5188 #. type: SS
5189 #: build/C/man2/getrlimit.2:647
5190 #, no-wrap
5191 msgid "Representation of \"large\" resource limit values on 32-bit platforms"
5192 msgstr "32 ビットプラットフォームにおける「大きな」リソース上限値の表現"
5193
5194 #.  https://bugzilla.kernel.org/show_bug.cgi?id=5042
5195 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12201
5196 #. type: Plain text
5197 #: build/C/man2/getrlimit.2:678
5198 msgid "The glibc B<getrlimit>()  and B<setrlimit>()  wrapper functions use a 64-bit I<rlim_t> data type, even on 32-bit platforms.  However, the I<rlim_t> data type used in the B<getrlimit>()  and B<setrlimit>()  system calls is a (32-bit)  I<unsigned long>.  Furthermore, in Linux versions before 2.6.36, the kernel represents resource limits on 32-bit platforms as I<unsigned long>.  However, a 32-bit data type is not wide enough.  The most pertinent limit here is B<RLIMIT_FSIZE>, which specifies the maximum size to which a file can grow: to be useful, this limit must be represented using a type that is as wide as the type used to represent file offsets\\(emthat is, as wide as a 64-bit B<off_t> (assuming a program compiled with I<_FILE_OFFSET_BITS=64>)."
5199 msgstr "glibc の B<getrlimit>() と B<setrlimit>() ラッパー関数は、32 ビットプラットフォームであっても 64 ビットの I<rlim_t> データ型を使用する。 しかし、 B<getrlimit>() と B<setrlimit>() システムコールで使用される I<rlim_t> データ型は (32 ビットの) I<unsigned long> である。 さらに、 2.6.36 より前の Linux では、 カーネルは 32 ビットプラットフォームではリソース上限を I<unsigned long> として表現している。 しかしながら、 32 ビットデータ型は十分な大きさではない。 ここで最も関係がある上限値は B<RLIMIT_FSIZE> である。 この上限はファイルサイズの最大値であり、実用性の面からは、 この上限をファイルオフセットを表現するのに使用されている型、 つまり 64 ビットの B<off_t> (I<_FILE_OFFSET_BITS=64> でコンパイルしたプログラムの場合)、 と同じ幅を持つ型、を使って表現すべきである。"
5200
5201 #. type: Plain text
5202 #: build/C/man2/getrlimit.2:688
5203 msgid "To work around this kernel limitation, if a program tried to set a resource limit to a value larger than can be represented in a 32-bit I<unsigned long>, then the glibc B<setrlimit>()  wrapper function silently converted the limit value to B<RLIM_INFINITY>.  In other words, the requested resource limit setting was silently ignored."
5204 msgstr "カーネルのこの制限に対する対策として、 プログラムがリソース上限を 32 ビットの I<unsigned long> で表現できる値よりも大きな値に設定しようとした際には、 glibc の B<setrlimit>() ラッパー関数はこの上限値を黙って B<RLIM_INFINITY> に変換していた。 言い換えると、指定されたリソース上限値は黙って無視されていた。"
5205
5206 #. type: Plain text
5207 #: build/C/man2/getrlimit.2:690
5208 msgid "This problem was addressed in Linux 2.6.36 with two principal changes:"
5209 msgstr "この問題は Linux 2.6.36 での以下の主な変更により解決された。"
5210
5211 #. type: Plain text
5212 #: build/C/man2/getrlimit.2:693
5213 msgid "the addition of a new kernel representation of resource limits that uses 64 bits, even on 32-bit platforms;"
5214 msgstr "32 ビットプラットフォームであっても 64 ビットを使用するリソース上限の新しいカーネルでの表現方法の追加。"
5215
5216 #. type: Plain text
5217 #: build/C/man2/getrlimit.2:697
5218 msgid "the addition of the B<prlimit>()  system call, which employs 64-bit values for its resource limit arguments."
5219 msgstr "リソース上限の引き数として 64 ビット値を取る B<prlimit>() システムコールの追加。"
5220
5221 #.  https://www.sourceware.org/bugzilla/show_bug.cgi?id=12201
5222 #. type: Plain text
5223 #: build/C/man2/getrlimit.2:710
5224 msgid "Since version 2.13, glibc works around the limitations of the B<getrlimit>()  and B<setrlimit>()  system calls by implementing B<setrlimit>()  and B<getrlimit>()  as wrapper functions that call B<prlimit>()."
5225 msgstr ""
5226 "バージョン 2.13 以降の glibc では、 B<getrlimit>() と B<setrlimit>() システムコールの制限に対する回避手段として、\n"
5227 "B<setrlimit>() と B<getrlimit>() を B<prlimit>() を呼び出すラッパー関数として実装している。"
5228
5229 #. type: Plain text
5230 #: build/C/man2/getrlimit.2:713
5231 msgid "The program below demonstrates the use of B<prlimit>()."
5232 msgstr "以下のプログラムに B<prlimit>() の使用例を示す。"
5233
5234 #. type: Plain text
5235 #: build/C/man2/getrlimit.2:722
5236 #, no-wrap
5237 msgid ""
5238 "#define _GNU_SOURCE\n"
5239 "#define _FILE_OFFSET_BITS 64\n"
5240 "#include E<lt>stdio.hE<gt>\n"
5241 "#include E<lt>time.hE<gt>\n"
5242 "#include E<lt>stdlib.hE<gt>\n"
5243 "#include E<lt>unistd.hE<gt>\n"
5244 "#include E<lt>sys/resource.hE<gt>\n"
5245 msgstr ""
5246 "#define _GNU_SOURCE\n"
5247 "#define _FILE_OFFSET_BITS 64\n"
5248 "#include E<lt>stdio.hE<gt>\n"
5249 "#include E<lt>time.hE<gt>\n"
5250 "#include E<lt>stdlib.hE<gt>\n"
5251 "#include E<lt>unistd.hE<gt>\n"
5252 "#include E<lt>sys/resource.hE<gt>\n"
5253
5254 #. type: Plain text
5255 #: build/C/man2/getrlimit.2:725
5256 #, no-wrap
5257 msgid ""
5258 "#define errExit(msg) \tdo { perror(msg); exit(EXIT_FAILURE); \\e\n"
5259 "                        } while (0)\n"
5260 msgstr ""
5261 "#define errExit(msg) \tdo { perror(msg); exit(EXIT_FAILURE); \\e\n"
5262 "                        } while (0)\n"
5263
5264 #. type: Plain text
5265 #: build/C/man2/getrlimit.2:732
5266 #, no-wrap
5267 msgid ""
5268 "int\n"
5269 "main(int argc, char *argv[])\n"
5270 "{\n"
5271 "    struct rlimit old, new;\n"
5272 "    struct rlimit *newp;\n"
5273 "    pid_t pid;\n"
5274 msgstr ""
5275 "int\n"
5276 "main(int argc, char *argv[])\n"
5277 "{\n"
5278 "    struct rlimit old, new;\n"
5279 "    struct rlimit *newp;\n"
5280 "    pid_t pid;\n"
5281
5282 #. type: Plain text
5283 #: build/C/man2/getrlimit.2:738
5284 #, no-wrap
5285 msgid ""
5286 "    if (!(argc == 2 || argc == 4)) {\n"
5287 "        fprintf(stderr, \"Usage: %s E<lt>pidE<gt> [E<lt>new-soft-limitE<gt> \"\n"
5288 "                \"E<lt>new-hard-limitE<gt>]\\en\", argv[0]);\n"
5289 "        exit(EXIT_FAILURE);\n"
5290 "    }\n"
5291 msgstr ""
5292 "    if (!(argc == 2 || argc == 4)) {\n"
5293 "        fprintf(stderr, \"Usage: %s E<lt>pidE<gt> [E<lt>new-soft-limitE<gt> \"\n"
5294 "                \"E<lt>new-hard-limitE<gt>]\\en\", argv[0]);\n"
5295 "        exit(EXIT_FAILURE);\n"
5296 "    }\n"
5297
5298 #. type: Plain text
5299 #: build/C/man2/getrlimit.2:740
5300 #, no-wrap
5301 msgid "    pid = atoi(argv[1]);        /* PID of target process */\n"
5302 msgstr "    pid = atoi(argv[1]);        /* PID of target process */\n"
5303
5304 #. type: Plain text
5305 #: build/C/man2/getrlimit.2:747
5306 #, no-wrap
5307 msgid ""
5308 "    newp = NULL;\n"
5309 "    if (argc == 4) {\n"
5310 "        new.rlim_cur = atoi(argv[2]);\n"
5311 "        new.rlim_max = atoi(argv[3]);\n"
5312 "        newp = &new;\n"
5313 "    }\n"
5314 msgstr ""
5315 "    newp = NULL;\n"
5316 "    if (argc == 4) {\n"
5317 "        new.rlim_cur = atoi(argv[2]);\n"
5318 "        new.rlim_max = atoi(argv[3]);\n"
5319 "        newp = &new;\n"
5320 "    }\n"
5321
5322 #. type: Plain text
5323 #: build/C/man2/getrlimit.2:750
5324 #, no-wrap
5325 msgid ""
5326 "    /* Set CPU time limit of target process; retrieve and display\n"
5327 "       previous limit */\n"
5328 msgstr ""
5329 "    /* Set CPU time limit of target process; retrieve and display\n"
5330 "       previous limit */\n"
5331
5332 #. type: Plain text
5333 #: build/C/man2/getrlimit.2:755
5334 #, no-wrap
5335 msgid ""
5336 "    if (prlimit(pid, RLIMIT_CPU, newp, &old) == -1)\n"
5337 "        errExit(\"prlimit-1\");\n"
5338 "    printf(\"Previous limits: soft=%lld; hard=%lld\\en\",\n"
5339 "            (long long) old.rlim_cur, (long long) old.rlim_max);\n"
5340 msgstr ""
5341 "    if (prlimit(pid, RLIMIT_CPU, newp, &old) == -1)\n"
5342 "        errExit(\"prlimit-1\");\n"
5343 "    printf(\"Previous limits: soft=%lld; hard=%lld\\en\",\n"
5344 "            (long long) old.rlim_cur, (long long) old.rlim_max);\n"
5345
5346 #. type: Plain text
5347 #: build/C/man2/getrlimit.2:757
5348 #, no-wrap
5349 msgid "    /* Retrieve and display new CPU time limit */\n"
5350 msgstr "    /* Retrieve and display new CPU time limit */\n"
5351
5352 #. type: Plain text
5353 #: build/C/man2/getrlimit.2:762
5354 #, no-wrap
5355 msgid ""
5356 "    if (prlimit(pid, RLIMIT_CPU, NULL, &old) == -1)\n"
5357 "        errExit(\"prlimit-2\");\n"
5358 "    printf(\"New limits: soft=%lld; hard=%lld\\en\",\n"
5359 "            (long long) old.rlim_cur, (long long) old.rlim_max);\n"
5360 msgstr ""
5361 "    if (prlimit(pid, RLIMIT_CPU, NULL, &old) == -1)\n"
5362 "        errExit(\"prlimit-2\");\n"
5363 "    printf(\"New limits: soft=%lld; hard=%lld\\en\",\n"
5364 "            (long long) old.rlim_cur, (long long) old.rlim_max);\n"
5365
5366 #. type: Plain text
5367 #: build/C/man2/getrlimit.2:765 build/C/man7/user_namespaces.7:829
5368 #, no-wrap
5369 msgid ""
5370 "    exit(EXIT_FAILURE);\n"
5371 "}\n"
5372 msgstr ""
5373 "    exit(EXIT_FAILURE);\n"
5374 "}\n"
5375
5376 #. type: Plain text
5377 #: build/C/man2/getrlimit.2:784
5378 msgid "B<prlimit>(1), B<dup>(2), B<fcntl>(2), B<fork>(2), B<getrusage>(2), B<mlock>(2), B<mmap>(2), B<open>(2), B<quotactl>(2), B<sbrk>(2), B<shmctl>(2), B<malloc>(3), B<sigqueue>(3), B<ulimit>(3), B<core>(5), B<capabilities>(7), B<signal>(7)"
5379 msgstr "B<prlimit>(1), B<dup>(2), B<fcntl>(2), B<fork>(2), B<getrusage>(2), B<mlock>(2), B<mmap>(2), B<open>(2), B<quotactl>(2), B<sbrk>(2), B<shmctl>(2), B<malloc>(3), B<sigqueue>(3), B<ulimit>(3), B<core>(5), B<capabilities>(7), B<signal>(7)"
5380
5381 #. type: TH
5382 #: build/C/man2/getrusage.2:39
5383 #, no-wrap
5384 msgid "GETRUSAGE"
5385 msgstr "GETRUSAGE"
5386
5387 #. type: TH
5388 #: build/C/man2/getrusage.2:39
5389 #, no-wrap
5390 msgid "2014-05-10"
5391 msgstr "2014-05-10"
5392
5393 #. type: Plain text
5394 #: build/C/man2/getrusage.2:42
5395 msgid "getrusage - get resource usage"
5396 msgstr "getrusage - 資源の使用量を取得する"
5397
5398 #. type: Plain text
5399 #: build/C/man2/getrusage.2:48
5400 msgid "B<int getrusage(int >I<who>B<, struct rusage *>I<usage>B<);>"
5401 msgstr "B<int getrusage(int >I<who>B<, struct rusage *>I<usage>B<);>"
5402
5403 #. type: Plain text
5404 #: build/C/man2/getrusage.2:54
5405 msgid "B<getrusage>()  returns resource usage measures for I<who>, which can be one of the following:"
5406 msgstr "B<getrusage>()  は I<who> の資源 (resource) の使用量を返す。 I<who> には以下のいずれか一つを指定できる。"
5407
5408 #. type: TP
5409 #: build/C/man2/getrusage.2:54
5410 #, no-wrap
5411 msgid "B<RUSAGE_SELF>"
5412 msgstr "B<RUSAGE_SELF>"
5413
5414 #. type: Plain text
5415 #: build/C/man2/getrusage.2:58
5416 msgid "Return resource usage statistics for the calling process, which is the sum of resources used by all threads in the process."
5417 msgstr "呼び出したプロセスの資源使用量、 そのプロセス内の全スレッドが使用している資源の合計を返す。"
5418
5419 #. type: TP
5420 #: build/C/man2/getrusage.2:58
5421 #, no-wrap
5422 msgid "B<RUSAGE_CHILDREN>"
5423 msgstr "B<RUSAGE_CHILDREN>"
5424
5425 #. type: Plain text
5426 #: build/C/man2/getrusage.2:65
5427 msgid "Return resource usage statistics for all children of the calling process that have terminated and been waited for.  These statistics will include the resources used by grandchildren, and further removed descendants, if all of the intervening descendants waited on their terminated children."
5428 msgstr "呼び出したプロセスの子プロセスのうち、 終了して待ち状態にある全プロセスが使用している資源使用量の統計を返す。 これらの統計情報には、孫プロセスやその子孫のプロセスのうち、 削除待ちのものが使用している資源も含まれる。"
5429
5430 #. type: TP
5431 #: build/C/man2/getrusage.2:65
5432 #, no-wrap
5433 msgid "B<RUSAGE_THREAD> (since Linux 2.6.26)"
5434 msgstr "B<RUSAGE_THREAD> (Linux 2.6.26 以降)"
5435
5436 #. type: Plain text
5437 #: build/C/man2/getrusage.2:75
5438 msgid "Return resource usage statistics for the calling thread.  The B<_GNU_SOURCE> feature test macro must be defined (before including I<any> header file)  in order to obtain the definition of this constant from I<E<lt>sys/resource.hE<gt>>."
5439 msgstr "呼び出したスレッドに関する資源使用量の統計を返す。 I<E<lt>sys/resource.hE<gt>> からこの定数の定義を得るためには、 ((I<どの>ヘッダファイルをインクルードするよりも前に) 機能検査マクロ B<_GNU_SOURCE> を定義しなければならない。"
5440
5441 #. type: Plain text
5442 #: build/C/man2/getrusage.2:79
5443 msgid "The resource usages are returned in the structure pointed to by I<usage>, which has the following form:"
5444 msgstr "資源使用量は I<usage> が指す構造体に格納されて返される。 構造体は以下の形式である。"
5445
5446 #. type: Plain text
5447 #: build/C/man2/getrusage.2:100
5448 #, no-wrap
5449 msgid ""
5450 "struct rusage {\n"
5451 "    struct timeval ru_utime; /* user CPU time used */\n"
5452 "    struct timeval ru_stime; /* system CPU time used */\n"
5453 "    long   ru_maxrss;        /* maximum resident set size */\n"
5454 "    long   ru_ixrss;         /* integral shared memory size */\n"
5455 "    long   ru_idrss;         /* integral unshared data size */\n"
5456 "    long   ru_isrss;         /* integral unshared stack size */\n"
5457 "    long   ru_minflt;        /* page reclaims (soft page faults) */\n"
5458 "    long   ru_majflt;        /* page faults (hard page faults) */\n"
5459 "    long   ru_nswap;         /* swaps */\n"
5460 "    long   ru_inblock;       /* block input operations */\n"
5461 "    long   ru_oublock;       /* block output operations */\n"
5462 "    long   ru_msgsnd;        /* IPC messages sent */\n"
5463 "    long   ru_msgrcv;        /* IPC messages received */\n"
5464 "    long   ru_nsignals;      /* signals received */\n"
5465 "    long   ru_nvcsw;         /* voluntary context switches */\n"
5466 "    long   ru_nivcsw;        /* involuntary context switches */\n"
5467 "};\n"
5468 msgstr ""
5469 "struct rusage {\n"
5470 "    struct timeval ru_utime; /* 使用されたユーザー CPU 時間 */\n"
5471 "    struct timeval ru_stime; /* 使用されたシステム CPU 時間 */\n"
5472 "    long   ru_maxrss;        /* RAM 上に存在する仮想ページのサイズ\n"
5473 "                               (resident set size) の最大値 */\n"
5474 "    long   ru_ixrss;         /* 共有メモリの合計サイズ */\n"
5475 "    long   ru_idrss;         /* 非共有データの合計サイズ */\n"
5476 "    long   ru_isrss;         /* 非共有スタックの合計サイズ */\n"
5477 "    long   ru_minflt;        /* ページの再利用 (ソフトページフォルト) */\n"
5478 "    long   ru_majflt;        /* ページフォールト (ハードページフォルト) */\n"
5479 "    long   ru_nswap;         /* スワップ */\n"
5480 "    long   ru_inblock;       /* ブロック入力操作 */\n"
5481 "    long   ru_oublock;       /* ブロック出力操作 */\n"
5482 "    long   ru_msgsnd;        /* 送信された IPC メッセージ */\n"
5483 "    long   ru_msgrcv;        /* 受信された IPC メッセージ */\n"
5484 "    long   ru_nsignals;      /* 受信されたシグナル */\n"
5485 "    long   ru_nvcsw;         /* 意図したコンテキスト切り替え */\n"
5486 "    long   ru_nivcsw;        /* 意図しないコンテキスト切り替え */\n"
5487 "};\n"
5488
5489 #. type: Plain text
5490 #: build/C/man2/getrusage.2:108
5491 msgid "Not all fields are completed; unmaintained fields are set to zero by the kernel.  (The unmaintained fields are provided for compatibility with other systems, and because they may one day be supported on Linux.)  The fields are interpreted as follows:"
5492 msgstr "すべてのフィールドがサポートされているわけではない。 メンテナンスされていないフィールドには、 カーネルが 0 を設定する (メンテナンスされていないフィールドは、 他のシステムとの互換性のために提供されており、 いつか Linux でもサポートされるかもしれない)。 各フィールドの詳細は以下の通りである。"
5493
5494 #. type: TP
5495 #: build/C/man2/getrusage.2:108
5496 #, no-wrap
5497 msgid "I<ru_utime>"
5498 msgstr "I<ru_utime>"
5499
5500 #. type: Plain text
5501 #: build/C/man2/getrusage.2:114
5502 msgid "This is the total amount of time spent executing in user mode, expressed in a I<timeval> structure (seconds plus microseconds)."
5503 msgstr "ユーザモードでの実行で消費された合計時間。 I<timeval> 構造体 (秒とミリ秒) で表現される。"
5504
5505 #. type: TP
5506 #: build/C/man2/getrusage.2:114
5507 #, no-wrap
5508 msgid "I<ru_stime>"
5509 msgstr "I<ru_stime>"
5510
5511 #. type: Plain text
5512 #: build/C/man2/getrusage.2:120
5513 msgid "This is the total amount of time spent executing in kernel mode, expressed in a I<timeval> structure (seconds plus microseconds)."
5514 msgstr "カーネルモードでの実行で消費された合計時間。 I<timeval> 構造体 (秒とミリ秒) で表現される。"
5515
5516 #. type: TP
5517 #: build/C/man2/getrusage.2:120
5518 #, no-wrap
5519 msgid "I<ru_maxrss> (since Linux 2.6.32)"
5520 msgstr "I<ru_maxrss> (Linux 2.6.32 以降)"
5521
5522 #. type: Plain text
5523 #: build/C/man2/getrusage.2:127
5524 msgid "This is the maximum resident set size used (in kilobytes).  For B<RUSAGE_CHILDREN>, this is the resident set size of the largest child, not the maximum resident set size of the process tree."
5525 msgstr "使用された resident set size の最大値 (キロバイト単位)。 B<RUSAGE_CHILDREN> の場合には、プロセスツリーの resident set size の最大値ではなく、 最も大きい子プロセスの resident set size となる。"
5526
5527 #. type: TP
5528 #: build/C/man2/getrusage.2:127
5529 #, no-wrap
5530 msgid "I<ru_ixrss> (unmaintained)"
5531 msgstr "I<ru_ixrss> (メンテナンスされていない)"
5532
5533 #.  On some systems, this field records the number of signals received.
5534 #. type: Plain text
5535 #: build/C/man2/getrusage.2:133 build/C/man2/getrusage.2:138
5536 #: build/C/man2/getrusage.2:143 build/C/man2/getrusage.2:155
5537 #: build/C/man2/getrusage.2:167 build/C/man2/getrusage.2:173
5538 #: build/C/man2/getrusage.2:177
5539 msgid "This field is currently unused on Linux."
5540 msgstr "このフィールドは現在のところ Linux では未使用である。"
5541
5542 #. type: TP
5543 #: build/C/man2/getrusage.2:133
5544 #, no-wrap
5545 msgid "I<ru_idrss> (unmaintained)"
5546 msgstr "I<ru_idrss> (メンテナンスされていない)"
5547
5548 #. type: TP
5549 #: build/C/man2/getrusage.2:138
5550 #, no-wrap
5551 msgid "I<ru_isrss> (unmaintained)"
5552 msgstr "I<ru_isrss> (メンテナンスされていない)"
5553
5554 #. type: TP
5555 #: build/C/man2/getrusage.2:143
5556 #, no-wrap
5557 msgid "I<ru_minflt>"
5558 msgstr "I<ru_minflt>"
5559
5560 #. type: Plain text
5561 #: build/C/man2/getrusage.2:148
5562 msgid "The number of page faults serviced without any I/O activity; here I/O activity is avoided by ``reclaiming'' a page frame from the list of pages awaiting reallocation."
5563 msgstr "I/O 動作なしで発生したページフォルトの回数。 再割り当てを待っているページリストからページフレームを「回収」 (reclaim) することで、 I/O 動作を避けることができる。"
5564
5565 #. type: TP
5566 #: build/C/man2/getrusage.2:148
5567 #, no-wrap
5568 msgid "I<ru_majflt>"
5569 msgstr "I<ru_majflt>"
5570
5571 #. type: Plain text
5572 #: build/C/man2/getrusage.2:151
5573 msgid "The number of page faults serviced that required I/O activity."
5574 msgstr "I/O 動作を必要とするページフォルトの回数。"
5575
5576 #. type: TP
5577 #: build/C/man2/getrusage.2:151
5578 #, no-wrap
5579 msgid "I<ru_nswap> (unmaintained)"
5580 msgstr "I<ru_nswap> (メンテナンスされていない)"
5581
5582 #. type: TP
5583 #: build/C/man2/getrusage.2:155
5584 #, no-wrap
5585 msgid "I<ru_inblock> (since Linux 2.6.22)"
5586 msgstr "I<ru_inblock> (Linux 2.6.22 以降)"
5587
5588 #. type: Plain text
5589 #: build/C/man2/getrusage.2:158
5590 msgid "The number of times the filesystem had to perform input."
5591 msgstr "ファイルシステムが入力を実行する必要があった回数。"
5592
5593 #. type: TP
5594 #: build/C/man2/getrusage.2:158
5595 #, no-wrap
5596 msgid "I<ru_oublock> (since Linux 2.6.22)"
5597 msgstr "I<ru_oublock> (Linux 2.6.22 以降)"
5598
5599 #. type: Plain text
5600 #: build/C/man2/getrusage.2:161
5601 msgid "The number of times the filesystem had to perform output."
5602 msgstr "ファイルシステムが出力を実行する必要があった回数。"
5603
5604 #. type: TP
5605 #: build/C/man2/getrusage.2:161
5606 #, no-wrap
5607 msgid "I<ru_msgsnd> (unmaintained)"
5608 msgstr "I<ru_msgsnd> (メンテナンスされていない)"
5609
5610 #. type: TP
5611 #: build/C/man2/getrusage.2:167
5612 #, no-wrap
5613 msgid "I<ru_msgrcv> (unmaintained)"
5614 msgstr "I<ru_msgrcv> (メンテナンスされていない)"
5615
5616 #. type: TP
5617 #: build/C/man2/getrusage.2:173
5618 #, no-wrap
5619 msgid "I<ru_nsignals> (unmaintained)"
5620 msgstr "I<ru_nsignals> (メンテナンスされていない)"
5621
5622 #. type: TP
5623 #: build/C/man2/getrusage.2:177
5624 #, no-wrap
5625 msgid "I<ru_nvcsw> (since Linux 2.6)"
5626 msgstr "I<ru_nvcsw> (Linux 2.6 以降)"
5627
5628 #. type: Plain text
5629 #: build/C/man2/getrusage.2:182
5630 msgid "The number of times a context switch resulted due to a process voluntarily giving up the processor before its time slice was completed (usually to await availability of a resource)."
5631 msgstr "自分のタイムスライスが完了する前にプロセスが自発的にプロセッサを解放して行われたコンテキストスイッチの回数 (通常はリソースが利用可能になるのを待つために行われる)。"
5632
5633 #. type: TP
5634 #: build/C/man2/getrusage.2:182
5635 #, no-wrap
5636 msgid "I<ru_nivcsw> (since Linux 2.6)"
5637 msgstr "I<memory_migrate> (Linux 2.6.16 以降)"
5638
5639 #. type: Plain text
5640 #: build/C/man2/getrusage.2:187
5641 msgid "The number of times a context switch resulted due to a higher priority process becoming runnable or because the current process exceeded its time slice."
5642 msgstr "優先度が自分より高いプロセッサが実行可能になったか、現在のプロセスが自分のタイムスライスを超過したことにより行われたコンテキストスイッチの回数。"
5643
5644 #. type: Plain text
5645 #: build/C/man2/getrusage.2:198
5646 msgid "I<usage> points outside the accessible address space."
5647 msgstr "I<usage> がアクセス可能なアドレス空間の外を指している。"
5648
5649 #. type: Plain text
5650 #: build/C/man2/getrusage.2:202
5651 msgid "I<who> is invalid."
5652 msgstr "I<who> が無効である。"
5653
5654 #. type: Plain text
5655 #: build/C/man2/getrusage.2:210
5656 msgid "SVr4, 4.3BSD.  POSIX.1-2001 specifies B<getrusage>(), but specifies only the fields I<ru_utime> and I<ru_stime>."
5657 msgstr "SVr4, 4.3BSD.  POSIX.1-2001 は B<getrusage>()  を規定しているが、規定しているフィールドは I<ru_utime> と I<ru_stime> だけである。"
5658
5659 #. type: Plain text
5660 #: build/C/man2/getrusage.2:213
5661 msgid "B<RUSAGE_THREAD> is Linux-specific."
5662 msgstr "B<RUSAGE_THREAD> は Linux 固有である。"
5663
5664 #. type: Plain text
5665 #: build/C/man2/getrusage.2:216
5666 msgid "Resource usage metrics are preserved across an B<execve>(2)."
5667 msgstr "B<execve>(2)  の前後でリソース使用量の指標は保持される。"
5668
5669 #. type: Plain text
5670 #: build/C/man2/getrusage.2:224
5671 msgid "Including I<E<lt>sys/time.hE<gt>> is not required these days, but increases portability.  (Indeed, I<struct timeval> is defined in I<E<lt>sys/time.hE<gt>>.)"
5672 msgstr "今日では I<E<lt>sys/time.hE<gt>> をインクルードする必要はないが、 インクルードしておけば移植性が増す。 (実際 I<struct timeval> は I<E<lt>sys/time.hE<gt>> で定義されている。)"
5673
5674 #.  See the description of getrusage() in XSH.
5675 #.  A similar statement was also in SUSv2.
5676 #. type: Plain text
5677 #: build/C/man2/getrusage.2:236
5678 msgid "In Linux kernel versions before 2.6.9, if the disposition of B<SIGCHLD> is set to B<SIG_IGN> then the resource usages of child processes are automatically included in the value returned by B<RUSAGE_CHILDREN>, although POSIX.1-2001 explicitly prohibits this.  This nonconformance is rectified in Linux 2.6.9 and later."
5679 msgstr "2.6.9 より前のバージョンの Linux カーネルでは、 B<SIGCHLD> の処理が B<SIG_IGN> に設定されていると、 子プロセスのリソース使用量が B<RUSAGE_CHILDREN> で返される値に自動的に含められる。 しかし POSIX.1-2001 では、これを明確に禁止している。 この準拠していなかった点は、Linux 2.6.9 以降で改正された。"
5680
5681 #. type: Plain text
5682 #: build/C/man2/getrusage.2:239
5683 msgid "The structure definition shown at the start of this page was taken from 4.3BSD Reno."
5684 msgstr "このページの最初で示した構造体の定義は 4.3BSD Reno のものである。"
5685
5686 #. type: Plain text
5687 #: build/C/man2/getrusage.2:248
5688 msgid "Ancient systems provided a B<vtimes>()  function with a similar purpose to B<getrusage>().  For backward compatibility, glibc also provides B<vtimes>().  All new applications should be written using B<getrusage>()."
5689 msgstr ""
5690 "古いシステムでは、 B<getrusage>() と同様の目的を持つ関数 B<vtimes>() が提供\n"
5691 "されていた。後方互換性のため、glibc でも B<vtimes>() を提供している。\n"
5692 "全ての新しいアプリケーションでは B<getrusage>() を使用すべきである。"
5693
5694 #. type: Plain text
5695 #: build/C/man2/getrusage.2:253
5696 msgid "See also the description of I</proc/PID/stat> in B<proc>(5)."
5697 msgstr "B<proc>(5)  にある I</proc/PID/stat> の説明も参照のこと。"
5698
5699 #. type: Plain text
5700 #: build/C/man2/getrusage.2:260
5701 msgid "B<clock_gettime>(2), B<getrlimit>(2), B<times>(2), B<wait>(2), B<wait4>(2), B<clock>(3)"
5702 msgstr "B<clock_gettime>(2), B<getrlimit>(2), B<times>(2), B<wait>(2), B<wait4>(2), B<clock>(3)"
5703
5704 #. type: TH
5705 #: build/C/man2/getsid.2:26
5706 #, no-wrap
5707 msgid "GETSID"
5708 msgstr "GETSID"
5709
5710 #. type: TH
5711 #: build/C/man2/getsid.2:26
5712 #, no-wrap
5713 msgid "2010-09-26"
5714 msgstr "2010-09-26"
5715
5716 #. type: Plain text
5717 #: build/C/man2/getsid.2:29
5718 msgid "getsid - get session ID"
5719 msgstr "getsid - セッション ID を取得する。"
5720
5721 #. type: Plain text
5722 #: build/C/man2/getsid.2:33
5723 msgid "B<pid_t getsid(pid_t>I< pid>B<);>"
5724 msgstr "B<pid_t getsid(pid_t>I< pid>B<);>"
5725
5726 #. type: Plain text
5727 #: build/C/man2/getsid.2:42
5728 msgid "B<getsid>():"
5729 msgstr "B<getsid>():"
5730
5731 #. type: Plain text
5732 #: build/C/man2/getsid.2:45 build/C/man2/setpgid.2:79
5733 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED"
5734 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED"
5735
5736 #. type: Plain text
5737 #: build/C/man2/getsid.2:47 build/C/man2/setpgid.2:81
5738 msgid "|| /* Since glibc 2.12: */ _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
5739 msgstr "|| /* glibc 2.12 以降: */ _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
5740
5741 #. type: Plain text
5742 #: build/C/man2/getsid.2:58
5743 msgid "I<getsid(0)> returns the session ID of the calling process.  I<getsid(p)> returns the session ID of the process with process ID I<p>.  (The session ID of a process is the process group ID of the session leader.)"
5744 msgstr "I<getsid(0)> は呼び出し元のプロセスのセッション ID を返す。 I<getsid(p)> はプロセス ID I<p> を持つプロセスのセッション ID を返す (プロセスのセッション ID は セッションリーダーのプロセスグループ ID である)。"
5745
5746 #. type: Plain text
5747 #: build/C/man2/getsid.2:63
5748 msgid "On success, a session ID is returned.  On error, I<(pid_t)\\ -1> will be returned, and I<errno> is set appropriately."
5749 msgstr "成功すると、セッション ID が返される。 エラーの場合、I<(pid_t) -1> が返され、 I<errno> が適切に設定される。"
5750
5751 #. type: Plain text
5752 #: build/C/man2/getsid.2:70
5753 msgid "A process with process ID I<p> exists, but it is not in the same session as the calling process, and the implementation considers this an error."
5754 msgstr "プロセス ID I<p> のプロセスは存在するが、呼び出し元のプロセスと同じセッションではなく、 さらに実装がこの状態をエラーと判断した場合。"
5755
5756 #. type: Plain text
5757 #: build/C/man2/getsid.2:75
5758 msgid "No process with process ID I<p> was found."
5759 msgstr "プロセス ID が I<p> のプロセスがない。"
5760
5761 #.  Linux has this system call since Linux 1.3.44.
5762 #.  There is libc support since libc 5.2.19.
5763 #. type: Plain text
5764 #: build/C/man2/getsid.2:79
5765 msgid "This system call is available on Linux since version 2.0."
5766 msgstr "このシステムコールは Linux バージョン 2.0 以降で利用可能である。"
5767
5768 #. type: Plain text
5769 #: build/C/man2/getsid.2:81 build/C/man2/setgid.2:73 build/C/man2/setsid.2:70
5770 msgid "SVr4, POSIX.1-2001."
5771 msgstr "SVr4, POSIX.1-2001."
5772
5773 #. type: Plain text
5774 #: build/C/man2/getsid.2:84
5775 msgid "Linux does not return B<EPERM>."
5776 msgstr "Linux は B<EPERM> を返さない。"
5777
5778 #. type: Plain text
5779 #: build/C/man2/getsid.2:88
5780 msgid "B<getpgid>(2), B<setsid>(2), B<credentials>(7)"
5781 msgstr "B<getpgid>(2), B<setsid>(2), B<credentials>(7)"
5782
5783 #. type: TH
5784 #: build/C/man2/getuid.2:26
5785 #, no-wrap
5786 msgid "GETUID"
5787 msgstr "GETUID"
5788
5789 #. type: Plain text
5790 #: build/C/man2/getuid.2:29
5791 msgid "getuid, geteuid - get user identity"
5792 msgstr "getuid, geteuid - ユーザー ID を得る"
5793
5794 #. type: Plain text
5795 #: build/C/man2/getuid.2:35
5796 msgid "B<uid_t getuid(void);>"
5797 msgstr "B<uid_t getuid(void);>"
5798
5799 #. type: Plain text
5800 #: build/C/man2/getuid.2:37
5801 msgid "B<uid_t geteuid(void);>"
5802 msgstr "B<uid_t geteuid(void);>"
5803
5804 #. type: Plain text
5805 #: build/C/man2/getuid.2:40
5806 msgid "B<getuid>()  returns the real user ID of the calling process."
5807 msgstr "B<getuid>()  は呼び出し元のプロセスの実ユーザー ID を返す。"
5808
5809 #. type: Plain text
5810 #: build/C/man2/getuid.2:43
5811 msgid "B<geteuid>()  returns the effective user ID of the calling process."
5812 msgstr "B<geteuid>()  は呼び出し元のプロセスの実効ユーザー ID を返す。"
5813
5814 #. type: SS
5815 #: build/C/man2/getuid.2:48
5816 #, no-wrap
5817 msgid "History"
5818 msgstr "歴史"
5819
5820 #. type: Plain text
5821 #: build/C/man2/getuid.2:57
5822 msgid "In UNIX\\ V6 the B<getuid>()  call returned I<(euid E<lt>E<lt> 8) + uid>.  UNIX\\ V7 introduced separate calls B<getuid>()  and B<geteuid>()."
5823 msgstr "UNIX\\ V6 では B<getuid>()  コールは I<(euid E<lt>E<lt> 8) + uid> を返していた。 UNIX\\ V7 では B<getuid>()  と B<geteuid>()  という別々のコールが導入された。"
5824
5825 #. type: Plain text
5826 #: build/C/man2/getuid.2:73
5827 msgid "The original Linux B<getuid>()  and B<geteuid>()  system calls supported only 16-bit user IDs.  Subsequently, Linux 2.4 added B<getuid32>()  and B<geteuid32>(), supporting 32-bit IDs.  The glibc B<getuid>()  and B<geteuid>()  wrapper functions transparently deal with the variations across kernel versions."
5828 msgstr ""
5829 "元々の Linux の B<getuid>() と B<geteuid>() システムコールは\n"
5830 "16 ビットのグループ ID だけに対応していた。\n"
5831 "その後、Linux 2.4 で、32 ビットの ID に対応した\n"
5832 "B<getuid32>() と B<geteuid32>() が追加された。\n"
5833 "glibc の B<getuid>() と B<geteuid>() のラッパー関数は\n"
5834 "カーネルバージョンによるこの違いを吸収している。"
5835
5836 #. type: Plain text
5837 #: build/C/man2/getuid.2:78
5838 msgid "B<getresuid>(2), B<setreuid>(2), B<setuid>(2), B<credentials>(7)"
5839 msgstr "B<getresuid>(2), B<setreuid>(2), B<setuid>(2), B<credentials>(7)"
5840
5841 #. type: TH
5842 #: build/C/man3/group_member.3:25
5843 #, no-wrap
5844 msgid "GROUP_MEMBER"
5845 msgstr "GROUP_MEMBER"
5846
5847 #. type: TH
5848 #: build/C/man3/group_member.3:25
5849 #, no-wrap
5850 msgid "2014-03-30"
5851 msgstr "2014-03-30"
5852
5853 #. type: TH
5854 #: build/C/man3/group_member.3:25
5855 #, no-wrap
5856 msgid "GNU"
5857 msgstr "GNU"
5858
5859 #. type: Plain text
5860 #: build/C/man3/group_member.3:28
5861 msgid "group_member - test whether a process is in a group"
5862 msgstr "group_member - プロセスがグループに属しているかを検査する"
5863
5864 #. type: Plain text
5865 #: build/C/man3/group_member.3:32
5866 msgid "B<int group_member(gid_t >I<gid>B<);>"
5867 msgstr "B<int group_member(gid_t >I<gid>B<);>"
5868
5869 #. type: Plain text
5870 #: build/C/man3/group_member.3:40
5871 msgid "B<group_member>(): _GNU_SOURCE"
5872 msgstr "B<group_member>(): _GNU_SOURCE"
5873
5874 #. type: Plain text
5875 #: build/C/man3/group_member.3:48
5876 msgid "The B<group_member>()  function tests whether any of the caller's supplementary group IDs (as returned by B<getgroups>(2))  matches I<gid>."
5877 msgstr "B<group_member>() 関数は、 呼び出し元の補助グループ ID (B<getgroups>(2) が返す値) のいずれかが I<gid> に一致するかを検索する。"
5878
5879 #. type: Plain text
5880 #: build/C/man3/group_member.3:55
5881 msgid "The B<group_member>()  function returns nonzero if any of the caller's supplementary group IDs matches I<gid>, and zero otherwise."
5882 msgstr "B<group_member>() 関数は、 呼び出し元の補助グループ ID のいずれかが I<gid> に一致すれば 0 以外の値を、そうでなければ 0 を返す。"
5883
5884 #. type: Plain text
5885 #: build/C/man3/group_member.3:57
5886 msgid "This function is a nonstandard GNU extension."
5887 msgstr "この関数は非標準の GNU 拡張である。"
5888
5889 #. type: Plain text
5890 #: build/C/man3/group_member.3:62
5891 msgid "B<getgid>(2), B<getgroups>(2), B<getgrouplist>(3), B<group>(5)"
5892 msgstr "B<getgid>(2), B<getgroups>(2), B<getgrouplist>(3), B<group>(5)"
5893
5894 #. type: TH
5895 #: build/C/man2/iopl.2:33
5896 #, no-wrap
5897 msgid "IOPL"
5898 msgstr "IOPL"
5899
5900 #. type: TH
5901 #: build/C/man2/iopl.2:33
5902 #, no-wrap
5903 msgid "2013-03-15"
5904 msgstr "2013-03-15"
5905
5906 #. type: Plain text
5907 #: build/C/man2/iopl.2:36
5908 msgid "iopl - change I/O privilege level"
5909 msgstr "iopl - I/O 特権レベルを変更する"
5910
5911 #. type: Plain text
5912 #: build/C/man2/iopl.2:38
5913 msgid "B<#include E<lt>sys/io.hE<gt>>"
5914 msgstr "B<#include E<lt>sys/io.hE<gt>>"
5915
5916 #. type: Plain text
5917 #: build/C/man2/iopl.2:40
5918 msgid "B<int iopl(int >I<level>B<);>"
5919 msgstr "B<int iopl(int >I<level>B<);>"
5920
5921 #. type: Plain text
5922 #: build/C/man2/iopl.2:45
5923 msgid "B<iopl>()  changes the I/O privilege level of the calling process, as specified by the two least significant bits in I<level>."
5924 msgstr "B<iopl>()  は呼び出し元のプロセスの I/O 特権レベルを I<level> の下位 2 ビットで指定した値に変更する。"
5925
5926 #. type: Plain text
5927 #: build/C/man2/iopl.2:51
5928 msgid "This call is necessary to allow 8514-compatible X servers to run under Linux.  Since these X servers require access to all 65536 I/O ports, the B<ioperm>(2)  call is not sufficient."
5929 msgstr "この関数は 8514 互換の X サーバを Linux で動作させるために必要である。 なぜならこの X サーバは 65536 個の I/O ポート全てへのアクセスを要求するので B<ioperm>(2)  関数では不十分だからである。"
5930
5931 #. type: Plain text
5932 #: build/C/man2/iopl.2:55
5933 msgid "In addition to granting unrestricted I/O port access, running at a higher I/O privilege level also allows the process to disable interrupts.  This will probably crash the system, and is not recommended."
5934 msgstr "より高い I/O 特権レベルでの動作をさせることによって I/O ポートアクセスの制限を解除することに加えて、プロセスが割り込みを 無効にすることもできるようになる。この機能は時としてシステムの破壊を もたらすので勧められない。"
5935
5936 #. type: Plain text
5937 #: build/C/man2/iopl.2:60
5938 msgid "Permissions are inherited by B<fork>(2)  and B<execve>(2)."
5939 msgstr "B<fork>(2)  や B<exec>(2)  を行った場合、特権は継承される。"
5940
5941 #. type: Plain text
5942 #: build/C/man2/iopl.2:62
5943 msgid "The I/O privilege level for a normal process is 0."
5944 msgstr "通常のプロセスの I/O 特権レベルは 0 である。"
5945
5946 #. type: Plain text
5947 #: build/C/man2/iopl.2:66
5948 msgid "This call is mostly for the i386 architecture.  On many other architectures it does not exist or will always return an error."
5949 msgstr "このシステムコールはほとんど i386 アーキテクチャのためだけのものである。 その他の多くのアーキテクチャでは存在しないか、常にエラーを返す。"
5950
5951 #. type: Plain text
5952 #: build/C/man2/iopl.2:76
5953 msgid "I<level> is greater than 3."
5954 msgstr "引き数 I<level> が 3 より大きい。"
5955
5956 #. type: Plain text
5957 #: build/C/man2/iopl.2:79
5958 msgid "This call is unimplemented."
5959 msgstr "このシステムコールは実装されていない。"
5960
5961 #. type: Plain text
5962 #: build/C/man2/iopl.2:87
5963 msgid "The calling process has insufficient privilege to call B<iopl>(); the B<CAP_SYS_RAWIO> capability is required to raise the I/O privilege level above its current value."
5964 msgstr "呼び出し元プロセスに B<iopl>()  を呼び出すのに十分な権限がなかった。 I/O 特権レベルを現在の値より上げるには B<CAP_SYS_RAWIO> ケーパビリティが必要である。"
5965
5966 #. type: Plain text
5967 #: build/C/man2/iopl.2:91
5968 msgid "B<iopl>()  is Linux-specific and should not be used in programs that are intended to be portable."
5969 msgstr "B<ipc>()  は Linux 特有であり、 移植を意図したプログラムでは 使用してはいけない。"
5970
5971 #. type: Plain text
5972 #: build/C/man2/iopl.2:100
5973 msgid "Libc5 treats it as a system call and has a prototype in I<E<lt>unistd.hE<gt>>.  Glibc1 does not have a prototype.  Glibc2 has a prototype both in I<E<lt>sys/io.hE<gt>> and in I<E<lt>sys/perm.hE<gt>>.  Avoid the latter, it is available on i386 only."
5974 msgstr "libc5 ではシステムコールとして扱い I<E<lt>unistd.hE<gt>> にプロトタイプが存在している。 glibc1 にはプロトタイプは存在していない。 glibc2 は I<E<lt>sys/io.hE<gt>> と I<E<lt>sys/perm.hE<gt>> の両方にプロトタイプを持っている。 後者は i386 のみで利用可能なので、使用すべきではない。"
5975
5976 #. type: Plain text
5977 #: build/C/man2/iopl.2:104
5978 msgid "B<ioperm>(2), B<outb>(2), B<capabilities>(7)"
5979 msgstr "B<ioperm>(2), B<outb>(2), B<capabilities>(7)"
5980
5981 #. type: TH
5982 #: build/C/man2/ioprio_set.2:24
5983 #, no-wrap
5984 msgid "IOPRIO_SET"
5985 msgstr "IOPRIO_SET"
5986
5987 #. type: TH
5988 #: build/C/man2/ioprio_set.2:24
5989 #, no-wrap
5990 msgid "2013-02-12"
5991 msgstr "2013-02-12"
5992
5993 #. type: Plain text
5994 #: build/C/man2/ioprio_set.2:27
5995 msgid "ioprio_get, ioprio_set - get/set I/O scheduling class and priority"
5996 msgstr "ioprio_get, ioprio_set - I/O スケジューリングクラスと優先度の設定/取得"
5997
5998 #. type: Plain text
5999 #: build/C/man2/ioprio_set.2:31
6000 #, no-wrap
6001 msgid ""
6002 "B<int ioprio_get(int >I<which>B<, int >I<who>B<);>\n"
6003 "B<int ioprio_set(int >I<which>B<, int >I<who>B<, int >I<ioprio>B<);>\n"
6004 msgstr ""
6005 "B<int ioprio_get(int >I<which>B<, int >I<who>B<);>\n"
6006 "B<int ioprio_set(int >I<which>B<, int >I<who>B<, int >I<ioprio>B<);>\n"
6007
6008 #. type: Plain text
6009 #: build/C/man2/ioprio_set.2:35
6010 msgid "I<Note>: There are no glibc wrappers for these system calls; see NOTES."
6011 msgstr "I<注意>: これらのシステムコールには glibc ラッパー関数は存在しない。 「注意」の節を参照。"
6012
6013 #. type: Plain text
6014 #: build/C/man2/ioprio_set.2:42
6015 msgid "The B<ioprio_get>()  and B<ioprio_set>()  system calls respectively get and set the I/O scheduling class and priority of one or more threads."
6016 msgstr "システムコール B<ioprio_get>()  / B<ioprio_set>()  は、(1つ以上の) スレッドの I/O スケジューリングクラスと 優先度の取得/設定を行う。"
6017
6018 #. type: Plain text
6019 #: build/C/man2/ioprio_set.2:54
6020 msgid "The I<which> and I<who> arguments identify the thread(s) on which the system calls operate.  The I<which> argument determines how I<who> is interpreted, and has one of the following values:"
6021 msgstr "I<which> と I<who> 引き数でシステムコールの操作対象となるスレッドを指示する。 I<which> 引き数は、 I<who> をどのように解釈するかを決めるもので、以下のいずれか一つを指定する。"
6022
6023 #. type: TP
6024 #: build/C/man2/ioprio_set.2:54
6025 #, no-wrap
6026 msgid "B<IOPRIO_WHO_PROCESS>"
6027 msgstr "B<IOPRIO_WHO_PROCESS>"
6028
6029 #. type: Plain text
6030 #: build/C/man2/ioprio_set.2:61
6031 msgid "I<who> is a process ID or thread ID identifying a single process or thread.  If I<who> is 0, then operate on the calling thread."
6032 msgstr "I<who> は特定のプロセスやスレッドを特定するためのプロセス ID かスレッド ID である。 I<who> が 0 の場合、呼び出し元のスレッドに対して操作が行われる。"
6033
6034 #. type: TP
6035 #: build/C/man2/ioprio_set.2:61
6036 #, no-wrap
6037 msgid "B<IOPRIO_WHO_PGRP>"
6038 msgstr "B<IOPRIO_WHO_PGRP>"
6039
6040 #. type: Plain text
6041 #: build/C/man2/ioprio_set.2:68
6042 msgid "I<who> is a process group ID identifying all the members of a process group.  If I<who> is 0, then operate on the process group of which the caller is a member."
6043 msgstr "I<who> はプロセスグループ ID であり、プロセスグループの全メンバが対象となる。 I<who> が 0 の場合、 呼び出し元がメンバーとなっているプロセスグループに対して操作が行われる。"
6044
6045 #. type: TP
6046 #: build/C/man2/ioprio_set.2:68
6047 #, no-wrap
6048 msgid "B<IOPRIO_WHO_USER>"
6049 msgstr "B<IOPRIO_WHO_USER>"
6050
6051 #.  FIXME . Need to document the behavior when 'who" is specified as 0
6052 #.  See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=652443
6053 #. type: Plain text
6054 #: build/C/man2/ioprio_set.2:75
6055 msgid "I<who> is a user ID identifying all of the processes that have a matching real UID."
6056 msgstr "I<who> はユーザID であり、実 UID に一致する全プロセスが対象となる。"
6057
6058 #. type: Plain text
6059 #: build/C/man2/ioprio_set.2:98
6060 msgid "If I<which> is specified as B<IOPRIO_WHO_PGRP> or B<IOPRIO_WHO_USER> when calling B<ioprio_get>(), and more than one process matches I<who>, then the returned priority will be the highest one found among all of the matching processes.  One priority is said to be higher than another one if it belongs to a higher priority class (B<IOPRIO_CLASS_RT> is the highest priority class; B<IOPRIO_CLASS_IDLE> is the lowest)  or if it belongs to the same priority class as the other process but has a higher priority level (a lower priority number means a higher priority level)."
6061 msgstr "B<ioprio_get>()  の呼び出し時に I<which> に B<IOPRIO_WHO_PGRP> か B<IOPRIO_WHO_USER> が指定され、 I<who> に一致するプロセスが複数あった場合、 一致するプロセス全体の中で最も高い優先度が返される。 優先度が高いとは、より高い優先度クラスに属している (B<IOPRIO_CLASS_RT> が最も高い優先度クラスで、 B<IOPRIO_CLASS_IDLE> が最も低い)、もしくは 同じ優先度クラスに属しているが優先度レベルが高い (優先度番号が小さい方が優先度レベルが高いことを意味する)、 ということである。"
6062
6063 #. type: Plain text
6064 #: build/C/man2/ioprio_set.2:108
6065 msgid "The I<ioprio> argument given to B<ioprio_set>()  is a bit mask that specifies both the scheduling class and the priority to be assigned to the target process(es).  The following macros are used for assembling and dissecting I<ioprio> values:"
6066 msgstr "B<ioprio_set>()  に渡す I<ioprio> 引き数は、対象となるプロセスに割り当てるスケジューリングクラスと 優先度の両方を指定するビットマスクである。 I<ioprio> の値を組み立てたり解釈するのに、以下のマクロが利用できる。"
6067
6068 #. type: TP
6069 #: build/C/man2/ioprio_set.2:108
6070 #, no-wrap
6071 msgid "B<IOPRIO_PRIO_VALUE(>I<class>B<, >I<data>B<)>"
6072 msgstr "B<IOPRIO_PRIO_VALUE(>I<class>B<, >I<data>B<)>"
6073
6074 #. type: Plain text
6075 #: build/C/man2/ioprio_set.2:117
6076 msgid "Given a scheduling I<class> and priority (I<data>), this macro combines the two values to produce an I<ioprio> value, which is returned as the result of the macro."
6077 msgstr "スケジューリングクラス I<class> と優先度 (I<data>)  を与えると、このマクロは 2つの値を組み合わせて、 I<ioprio> 値を生成し、マクロの結果として返す。"
6078
6079 #. type: TP
6080 #: build/C/man2/ioprio_set.2:117
6081 #, no-wrap
6082 msgid "B<IOPRIO_PRIO_CLASS(>I<mask>B<)>"
6083 msgstr "B<IOPRIO_PRIO_CLASS(>I<mask>B<)>"
6084
6085 #. type: Plain text
6086 #: build/C/man2/ioprio_set.2:129
6087 msgid "Given I<mask> (an I<ioprio> value), this macro returns its I/O class component, that is, one of the values B<IOPRIO_CLASS_RT>, B<IOPRIO_CLASS_BE>, or B<IOPRIO_CLASS_IDLE>."
6088 msgstr "I<mask> (I<ioprio> 値) を与えると、このマクロは I/O クラス要素、つまり B<IOPRIO_CLASS_RT>, B<IOPRIO_CLASS_BE>, B<IOPRIO_CLASS_IDLE> のいずれか一つの値を返す。"
6089
6090 #. type: TP
6091 #: build/C/man2/ioprio_set.2:129
6092 #, no-wrap
6093 msgid "B<IOPRIO_PRIO_DATA(>I<mask>B<)>"
6094 msgstr "B<IOPRIO_PRIO_DATA(>I<mask>B<)>"
6095
6096 #. type: Plain text
6097 #: build/C/man2/ioprio_set.2:138
6098 msgid "Given I<mask> (an I<ioprio> value), this macro returns its priority (I<data>)  component."
6099 msgstr "I<mask> (I<ioprio> 値) を与えると、このマクロは優先度 (I<data>)  要素を返す。"
6100
6101 #. type: Plain text
6102 #: build/C/man2/ioprio_set.2:141
6103 msgid "See the NOTES section for more information on scheduling classes and priorities."
6104 msgstr "スケジューリングクラスと優先度に関する詳しい情報は、 「備考」の節を参照のこと。"
6105
6106 #. type: Plain text
6107 #: build/C/man2/ioprio_set.2:149
6108 msgid "I/O priorities are supported for reads and for synchronous (B<O_DIRECT>, B<O_SYNC>)  writes.  I/O priorities are not supported for asynchronous writes because they are issued outside the context of the program dirtying the memory, and thus program-specific priorities do not apply."
6109 msgstr "I/O 優先度は読み出しと同期書き込み (B<O_DIRECT>, B<O_SYNC>)  に対応している。 I/O 優先度は非同期書き込みには対応していない。なぜなら、 非同期書き込みはメモリ書き換えを行うプログラムの動作 (context) とは 関係なく発行され、そのためプログラム単位の優先度は適用されないから である。"
6110
6111 #. type: Plain text
6112 #: build/C/man2/ioprio_set.2:162
6113 msgid "On success, B<ioprio_get>()  returns the I<ioprio> value of the process with highest I/O priority of any of the processes that match the criteria specified in I<which> and I<who>.  On error, -1 is returned, and I<errno> is set to indicate the error."
6114 msgstr "成功すると、 B<ioprio_get>()  は、 I<which> と I<who> で指定された基準に合致した全プロセスで最も高い I/O 優先度を持つプロセスの I<ioprio> 値を返す。 エラーの場合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
6115
6116 #. type: Plain text
6117 #: build/C/man2/ioprio_set.2:169
6118 msgid "On success, B<ioprio_set>()  returns 0.  On error, -1 is returned, and I<errno> is set to indicate the error."
6119 msgstr "成功すると、 B<ioprio_set>()  は 0 を返す。 エラーの場合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
6120
6121 #. type: Plain text
6122 #: build/C/man2/ioprio_set.2:179
6123 msgid "Invalid value for I<which> or I<ioprio>.  Refer to the NOTES section for available scheduler classes and priority levels for I<ioprio>."
6124 msgstr "I<which> か I<ioprio> の値が不正である。 I<ioprio> 用に指定可能なスケジューラクラスと優先度レベルについては 「備考」を参照のこと。"
6125
6126 #. type: Plain text
6127 #: build/C/man2/ioprio_set.2:187
6128 msgid "The calling process does not have the privilege needed to assign this I<ioprio> to the specified process(es).  See the NOTES section for more information on required privileges for B<ioprio_set>()."
6129 msgstr "呼び出し元プロセスが、指定されたプロセスに I<ioprio> を割り当てるのに必要な権限を持っていない。 B<ioprio_set>()  に必要な権限についての詳しい情報は「備考」の節を参照のこと。"
6130
6131 #. type: Plain text
6132 #: build/C/man2/ioprio_set.2:193
6133 msgid "No process(es) could be found that matched the specification in I<which> and I<who>."
6134 msgstr "I<which> と I<who> で指定された基準に合致するプロセスが見つからなかった。"
6135
6136 #. type: Plain text
6137 #: build/C/man2/ioprio_set.2:196
6138 msgid "These system calls have been available on Linux since kernel 2.6.13."
6139 msgstr "これらのシステムコールはカーネル 2.6.13 以降の Linux で利用可能である。"
6140
6141 #. type: Plain text
6142 #: build/C/man2/ioprio_set.2:201
6143 msgid "Glibc does not provide a wrapper for these system calls; call them using B<syscall>(2)."
6144 msgstr "glibc はこれらのシステムコールに対するラッパー関数を提供していない。 B<syscall>(2)  を使って呼び出すこと。"
6145
6146 #. type: Plain text
6147 #: build/C/man2/ioprio_set.2:220
6148 msgid "Two or more processes or threads can share an I/O context.  This will be the case when B<clone>(2)  was called with the B<CLONE_IO> flag.  However, by default, the distinct threads of a process will B<not> share the same I/O context.  This means that if you want to change the I/O priority of all threads in a process, you may need to call B<ioprio_set>()  on each of the threads.  The thread ID that you would need for this operation is the one that is returned by B<gettid>(2)  or B<clone>(2)."
6149 msgstr "複数のプロセスやスレッドが一つの I/O コンテキストを共有する場合がある。 B<clone>(2) を B<CLONE_IO> フラグ付きで呼び出した場合にはこの状況となる。 しかしながら、デフォルトでは、一つのプロセスの個々のスレッドは I/O コンテキストを共有「しない」。 したがって、 プロセス内のすべてのスレッドの I/O 優先度を変更したい場合には、 それぞれのスレッドに対して B<ioprio_set>() を呼び出す必要がある。 この操作を行うのに必要となるスレッド ID には B<gettid>(2) か B<clone>(2) が返す値を指定する。"
6150
6151 #. type: Plain text
6152 #: build/C/man2/ioprio_set.2:225
6153 msgid "These system calls have an effect only when used in conjunction with an I/O scheduler that supports I/O priorities.  As at kernel 2.6.17 the only such scheduler is the Completely Fair Queuing (CFQ) I/O scheduler."
6154 msgstr "これらのシステムコールは、I/O 優先度に対応した I/O スケジューラと 組み合わせて使用された場合にのみ効果を持つ。 カーネル 2.6.17 では、この条件を満たすスケジューラは Completely Fair Queuing (CFQ) I/O スケジューラだけである。"
6155
6156 #. type: SS
6157 #: build/C/man2/ioprio_set.2:225
6158 #, no-wrap
6159 msgid "Selecting an I/O scheduler"
6160 msgstr "I/O スケジューラの選択"
6161
6162 #. type: Plain text
6163 #: build/C/man2/ioprio_set.2:229
6164 msgid "I/O Schedulers are selected on a per-device basis via the special file I</sys/block/E<lt>deviceE<gt>/queue/scheduler>."
6165 msgstr "I/O スケジューラの選択はデバイス単位に行われ、その選択は スペシャルファイル I</sys/block/E<lt>deviceE<gt>/queue/scheduler> 経由で行われる。"
6166
6167 #. type: Plain text
6168 #: build/C/man2/ioprio_set.2:235
6169 msgid "One can view the current I/O scheduler via the I</sys> filesystem.  For example, the following command displays a list of all schedulers currently loaded in the kernel:"
6170 msgstr "現在の I/O スケジューラは I</sys> ファイルシステム経由で参照できる。例えば、以下のコマンドを実行すると、 現在カーネルでロードされているスケジューラの全リストが表示される。"
6171
6172 #. type: Plain text
6173 #: build/C/man2/ioprio_set.2:240
6174 #, no-wrap
6175 msgid ""
6176 "$B< cat /sys/block/hda/queue/scheduler>\n"
6177 "noop anticipatory deadline [cfq]\n"
6178 msgstr ""
6179 "$B< cat /sys/block/hda/queue/scheduler>\n"
6180 "noop anticipatory deadline [cfq]\n"
6181
6182 #. type: Plain text
6183 #: build/C/man2/ioprio_set.2:254
6184 msgid "The scheduler surrounded by brackets is the one actually in use for the device (I<hda> in the example).  Setting another scheduler is done by writing the name of the new scheduler to this file.  For example, the following command will set the scheduler for the I<hda> device to I<cfq>:"
6185 msgstr "括弧で囲まれたスケジューラがそのデバイス (上の例では I<hda>)  について実際に使用されているスケジューラである。 別のスケジューラを設定するには、このファイルに新しいスケジューラ名を 書き込めばよい。例えば、以下のコマンドを実行すると、デバイス I<hda> のスケジューラとして I<cfq> が設定される。"
6186
6187 #. type: Plain text
6188 #: build/C/man2/ioprio_set.2:260
6189 #, no-wrap
6190 msgid ""
6191 "$B< su>\n"
6192 "Password:\n"
6193 "#B< echo cfq E<gt> /sys/block/hda/queue/scheduler>\n"
6194 msgstr ""
6195 "$B< su>\n"
6196 "Password:\n"
6197 "#B< echo cfq E<gt> /sys/block/hda/queue/scheduler>\n"
6198
6199 #. type: SS
6200 #: build/C/man2/ioprio_set.2:262
6201 #, no-wrap
6202 msgid "The Completely Fair Queuing (CFQ) I/O scheduler"
6203 msgstr "Completely Fair Queuing (CFQ) I/O スケジューラ"
6204
6205 #. type: Plain text
6206 #: build/C/man2/ioprio_set.2:268
6207 msgid "Since v3 (aka CFQ Time Sliced) CFQ implements I/O nice levels similar to those of CPU scheduling.  These nice levels are grouped in three scheduling classes each one containing one or more priority levels:"
6208 msgstr "バージョン 3 (別名 CFQ Time Sliced) 以降、 CPU スケジューリングと同様の I/O nice レベルが CFQ に実装されている。 これらの nice レベルは 3つのスケジューリングクラスに分類でき、 各スケジューリングクラスにつき 1つ以上の優先度レベルが定義されている。"
6209
6210 #. type: TP
6211 #: build/C/man2/ioprio_set.2:268
6212 #, no-wrap
6213 msgid "B<IOPRIO_CLASS_RT> (1)"
6214 msgstr "B<IOPRIO_CLASS_RT> (1)"
6215
6216 #. type: Plain text
6217 #: build/C/man2/ioprio_set.2:283
6218 msgid "This is the real-time I/O class.  This scheduling class is given higher priority than any other class: processes from this class are given first access to the disk every time.  Thus this I/O class needs to be used with some care: one I/O real-time process can starve the entire system.  Within the real-time class, there are 8 levels of class data (priority) that determine exactly how much time this process needs the disk for on each service.  The highest real-time priority level is 0; the lowest is 7.  In the future this might change to be more directly mappable to performance, by passing in a desired data rate instead."
6219 msgstr "これはリアルタイム I/O クラスである。 このスケジューリングクラスには他のクラスよりも高い優先度が与えられる。 このクラスのプロセスには、常にディスクへのアクセスが優先して 割り当てられる。そのため、この I/O クラスを使う際には、 たった一つの リアルタイム I/O クラスのプロセスにより システム全体のディスクアクセスができなくなってしまうことがある という点に、注意を払う必要がある。 このクラスには、8 段階の class data (優先度レベル) がある。 この値は、そのプロセスが 1回のディスクアクセスにどれだけの 時間が必要かを正確に決めるためのものである。 最高のリアルタイム優先度レベルは 0 で、最低は 7 である。 将来的には、優先度レベルは、希望するデータレートを渡すなど、 より直接的に性能条件を反映できるように変更されるかもしれない。"
6220
6221 #. type: TP
6222 #: build/C/man2/ioprio_set.2:283
6223 #, no-wrap
6224 msgid "B<IOPRIO_CLASS_BE> (2)"
6225 msgstr "B<IOPRIO_CLASS_BE> (2)"
6226
6227 #. type: Plain text
6228 #: build/C/man2/ioprio_set.2:296
6229 msgid "This is the best-effort scheduling class, which is the default for any process that hasn't set a specific I/O priority.  The class data (priority) determines how much I/O bandwidth the process will get.  Best-effort priority levels are analogous to CPU nice values (see B<getpriority>(2)).  The priority level determines a priority relative to other processes in the best-effort scheduling class.  Priority levels range from 0 (highest) to 7 (lowest)."
6230 msgstr "これは ベストエフォートスケジューリングクラスである。 このクラスは、特定の I/O 優先度を設定していないプロセスの デフォルト値である。 class data (優先度レベル) により、そのプロセスがどの程度の I/O 帯域を得られるかが決定される。 ベストエフォート優先度レベルは、CPU の nice 値 (B<getpriority>(2)  参照) と同様のものである。 優先度レベルは、ベストエフォートスケジューリングクラスの中で 他のプロセスとの相対的な優先度を決定する。 優先度レベルの値の範囲は 0 (最高) から 7 (最低) である。"
6231
6232 #. type: TP
6233 #: build/C/man2/ioprio_set.2:296
6234 #, no-wrap
6235 msgid "B<IOPRIO_CLASS_IDLE> (3)"
6236 msgstr "B<IOPRIO_CLASS_IDLE> (3)"
6237
6238 #. type: Plain text
6239 #: build/C/man2/ioprio_set.2:305
6240 msgid "This is the idle scheduling class.  Processes running at this level only get I/O time when no-one else needs the disk.  The idle class has no class data.  Attention is required when assigning this priority class to a process, since it may become starved if higher priority processes are constantly accessing the disk."
6241 msgstr "これは idle スケジューリングクラスである。 このレベルで動作するプロセスは他にディスクアクセスをしようとする プロセスがない場合にのみ I/O 時間を取得する。 idle クラスには class data (優先度) は用意されていない。 プロセスにこの優先度を割り当てる際には注意が必要である。 なぜなら、優先度の高いプロセスが常にディスクにアクセスしている場合には ディスクにアクセスできなくなる可能性があるからだ。"
6242
6243 #. type: Plain text
6244 #: build/C/man2/ioprio_set.2:309
6245 msgid "Refer to I<Documentation/block/ioprio.txt> for more information on the CFQ I/O Scheduler and an example program."
6246 msgstr "CFQ I/O スケジューラの更なる情報とサンプルプログラムについては I<Documentation/block/ioprio.txt> を参照のこと。"
6247
6248 #. type: SS
6249 #: build/C/man2/ioprio_set.2:309
6250 #, no-wrap
6251 msgid "Required permissions to set I/O priorities"
6252 msgstr "I/O 優先度の設定に必要な許可"
6253
6254 #. type: Plain text
6255 #: build/C/man2/ioprio_set.2:312
6256 msgid "Permission to change a process's priority is granted or denied based on two assertions:"
6257 msgstr "プロセスの優先度を変更する許可が得られるかどうかは 以下の 2つの条件に基いて決定される。"
6258
6259 #. type: TP
6260 #: build/C/man2/ioprio_set.2:312
6261 #, no-wrap
6262 msgid "B<Process ownership>"
6263 msgstr "B<プロセスの所有権>"
6264
6265 #. type: Plain text
6266 #: build/C/man2/ioprio_set.2:320
6267 msgid "An unprivileged process may set only the I/O priority of a process whose real UID matches the real or effective UID of the calling process.  A process which has the B<CAP_SYS_NICE> capability can change the priority of any process."
6268 msgstr "非特権プロセスは、プロセスの実 UID が呼び出し元プロセスの実 UID もしくは 実効 UID と一致するプロセスの I/O 優先度のみを設定できる。 B<CAP_SYS_NICE> ケーパビリティを持つプロセスは、どのプロセスの優先度でも変更できる。"
6269
6270 #. type: TP
6271 #: build/C/man2/ioprio_set.2:320
6272 #, no-wrap
6273 msgid "B<What is the desired priority>"
6274 msgstr "B<どの優先度に設定しようとしているか>"
6275
6276 #. type: Plain text
6277 #: build/C/man2/ioprio_set.2:332
6278 msgid "Attempts to set very high priorities (B<IOPRIO_CLASS_RT>)  require the B<CAP_SYS_ADMIN> capability.  Kernel versions up to 2.6.24 also required B<CAP_SYS_ADMIN> to set a very low priority (B<IOPRIO_CLASS_IDLE>), but since Linux 2.6.25, this is no longer required."
6279 msgstr "非常に高い優先度 (B<IOPRIO_CLASS_RT>)  を設定しようとする場合、 B<CAP_SYS_ADMIN> ケーパビリティが必要である。 カーネル 2.6.24 以前では、非常に低い優先度 (B<IOPRIO_CLASS_IDLE>)  を設定するためにも B<CAP_SYS_ADMIN> ケーパビリティが必要であったが、 Linux 2.6.25 以降ではもはや必要なくなった。"
6280
6281 #. type: Plain text
6282 #: build/C/man2/ioprio_set.2:337
6283 msgid "A call to B<ioprio_set>()  must follow both rules, or the call will fail with the error B<EPERM>."
6284 msgstr "B<ioprio_set>()  はこの両方のルールに従い、条件を満たさない場合、エラー B<EPERM> で失敗する。"
6285
6286 #.  6 May 07: Bug report raised:
6287 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=4464
6288 #.  Ulrich Drepper replied that he wasn't going to add these
6289 #.  to glibc.
6290 #. type: Plain text
6291 #: build/C/man2/ioprio_set.2:346
6292 msgid "Glibc does not yet provide a suitable header file defining the function prototypes and macros described on this page.  Suitable definitions can be found in I<linux/ioprio.h>."
6293 msgstr "glibc は、このページに記載された関数プロトタイプやマクロを定義する 適切なヘッダファイルをまだ提供していない。 必要な定義については I<linux/ioprio.h> を見ればよい。"
6294
6295 #. type: Plain text
6296 #: build/C/man2/ioprio_set.2:351
6297 msgid "B<ionice>(1), B<getpriority>(2), B<open>(2), B<capabilities>(7)"
6298 msgstr "B<ionice>(1), B<getpriority>(2), B<open>(2), B<capabilities>(7)"
6299
6300 #. type: Plain text
6301 #: build/C/man2/ioprio_set.2:354
6302 msgid "I<Documentation/block/ioprio.txt> in the Linux kernel source tree"
6303 msgstr "Linux カーネルソース内の I<Documentation/block/ioprio.txt>"
6304
6305 #. type: TH
6306 #: build/C/man2/ipc.2:25
6307 #, no-wrap
6308 msgid "IPC"
6309 msgstr "IPC"
6310
6311 #. type: TH
6312 #: build/C/man2/ipc.2:25
6313 #, no-wrap
6314 msgid "2012-10-16"
6315 msgstr "2012-10-16"
6316
6317 #. type: Plain text
6318 #: build/C/man2/ipc.2:28
6319 msgid "ipc - System V IPC system calls"
6320 msgstr "ipc - System V IPC システムコール"
6321
6322 #. type: Plain text
6323 #: build/C/man2/ipc.2:33
6324 #, no-wrap
6325 msgid ""
6326 "B<int ipc(unsigned int >I<call>B<, int >I<first>B<, int >I<second>B<, int >I<third>B<,>\n"
6327 "B<        void *>I<ptr>B<, long >I<fifth>B<);>\n"
6328 msgstr ""
6329 "B<int ipc(unsigned int >I<call>B<, int >I<first>B<, int >I<second>B<, int >I<third>B<,>\n"
6330 "B<        void *>I<ptr>B<, long >I<fifth>B<);>\n"
6331
6332 #. type: Plain text
6333 #: build/C/man2/ipc.2:41
6334 msgid "B<ipc>()  is a common kernel entry point for the System\\ V IPC calls for messages, semaphores, and shared memory.  I<call> determines which IPC function to invoke; the other arguments are passed through to the appropriate call."
6335 msgstr "B<ipc>()  は メッセージ、セマフォー、共有メモリに関する System\\ V IPC コールの 共通のカーネルへのエントリポイントである。 I<call> はどの IPC 関数を呼び出すかを決め; 他の引き数は適切なコールへと渡される。"
6336
6337 #. type: Plain text
6338 #: build/C/man2/ipc.2:45
6339 msgid "User programs should call the appropriate functions by their usual names.  Only standard library implementors and kernel hackers need to know about B<ipc>()."
6340 msgstr "ユーザープログラムは通常の名前で適切な関数を呼び出すべきである。 標準ライブラリの実装者やカーネルハッカーのみが B<ipc>()  について知る必要がある。"
6341
6342 #. type: Plain text
6343 #: build/C/man2/ipc.2:49
6344 msgid "B<ipc>()  is Linux-specific, and should not be used in programs intended to be portable."
6345 msgstr "B<ipc>()  は Linux 特有であり、 移植を意図したプログラムでは 使用してはいけない。"
6346
6347 #. type: Plain text
6348 #: build/C/man2/ipc.2:57
6349 msgid "On some architectures\\(emfor example x86-64 and ARM\\(emthere is no B<ipc>()  system call; instead B<msgctl>(2), B<semctl>(2), B<shmctl>(2), and so on really are implemented as separate system calls."
6350 msgstr "いくつかのアーキテクチャ\\(emfor 例えば x86-64 や ARM\\(emでは、システムコール B<ipc>()  が存在しない。実際には、その代わりに B<msgctl>(2), B<semctl>(2), B<shmctl>(2)  などが独立したシステムコールとして実装されている。"
6351
6352 #. type: Plain text
6353 #: build/C/man2/ipc.2:70
6354 msgid "B<msgctl>(2), B<msgget>(2), B<msgrcv>(2), B<msgsnd>(2), B<semctl>(2), B<semget>(2), B<semop>(2), B<semtimedop>(2), B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<shmget>(2)"
6355 msgstr "B<msgctl>(2), B<msgget>(2), B<msgrcv>(2), B<msgsnd>(2), B<semctl>(2), B<semget>(2), B<semop>(2), B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<shmget>(2)"
6356
6357 #. type: TH
6358 #: build/C/man7/namespaces.7:27
6359 #, no-wrap
6360 msgid "NAMESPACES"
6361 msgstr "NAMESPACES"
6362
6363 #. type: Plain text
6364 #: build/C/man7/namespaces.7:30
6365 msgid "namespaces - overview of Linux namespaces"
6366 msgstr "namespaces - Linux 名前空間の概要"
6367
6368 #. type: Plain text
6369 #: build/C/man7/namespaces.7:37
6370 msgid "A namespace wraps a global system resource in an abstraction that makes it appear to the processes within the namespace that they have their own isolated instance of the global resource.  Changes to the global resource are visible to other processes that are members of the namespace, but are invisible to other processes.  One use of namespaces is to implement containers."
6371 msgstr "名前空間は、 グローバルシステムリソースを抽象化層で覆うことで、 名前空間内のプロセスに対して、 自分たちが専用の分離されたグローバルリソースを持っているかのように見せる仕組みである。 グローバルリソースへの変更は、 名前空間のメンバーである他のプロセスには見えるが、 それ以外のプロセスには見えない。 名前空間の一つの利用方法はコンテナーの実装である。"
6372
6373 #. type: Plain text
6374 #: build/C/man7/namespaces.7:39
6375 msgid "Linux provides the following namespaces:"
6376 msgstr "Linux では以下の名前空間が提供される。"
6377
6378 #. type: tbl table
6379 #: build/C/man7/namespaces.7:42
6380 #, no-wrap
6381 msgid "Namespace\tConstant\tIsolates\n"
6382 msgstr "名前空間\t定数\t分離対象\n"
6383
6384 #. type: tbl table
6385 #: build/C/man7/namespaces.7:43
6386 #, no-wrap
6387 msgid "IPC\tCLONE_NEWIPC\tSystem V IPC, POSIX message queues\n"
6388 msgstr "IPC\tCLONE_NEWIPC\tSystem V IPC, POSIX メッセージキュー\n"
6389
6390 #. type: tbl table
6391 #: build/C/man7/namespaces.7:44
6392 #, no-wrap
6393 msgid "Network\tCLONE_NEWNET\tNetwork devices, stacks, ports, etc.\n"
6394 msgstr "Network\tCLONE_NEWNET\tネットワークデバイス、スタック、ポートなど\n"
6395
6396 #. type: tbl table
6397 #: build/C/man7/namespaces.7:45
6398 #, no-wrap
6399 msgid "Mount\tCLONE_NEWNS\tMount points\n"
6400 msgstr "Mount\tCLONE_NEWNS\tマウントポイント\n"
6401
6402 #. type: tbl table
6403 #: build/C/man7/namespaces.7:46
6404 #, no-wrap
6405 msgid "PID\tCLONE_NEWPID\tProcess IDs\n"
6406 msgstr "PID\tCLONE_NEWPID\tプロセス ID\n"
6407
6408 #. type: tbl table
6409 #: build/C/man7/namespaces.7:47
6410 #, no-wrap
6411 msgid "User\tCLONE_NEWUSER\tUser and group IDs\n"
6412 msgstr "User\tCLONE_NEWUSER\tユーザー ID とグループ ID\n"
6413
6414 #. type: tbl table
6415 #: build/C/man7/namespaces.7:48
6416 #, no-wrap
6417 msgid "UTS\tCLONE_NEWUTS\tHostname and NIS domain name\n"
6418 msgstr "UTS\tCLONE_NEWUTS\tホスト名と NIS ドメイン名\n"
6419
6420 #
6421 #.  ==================== The namespaces API ====================
6422 #. type: Plain text
6423 #: build/C/man7/namespaces.7:57
6424 msgid "This page describes the various namespaces and the associated I</proc> files, and summarizes the APIs for working with namespaces."
6425 msgstr "このページでは、各種の名前空間と関連する I</proc> ファイルの説明と、名前空間とともに動作する API の概要を紹介する。"
6426
6427 #. type: SS
6428 #: build/C/man7/namespaces.7:57
6429 #, no-wrap
6430 msgid "The namespaces API"
6431 msgstr "名前空間 API"
6432
6433 #. type: Plain text
6434 #: build/C/man7/namespaces.7:62
6435 msgid "As well as various I</proc> files described below, the namespaces API includes the following system calls:"
6436 msgstr "後で説明する種々の I</proc> ファイル以外に、名前空間 API として以下のシステムコールがある。"
6437
6438 #. type: TP
6439 #: build/C/man7/namespaces.7:62
6440 #, no-wrap
6441 msgid "B<clone>(2)"
6442 msgstr "B<clone>(2)"
6443
6444 #. type: Plain text
6445 #: build/C/man7/namespaces.7:75
6446 msgid "The B<clone>(2)  system call creates a new process.  If the I<flags> argument of the call specifies one or more of the B<CLONE_NEW*> flags listed below, then new namespaces are created for each flag, and the child process is made a member of those namespaces.  (This system call also implements a number of features unrelated to namespaces.)"
6447 msgstr "B<clone>(2) システムコールは新しいプロセスを作成する。 呼び出し時に I<flags> 引き数で以下のリストにある B<CLONE_NEW*> のフラグを一つ以上指定すると、 各フラグに対応する新しい名前空間が作成され、 子プロセスはこれらの名前空間のメンバーになる。 (このシステムコールは名前空間とは関係のない機能も多数実装している。)"
6448
6449 #. type: TP
6450 #: build/C/man7/namespaces.7:75
6451 #, no-wrap
6452 msgid "B<setns>(2)"
6453 msgstr "B<setns>(2)"
6454
6455 #. type: Plain text
6456 #: build/C/man7/namespaces.7:84
6457 msgid "The B<setns>(2)  system call allows the calling process to join an existing namespace.  The namespace to join is specified via a file descriptor that refers to one of the I</proc/[pid]/ns> files described below."
6458 msgstr "B<setns>(2) システムコールを使うと、呼び出したプロセスを既存の名前空間に参加させることができる。 参加する名前空間は、 以下で説明する I</proc/[pid]/ns> ファイルのいずれか一つを参照するファイルディスクリプタを使って指定する。"
6459
6460 #. type: TP
6461 #: build/C/man7/namespaces.7:84
6462 #, no-wrap
6463 msgid "B<unshare>(2)"
6464 msgstr "B<unshare>(2)"
6465
6466 #. type: Plain text
6467 #: build/C/man7/namespaces.7:97
6468 msgid "The B<unshare>(2)  system call moves the calling process to a new namespace.  If the I<flags> argument of the call specifies one or more of the B<CLONE_NEW*> flags listed below, then new namespaces are created for each flag, and the calling process is made a member of those namespaces.  (This system call also implements a number of features unrelated to namespaces.)"
6469 msgstr "B<unshare>(2) システムコールは、 呼び出したプロセスを新しい名前空間に移動する。 呼び出し時の I<flags> 引き数に以下のリストにある B<CLONE_NEW*> フラグを一つ以上指定すると、 各フラグに対応する新しい名前空間が作成され、 呼び出したプロセスがこれらの名前空間のメンバーになる。 (このシステムコールは名前空間とは関係のない機能も多数実装している。)"
6470
6471 #
6472 #.  ==================== The /proc/[pid]/ns/ directory ====================
6473 #. type: Plain text
6474 #: build/C/man7/namespaces.7:110
6475 msgid "Creation of new namespaces using B<clone>(2)  and B<unshare>(2)  in most cases requires the B<CAP_SYS_ADMIN> capability.  User namespaces are the exception: since Linux 3.8, no privilege is required to create a user namespace."
6476 msgstr "B<clone>(2) と B<unshare>(2) を使った新しい名前空間の作成のほとんどの場合で B<CAP_SYS_ADMIN> ケーパビリティが必要である。 ユーザー名前空間は例外で、 Linux 3.8 以降ではユーザー名前空間を作成するのに特権が不要である。"
6477
6478 #. type: SS
6479 #: build/C/man7/namespaces.7:110
6480 #, no-wrap
6481 msgid "The /proc/[pid]/ns/ directory"
6482 msgstr "/proc/[pid]/ns/ ディレクトリ"
6483
6484 #.  See commit 6b4e306aa3dc94a0545eb9279475b1ab6209a31f
6485 #. type: Plain text
6486 #: build/C/man7/namespaces.7:117
6487 msgid "Each process has a I</proc/[pid]/ns/> subdirectory containing one entry for each namespace that supports being manipulated by B<setns>(2):"
6488 msgstr "各プロセスには I</proc/[pid]/ns/> サブディレクトリがあり、 このサブディレクトリには B<setns>(2) での操作がサポートされている名前空間単位にエントリが存在する。"
6489
6490 #. type: Plain text
6491 #: build/C/man7/namespaces.7:128
6492 #, no-wrap
6493 msgid ""
6494 "$ B<ls -l /proc/$$/ns>\n"
6495 "total 0\n"
6496 "lrwxrwxrwx. 1 mtk mtk 0 Jan 14 01:20 ipc -E<gt> ipc:[4026531839]\n"
6497 "lrwxrwxrwx. 1 mtk mtk 0 Jan 14 01:20 mnt -E<gt> mnt:[4026531840]\n"
6498 "lrwxrwxrwx. 1 mtk mtk 0 Jan 14 01:20 net -E<gt> net:[4026531956]\n"
6499 "lrwxrwxrwx. 1 mtk mtk 0 Jan 14 01:20 pid -E<gt> pid:[4026531836]\n"
6500 "lrwxrwxrwx. 1 mtk mtk 0 Jan 14 01:20 user -E<gt> user:[4026531837]\n"
6501 "lrwxrwxrwx. 1 mtk mtk 0 Jan 14 01:20 uts -E<gt> uts:[4026531838]\n"
6502 msgstr ""
6503 "$ B<ls -l /proc/$$/ns>\n"
6504 "total 0\n"
6505 "lrwxrwxrwx. 1 mtk mtk 0 Jan 14 01:20 ipc -E<gt> ipc:[4026531839]\n"
6506 "lrwxrwxrwx. 1 mtk mtk 0 Jan 14 01:20 mnt -E<gt> mnt:[4026531840]\n"
6507 "lrwxrwxrwx. 1 mtk mtk 0 Jan 14 01:20 net -E<gt> net:[4026531956]\n"
6508 "lrwxrwxrwx. 1 mtk mtk 0 Jan 14 01:20 pid -E<gt> pid:[4026531836]\n"
6509 "lrwxrwxrwx. 1 mtk mtk 0 Jan 14 01:20 user -E<gt> user:[4026531837]\n"
6510 "lrwxrwxrwx. 1 mtk mtk 0 Jan 14 01:20 uts -E<gt> uts:[4026531838]\n"
6511
6512 #. type: Plain text
6513 #: build/C/man7/namespaces.7:138
6514 msgid "Bind mounting (see B<mount>(2))  one of the files in this directory to somewhere else in the filesystem keeps the corresponding namespace of the process specified by I<pid> alive even if all processes currently in the namespace terminate."
6515 msgstr "このディレクトリ内のファイルのいずれかをファイルシステムの他のどこかにバインドマウント (B<mount>(2) 参照) することで、 その名前空間のすべてのプロセスが終了した場合でも、 I<pid> で指定したプロセスの対応する名前空間を保持することができる。"
6516
6517 #. type: Plain text
6518 #: build/C/man7/namespaces.7:149
6519 msgid "Opening one of the files in this directory (or a file that is bind mounted to one of these files)  returns a file handle for the corresponding namespace of the process specified by I<pid>.  As long as this file descriptor remains open, the namespace will remain alive, even if all processes in the namespace terminate.  The file descriptor can be passed to B<setns>(2)."
6520 msgstr "このディレクトリ内のファイルのいずれか (またはこれらのファイルのいずれかにバインドマウントされたファイル) をオープンすると、 I<pid> で指定されたプロセスの対応する名前空間に対するファイルハンドルが返される。 このファイルディスクリプタがオープンされている限り、 その名前空間のすべてのプロセスが終了した場合であっても、 その名前空間は存在し続ける。 このファイルディスクリプタは B<setns>(2) に渡すことができる。"
6521
6522 #. type: Plain text
6523 #: build/C/man7/namespaces.7:160
6524 msgid "In Linux 3.7 and earlier, these files were visible as hard links.  Since Linux 3.8, they appear as symbolic links.  If two processes are in the same namespace, then the inode numbers of their I</proc/[pid]/ns/xxx> symbolic links will be the same; an application can check this using the I<stat.st_ino> field returned by B<stat>(2).  The content of this symbolic link is a string containing the namespace type and inode number as in the following example:"
6525 msgstr "Linux 3.7 以前では、これらのファイルはハードリンクとして見えていた。 Linux 3.8 以降では、これらはシンボリックリンクとして見える。 2 つのプロセスが同じ名前空間に所属している場合、 これらのプロセスの I</proc/[pid]/ns/xxx> シンボリックリンクの inode 番号は同じになる。 アプリケーションは、 B<stat>(2) が返す I<stat.st_ino> フィールドを使ってこれを確認することができる。 シンボリックリンクの内容は、 以下の例にあるように、名前空間種別と inode 番号を含む文字列である。"
6526
6527 #. type: Plain text
6528 #: build/C/man7/namespaces.7:165
6529 #, no-wrap
6530 msgid ""
6531 "$ B<readlink /proc/$$/ns/uts>\n"
6532 "uts:[4026531838]\n"
6533 msgstr ""
6534 "$ B<readlink /proc/$$/ns/uts>\n"
6535 "uts:[4026531838]\n"
6536
6537 #. type: Plain text
6538 #: build/C/man7/namespaces.7:169
6539 msgid "The files in this subdirectory are as follows:"
6540 msgstr "このサブディレクトリのファイルは以下のとおりである。"
6541
6542 #. type: TP
6543 #: build/C/man7/namespaces.7:169
6544 #, no-wrap
6545 msgid "I</proc/[pid]/ns/ipc> (since Linux 3.0)"
6546 msgstr "I</proc/[pid]/ns/ipc> (Linux 3.0 以降)"
6547
6548 #. type: Plain text
6549 #: build/C/man7/namespaces.7:172
6550 msgid "This file is a handle for the IPC namespace of the process."
6551 msgstr "このファイルはそのプロセスの IPC 名前空間の操作用である。"
6552
6553 #. type: TP
6554 #: build/C/man7/namespaces.7:172
6555 #, no-wrap
6556 msgid "I</proc/[pid]/ns/mnt> (since Linux 3.8)"
6557 msgstr "I</proc/[pid]/ns/mnt> (Linux 3.8 以降)"
6558
6559 #. type: Plain text
6560 #: build/C/man7/namespaces.7:175
6561 msgid "This file is a handle for the mount namespace of the process."
6562 msgstr "このファイルはそのプロセスのマウント名前空間の操作用である。"
6563
6564 #. type: TP
6565 #: build/C/man7/namespaces.7:175
6566 #, no-wrap
6567 msgid "I</proc/[pid]/ns/net> (since Linux 3.0)"
6568 msgstr "I</proc/[pid]/ns/net> (Linux 3.0 以降)"
6569
6570 #. type: Plain text
6571 #: build/C/man7/namespaces.7:178
6572 msgid "This file is a handle for the network namespace of the process."
6573 msgstr "このファイルはそのプロセスのネットワーク名前空間の操作用である。"
6574
6575 #. type: TP
6576 #: build/C/man7/namespaces.7:178
6577 #, no-wrap
6578 msgid "I</proc/[pid]/ns/pid> (since Linux 3.8)"
6579 msgstr "I</proc/[pid]/ns/pid> (Linux 3.8 以降)"
6580
6581 #. type: Plain text
6582 #: build/C/man7/namespaces.7:181
6583 msgid "This file is a handle for the PID namespace of the process."
6584 msgstr "このファイルはそのプロセスの PID 名前空間の操作用である。"
6585
6586 #. type: TP
6587 #: build/C/man7/namespaces.7:181
6588 #, no-wrap
6589 msgid "I</proc/[pid]/ns/user> (since Linux 3.8)"
6590 msgstr "I</proc/[pid]/ns/user> (Linux 3.8 以降)"
6591
6592 #. type: Plain text
6593 #: build/C/man7/namespaces.7:184
6594 msgid "This file is a handle for the user namespace of the process."
6595 msgstr "このファイルはそのプロセスのユーザー名前空間の操作用である。"
6596
6597 #. type: TP
6598 #: build/C/man7/namespaces.7:184
6599 #, no-wrap
6600 msgid "I</proc/[pid]/ns/uts> (since Linux 3.0)"
6601 msgstr "I</proc/[pid]/ns/uts> (Linux 3.0 以降)"
6602
6603 #
6604 #.  ==================== IPC namespaces ====================
6605 #. type: Plain text
6606 #: build/C/man7/namespaces.7:190
6607 msgid "This file is a handle for the UTS namespace of the process."
6608 msgstr "このファイルはそのプロセスの UTS 名前空間の操作用である。"
6609
6610 #. type: SS
6611 #: build/C/man7/namespaces.7:190
6612 #, no-wrap
6613 msgid "IPC namespaces (CLONE_NEWIPC)"
6614 msgstr "IPC 名前空間 (CLONE_NEWIPC)"
6615
6616 #.  commit 7eafd7c74c3f2e67c27621b987b28397110d643f
6617 #.  https://lwn.net/Articles/312232/
6618 #. type: Plain text
6619 #: build/C/man7/namespaces.7:202
6620 msgid "IPC namespaces isolate certain IPC resources, namely, System V IPC objects (see B<svipc>(7))  and (since Linux 2.6.30)  POSIX message queues (see B<mq_overview>(7)).  The common characteristic of these IPC mechanisms is that IPC objects are identified by mechanisms other than filesystem pathnames."
6621 msgstr "IPC 名前空間は、 特定の IPC リソース、すなわち、System V IPC オブジェクト (B<svipc>(7) 参照)、(Linux 2.6.30 以降では) POSIX メッセージキュー (B<mq_overview>(7) 参照) を分離する。 これらの IPC 機構に共通の特徴は、 IPC オブジェクトがファイルシステムのパス名以外の方法で識別されるという点である。"
6622
6623 #. type: Plain text
6624 #: build/C/man7/namespaces.7:208
6625 msgid "Each IPC namespace has its own set of System V IPC identifiers and its own POSIX message queue filesystem.  Objects created in an IPC namespace are visible to all other processes that are members of that namespace, but are not visible to processes in other IPC namespaces."
6626 msgstr "各 IPC 名前空間はそれぞれ、 独自の System V IPC 識別子の集合と独自の POSIX メッセージキューファイルシステムを持つ。 IPC 名前空間に作成されたオブジェクトは、 その名前空間のメンバーの他のすべてのプロセスにも見えるが、 他の IPC 名前空間のプロセスには見えない。"
6627
6628 #. type: Plain text
6629 #: build/C/man7/namespaces.7:212
6630 msgid "The following I</proc> interfaces are distinct in each IPC namespace:"
6631 msgstr "以下の I</proc> インタフェースは各 IPC 名前空間で別のものとなる。"
6632
6633 #. type: Plain text
6634 #: build/C/man7/namespaces.7:215
6635 msgid "The POSIX message queue interfaces in I</proc/sys/fs/mqueue>."
6636 msgstr "I</proc/sys/fs/mqueue> の POSIX メッセージキューインタフェース。"
6637
6638 #. type: Plain text
6639 #: build/C/man7/namespaces.7:228
6640 msgid "The System V IPC interfaces in I</proc/sys/kernel>, namely: I<msgmax>, I<msgmnb>, I<msgmni>, I<sem>, I<shmall>, I<shmmax>, I<shmmni>, and I<shm_rmid_forced>."
6641 msgstr "I</proc/sys/kernel> の System V IPC インタフェース。 すなわち、 I<msgmax>, I<msgmnb>, I<msgmni>, I<sem>, I<shmall>, I<shmmax>, I<shmmni>, I<shm_rmid_forced>。"
6642
6643 #. type: Plain text
6644 #: build/C/man7/namespaces.7:231
6645 msgid "The System V IPC interfaces in I</proc/sysvipc>."
6646 msgstr "I</proc/sysvipc> の System V IPC インタフェース。"
6647
6648 #. type: Plain text
6649 #: build/C/man7/namespaces.7:235
6650 msgid "When an IPC namespace is destroyed (i.e., when the last process that is a member of the namespace terminates), all IPC objects in the namespace are automatically destroyed."
6651 msgstr "IPC 名前空間が破棄されたときに (すなわち、その名前空間のメンバーの最後のプロセスが終了したときに)、 その名前空間内のすべての IPC オブジェクトが自動的に破棄される。"
6652
6653 #
6654 #.  ==================== Network namespaces ====================
6655 #. type: Plain text
6656 #: build/C/man7/namespaces.7:242
6657 msgid "Use of IPC namespaces requires a kernel that is configured with the B<CONFIG_IPC_NS> option."
6658 msgstr "IPC 名前空間を使用するには、設定 B<CONFIG_IPC_NS> が有効になったカーネルが必要である。"
6659
6660 #. type: SS
6661 #: build/C/man7/namespaces.7:242
6662 #, no-wrap
6663 msgid "Network namespaces (CLONE_NEWNET)"
6664 msgstr "ネットワーク名前空間 (CLONE_NEWNET)"
6665
6666 #.  FIXME Add pointer to veth(4) page when it is eventually completed
6667 #. type: Plain text
6668 #: build/C/man7/namespaces.7:257
6669 msgid "Network namespaces provide isolation of the system resources associated with networking: network devices, IPv4 and IPv6 protocol stacks, IP routing tables, firewalls, the I</proc/net> directory, the I</sys/class/net> directory, port numbers (sockets), and so on.  A physical network device can live in exactly one network namespace.  A virtual network device (\"veth\") pair provides a pipe-like abstraction that can be used to create tunnels between network namespaces, and can be used to create a bridge to a physical network device in another namespace."
6670 msgstr "ネットワーク名前空間は、 ネットワークに関連するシステムリソースの分離を提供する。 分離されるリソースは、 ネットワークデバイス、 IPv4 と IPv6 のプロトコルスタック、 IP ルーティングテーブル、 ファイアウォール、 I</proc/net> ディレクトリ、 I</sys/class/net> ディレクトリ、 (ソケットの) ポート番号などである。 物理ネットワークデバイスは 1 つのネットワーク名前空間にのみ属すことができる。 仮想ネットワークデバイス (\"veth\") ペアは、 ネットワーク名前空間間のトンネルを作成するのに使うことができるパイプ風の抽象概念で、 別の名前空間に属す物理ネットワークデバイスへのブリッジを作成するのに使用できる。"
6671
6672 #. type: Plain text
6673 #: build/C/man7/namespaces.7:262
6674 msgid "When a network namespace is freed (i.e., when the last process in the namespace terminates), its physical network devices are moved back to the initial network namespace (not to the parent of the process)."
6675 msgstr "ネットワーク名前空間が解放されたときに (すなわち、その名前空間の最後のプロセスがしゅうりょうしたときに)、 その名前空間に属していた物理ネットワークデバイスは初期ネットワーク名前空間に戻される (プロセスの親プロセスに戻されるわけではない)。"
6676
6677 #
6678 #.  ==================== Mount namespaces ====================
6679 #. type: Plain text
6680 #: build/C/man7/namespaces.7:269
6681 msgid "Use of network namespaces requires a kernel that is configured with the B<CONFIG_NET_NS> option."
6682 msgstr "ネットワーク名前空間を使用するには、設定 B<CONFIG_NET_NS> が有効になったカーネルが必要である。"
6683
6684 #. type: SS
6685 #: build/C/man7/namespaces.7:269
6686 #, no-wrap
6687 msgid "Mount namespaces (CLONE_NEWNS)"
6688 msgstr "マウント名前空間 (CLONE_NEWNS)"
6689
6690 #. type: Plain text
6691 #: build/C/man7/namespaces.7:277
6692 msgid "Mount namespaces isolate the set of filesystem mount points, meaning that processes in different mount namespaces can have different views of the filesystem hierarchy.  The set of mounts in a mount namespace is modified using B<mount>(2)  and B<umount>(2)."
6693 msgstr "マウント名前空間はファイルシステムのマウントポイントの集合を分離する。 つまり、別のマウント名前空間のプロセスには別のファイルシステム階層が見えるということである。 マウント名前空間内のマウントの集合は B<mount>(2) と B<umount>(2) で変更される。"
6694
6695 #. type: Plain text
6696 #: build/C/man7/namespaces.7:294
6697 msgid "The I</proc/[pid]/mounts> file (present since Linux 2.4.19)  lists all the filesystems currently mounted in the process's mount namespace.  The format of this file is documented in B<fstab>(5).  Since kernel version 2.6.15, this file is pollable: after opening the file for reading, a change in this file (i.e., a filesystem mount or unmount) causes B<select>(2)  to mark the file descriptor as readable, and B<poll>(2)  and B<epoll_wait>(2)  mark the file as having an error condition."
6698 msgstr "I</proc/[pid]/mounts> ファイル (Linux 2.4.19 以降に存在) は、 そのプロセスのマウント名前空間で現在マウントされている全ファイルシステムの一覧を表示する。 このファイルのフォーマットは B<fstab>(5) に記載されている。 カーネルバージョン 2.6.15 以降では、このファイルをポーリングすることができる。 すなわち、このファイルを読み出し用にオープンした後、 このファイルの変化 (ファイルシステムのマウントやアンマウント) が発生すると、 B<select>(2) はファイルディスクリプタが読み出し可能になったと印を付け、 B<poll>(2) や B<epoll_wait>(2) はファイルがエラー状態になったかのように印を付ける。"
6699
6700 #. type: Plain text
6701 #: build/C/man7/namespaces.7:302
6702 msgid "The I</proc/[pid]/mountstats> file (present since Linux 2.6.17)  exports information (statistics, configuration information)  about the mount points in the process's mount namespace.  This file is only readable by the owner of the process.  Lines in this file have the form:"
6703 msgstr "I</proc/[pid]/mountstats> ファイル (Linux 2.6.17 以降に存在) は、 そのプロセスのマウントポイントに関する情報 (統計情報、設定情報) を公開する。 このファイルはプロセスの所有者だけが読み出し可能である。 このファイルの各行は以下の形式である。"
6704
6705 #. type: Plain text
6706 #: build/C/man7/namespaces.7:308
6707 #, no-wrap
6708 msgid ""
6709 "device /dev/sda7 mounted on /home with fstype ext3 [statistics]\n"
6710 "(       1      )            ( 2 )             (3 ) (4)\n"
6711 msgstr ""
6712 "device /dev/sda7 mounted on /home with fstype ext3 [statistics]\n"
6713 "(       1      )            ( 2 )             (3 ) (4)\n"
6714
6715 #. type: Plain text
6716 #: build/C/man7/namespaces.7:312
6717 msgid "The fields in each line are:"
6718 msgstr "各行のフィールドは以下のとおりである。"
6719
6720 #. type: IP
6721 #: build/C/man7/namespaces.7:312 build/C/man7/user_namespaces.7:371
6722 #, no-wrap
6723 msgid "(1)"
6724 msgstr "(1)"
6725
6726 #. type: Plain text
6727 #: build/C/man7/namespaces.7:316
6728 msgid "The name of the mounted device (or \"nodevice\" if there is no corresponding device)."
6729 msgstr "マウントされているデバイス名 (もしくは、対応するデバイスがない場合は \"nodevice\")。"
6730
6731 #. type: IP
6732 #: build/C/man7/namespaces.7:316 build/C/man7/user_namespaces.7:375
6733 #, no-wrap
6734 msgid "(2)"
6735 msgstr "(2)"
6736
6737 #. type: Plain text
6738 #: build/C/man7/namespaces.7:319
6739 msgid "The mount point within the filesystem tree."
6740 msgstr "ファイルシステムツリー内のマウントポイント。"
6741
6742 #. type: IP
6743 #: build/C/man7/namespaces.7:319 build/C/man7/user_namespaces.7:401
6744 #, no-wrap
6745 msgid "(3)"
6746 msgstr "(3)"
6747
6748 #. type: Plain text
6749 #: build/C/man7/namespaces.7:322
6750 msgid "The filesystem type."
6751 msgstr "ファイルシステム種別"
6752
6753 #. type: TP
6754 #: build/C/man7/namespaces.7:322
6755 #, no-wrap
6756 msgid "(4)"
6757 msgstr "(4)"
6758
6759 #. type: Plain text
6760 #: build/C/man7/namespaces.7:327
6761 msgid "Optional statistics and configuration information.  Currently (as at Linux 2.6.26), only NFS filesystems export information via this field."
6762 msgstr "統計情報と設定情報。 オプションフィールドである。 現在のところ (Linux 2.6.26 時点)、NFS ファイルシステムだけがこのフィールドで情報を公開している。"
6763
6764 #
6765 #.  ==================== PID namespaces ====================
6766 #. type: SS
6767 #: build/C/man7/namespaces.7:331
6768 #, no-wrap
6769 msgid "PID namespaces (CLONE_NEWPID)"
6770 msgstr "PID 名前空間 (CLONE_NEWPID)"
6771
6772 #
6773 #.  ==================== User namespaces ====================
6774 #. type: Plain text
6775 #: build/C/man7/namespaces.7:337
6776 msgid "See B<pid_namespaces>(7)."
6777 msgstr "B<pid_namespaces>(7) 参照。"
6778
6779 #. type: SS
6780 #: build/C/man7/namespaces.7:337
6781 #, no-wrap
6782 msgid "User namespaces (CLONE_NEWUSER)"
6783 msgstr "ユーザー名前空間 (CLONE_NEWUSER)"
6784
6785 #. type: Plain text
6786 #: build/C/man7/namespaces.7:343 build/C/man7/namespaces.7:364
6787 #: build/C/man7/pid_namespaces.7:356
6788 msgid "See B<user_namespaces>(7)."
6789 msgstr "B<user_namespaces>(7) 参照。"
6790
6791 #. type: SS
6792 #: build/C/man7/namespaces.7:343
6793 #, no-wrap
6794 msgid "UTS namespaces (CLONE_NEWUTS)"
6795 msgstr "UTS 名前空間 (CLONE_NEWUTS)"
6796
6797 #. type: Plain text
6798 #: build/C/man7/namespaces.7:355
6799 msgid "UTS namespaces provide isolation of two system identifiers: the hostname and the NIS domain name.  These identifiers are set using B<sethostname>(2)  and B<setdomainname>(2), and can be retrieved using B<uname>(2), B<gethostname>(2), and B<getdomainname>(2)."
6800 msgstr "UTS 名前空間は、 ホスト名と NIS ドメイン名の 2 つのシステム識別子を分離する。 これらの識別子は B<sethostname>(2) と B<setdomainname>(2) を使って設定でき、 B<uname>(2), B<gethostname>(2), B<getdomainname>(2) を使って取得できる。"
6801
6802 #. type: Plain text
6803 #: build/C/man7/namespaces.7:359
6804 msgid "Use of UTS namespaces requires a kernel that is configured with the B<CONFIG_UTS_NS> option."
6805 msgstr "UTS 名前空間を使用するには、設定 B<CONFIG_UTS_NS> が有効になったカーネルが必要である。"
6806
6807 #. type: Plain text
6808 #: build/C/man7/namespaces.7:361 build/C/man7/pid_namespaces.7:353
6809 #: build/C/man7/user_namespaces.7:648
6810 msgid "Namespaces are a Linux-specific feature."
6811 msgstr "名前空間は Linux 独自の機能である。"
6812
6813 #. type: Plain text
6814 #: build/C/man7/namespaces.7:377
6815 msgid "B<nsenter>(1), B<readlink>(1), B<unshare>(1), B<clone>(2), B<setns>(2), B<unshare>(2), B<proc>(5), B<credentials>(7), B<capabilities>(7), B<pid_namespaces>(7), B<user_namespaces>(7), B<switch_root>(8)"
6816 msgstr "B<nsenter>(1), B<readlink>(1), B<unshare>(1), B<clone>(2), B<setns>(2), B<unshare>(2), B<proc>(5), B<credentials>(7), B<capabilities>(7), B<pid_namespaces>(7), B<user_namespaces>(7), B<switch_root>(8)"
6817
6818 #. type: TH
6819 #: build/C/man7/pid_namespaces.7:27
6820 #, no-wrap
6821 msgid "PID_NAMESPACES"
6822 msgstr "PID_NAMESPACES"
6823
6824 #. type: TH
6825 #: build/C/man7/pid_namespaces.7:27 build/C/man2/seccomp.2:27
6826 #, no-wrap
6827 msgid "2015-01-10"
6828 msgstr "2015-01-10"
6829
6830 #. type: Plain text
6831 #: build/C/man7/pid_namespaces.7:30
6832 msgid "pid_namespaces - overview of Linux PID namespaces"
6833 msgstr "pid_namespaces - Linux PID 名前空間の概要"
6834
6835 #. type: Plain text
6836 #: build/C/man7/pid_namespaces.7:33 build/C/man7/user_namespaces.7:33
6837 msgid "For an overview of namespaces, see B<namespaces>(7)."
6838 msgstr "名前空間の概要については B<namespaces>(7) を参照。"
6839
6840 #. type: Plain text
6841 #: build/C/man7/pid_namespaces.7:40
6842 msgid "PID namespaces isolate the process ID number space, meaning that processes in different PID namespaces can have the same PID.  PID namespaces allow containers to provide functionality such as suspending/resuming the set of processes in the container and migrating the container to a new host while the processes inside the container maintain the same PIDs."
6843 msgstr "PID 名前空間はプロセス ID 番号空間を分離する。 これは、異なる PID 名前空間のプロセスは同じ PID を持つことができることを意味する。 PID 名前空間を使うことで、コンテナー内のプロセス群を中断、再開したり、 コンテナー内のプロセスの PID を保持したままコンテナーを新しいホストに移行したりするといった機能をコンテナーが提供することが可能になる。"
6844
6845 #. type: Plain text
6846 #: build/C/man7/pid_namespaces.7:48
6847 msgid "PIDs in a new PID namespace start at 1, somewhat like a standalone system, and calls to B<fork>(2), B<vfork>(2), or B<clone>(2)  will produce processes with PIDs that are unique within the namespace."
6848 msgstr "新しい PID 名前空間の PID は、 独立したシステムであるかのように、 1 から始まる。 B<fork>(2), B<vfork>(2), B<clone>(2) を呼び出すと、 その名前空間内で一意な PID でプロセスが生成される。"
6849
6850 #
6851 #.  ============================================================
6852 #. type: Plain text
6853 #: build/C/man7/pid_namespaces.7:55
6854 msgid "Use of PID namespaces requires a kernel that is configured with the B<CONFIG_PID_NS> option."
6855 msgstr "PID 名前空間を使用するには、設定 B<CONFIG_PID_NS> が有効になったカーネルが必要である。"
6856
6857 #. type: SS
6858 #: build/C/man7/pid_namespaces.7:55
6859 #, no-wrap
6860 msgid "The namespace init process"
6861 msgstr "名前空間の init プロセス"
6862
6863 #. type: Plain text
6864 #: build/C/man7/pid_namespaces.7:75
6865 msgid "The first process created in a new namespace (i.e., the process created using B<clone>(2)  with the B<CLONE_NEWPID> flag, or the first child created by a process after a call to B<unshare>(2)  using the B<CLONE_NEWPID> flag) has the PID 1, and is the \"init\" process for the namespace (see B<init>(1)).  A child process that is orphaned within the namespace will be reparented to this process rather than B<init>(1)  (unless one of the ancestors of the child in the same PID namespace employed the B<prctl>(2)  B<PR_SET_CHILD_SUBREAPER> command to mark itself as the reaper of orphaned descendant processes)."
6866 msgstr "新しい名前空間で作成される最初のプロセス (すなわち、B<CLONE_NEWPID> フラグで B<clone>(2) を使って作成されたプロセスや、 B<CLONE_NEWPID> フラグで B<unshare>(2) を呼び出した後のプロセスによって作成された最初のプロセス) は PID 1 を持ち、 そのプロセスはその名前空間の \"init\" プロセスとなる (B<init>(1) 参照)。 名前空間内でみなしごになった (親プロセスがいなくなった) 子プロセスは、 B<init>(1) ではなくこのプロセスが親プロセスになる (ただし、 同じ PID 名前空間内のその子プロセスの先祖が、 B<prctl>(2) の B<PR_SET_CHILD_SUBREAPER> コマンドを使って、 自分自身をみなしごとなった子孫のプロセスの引き取り手になっている場合はこの限りではなく)。"
6867
6868 #. type: Plain text
6869 #: build/C/man7/pid_namespaces.7:102
6870 msgid "If the \"init\" process of a PID namespace terminates, the kernel terminates all of the processes in the namespace via a B<SIGKILL> signal.  This behavior reflects the fact that the \"init\" process is essential for the correct operation of a PID namespace.  In this case, a subsequent B<fork>(2)  into this PID namespace will fail with the error B<ENOMEM>; it is not possible to create a new processes in a PID namespace whose \"init\" process has terminated.  Such scenarios can occur when, for example, a process uses an open file descriptor for a I</proc/[pid]/ns/pid> file corresponding to a process that was in a namespace to B<setns>(2)  into that namespace after the \"init\" process has terminated.  Another possible scenario can occur after a call to B<unshare>(2): if the first child subsequently created by a B<fork>(2)  terminates, then subsequent calls to B<fork>(2)  will fail with B<ENOMEM>."
6871 msgstr "PID 名前空間の \"init\" プロセスが終了すると、 カーネルはその名前空間の全プロセスを B<SIGKILL> シグナルで終了する。 この動作は、 PID 名前空間の正しい操作のためには \"init\" プロセスは不可欠であるという事実を反映したものである。 この場合、 その PID 名前空間へのそれ以降の B<fork>(2) はエラー B<ENOMEM> で失敗する。 \"init\" プロセスが終了している PID 名前空間に新しいプロセスを作成することはできない。 このような状況は、 例えば、 名前空間にいたプロセスに対応する I</proc/[pid]/ns/pid> ファイルに対してオープンしたファイルディスクリプタを使って、 \"init\" プロセスが終了した後にその名前空間に B<setns>(2) を行った場合に起こり得る。 B<unshare>(2) を呼び出した後にも、この状況は起こり得る。 それ以降に B<fork>(2) で作成された最初の子プロセスが終了すると、 それ以降の B<fork>(2) の呼び出しは B<NOMEM> で失敗する。"
6872
6873 #. type: Plain text
6874 #: build/C/man7/pid_namespaces.7:108
6875 msgid "Only signals for which the \"init\" process has established a signal handler can be sent to the \"init\" process by other members of the PID namespace.  This restriction applies even to privileged processes, and prevents other members of the PID namespace from accidentally killing the \"init\" process."
6876 msgstr "PID 名前空間の他のメンバーは、 \"init\" プロセスがシグナルハンドラーを設定したシグナルだけを、 \"init\" プロセスに送信することができる。 この制限は特権プロセスに対しても適用される。 この制限により、 PID 名前空間の他のメンバーがうっかり \"init\" プロセスを殺してしまうのを防ぐことができる。"
6877
6878 #. type: Plain text
6879 #: build/C/man7/pid_namespaces.7:128
6880 msgid "Likewise, a process in an ancestor namespace can\\(emsubject to the usual permission checks described in B<kill>(2)\\(emsend signals to the \"init\" process of a child PID namespace only if the \"init\" process has established a handler for that signal.  (Within the handler, the I<siginfo_t> I<si_pid> field described in B<sigaction>(2)  will be zero.)  B<SIGKILL> or B<SIGSTOP> are treated exceptionally: these signals are forcibly delivered when sent from an ancestor PID namespace.  Neither of these signals can be caught by the \"init\" process, and so will result in the usual actions associated with those signals (respectively, terminating and stopping the process)."
6881 msgstr "同様に、 先祖の名前空間のプロセスは、 \"init\" プロセスがそのシグナルに対するハンドラーを設定している場合にのみ、 B<kill>(2) で説明されている通常のアクセス許可のチェックを経た上で、 子供の PID 名前空間の \"init\" プロセスにシグナルを送信できる。 (ハンドラー内では、 I<sigaction>(2) に説明がある I<siginfo_t> の I<si_pid> フィールドは 0 になる。) B<SIGKILL> と B<SIGSTOP> は例外として扱われ、 これらのシグナルが先祖の PID 名前空間から送信された場合には強制的に配送される。 これらのシグナルはどちらも \"init\" プロセルが捕捉することはできない。 そのため、これらのシグナルに関連付けられた通常のアクション (それぞれ、プロセスの終了とプロセスの強制停止) が実行される。"
6882
6883 #
6884 #.  ============================================================
6885 #. type: Plain text
6886 #: build/C/man7/pid_namespaces.7:138
6887 msgid "Starting with Linux 3.4, the B<reboot>(2)  system call causes a signal to be sent to the namespace \"init\" process.  See B<reboot>(2)  for more details."
6888 msgstr "Linux 3.4 以降では、 B<reboot>(2) システムコールを呼び出すと、 シグナルがその名前空間の \"init\" プロセスに送信される。 詳細は B<reboot>(2) を参照。"
6889
6890 #. type: SS
6891 #: build/C/man7/pid_namespaces.7:138
6892 #, no-wrap
6893 msgid "Nesting PID namespaces"
6894 msgstr "ネストされた PID 名前空間"
6895
6896 #. type: Plain text
6897 #: build/C/man7/pid_namespaces.7:149
6898 msgid "PID namespaces can be nested: each PID namespace has a parent, except for the initial (\"root\") PID namespace.  The parent of a PID namespace is the PID namespace of the process that created the namespace using B<clone>(2)  or B<unshare>(2).  PID namespaces thus form a tree, with all namespaces ultimately tracing their ancestry to the root namespace."
6899 msgstr "PID 名前空間は入れ子にすることができる。 最初の (\"root\") PID 名前空間以外の各 PID 名前空間は親を持つ。 PID 名前空間の親は B<clone>(2) や B<unshare>(2) を使ってその名前空間を作成したプロセスの PID 名前空間である。 したがって、 PID 名前空間は木構造を構成し、 すべての名前空間は親を辿って行くと、最終的には root 名前空間に辿り着く。"
6900
6901 #. type: Plain text
6902 #: build/C/man7/pid_namespaces.7:164
6903 msgid "A process is visible to other processes in its PID namespace, and to the processes in each direct ancestor PID namespace going back to the root PID namespace.  In this context, \"visible\" means that one process can be the target of operations by another process using system calls that specify a process ID.  Conversely, the processes in a child PID namespace can't see processes in the parent and further removed ancestor namespaces.  More succinctly: a process can see (e.g., send signals with B<kill>(2), set nice values with B<setpriority>(2), etc.) only processes contained in its own PID namespace and in descendants of that namespace."
6904 msgstr "プロセスは、所属する PID 名前空間の他のプロセスから見える。また、 root PID 名前空間に向かう直径の先祖の各 PID 名前空間のプロセスからも見える。 この場合、「見える」とは、 あるプロセスが、 他のプロセスがプロセス ID を指定するシステムコールを使う際に操作の対象にできることを意味する。 逆に、子供 PID 名前空間のプロセスから親や先祖の名前空間のプロセスは見えない。 あるプロセスは自分自身の PID 名前空間とその子孫の名前空間のプロセスだけが見える (例えば、B<kill>(2) でシグナルを送信したり、 B<setpriority>(2) で nice 値を設定したり、など)。"
6905
6906 #. type: Plain text
6907 #: build/C/man7/pid_namespaces.7:176
6908 msgid "A process has one process ID in each of the layers of the PID namespace hierarchy in which is visible, and walking back though each direct ancestor namespace through to the root PID namespace.  System calls that operate on process IDs always operate using the process ID that is visible in the PID namespace of the caller.  A call to B<getpid>(2)  always returns the PID associated with the namespace in which the process was created."
6909 msgstr "プロセスは、そのプロセスが見える PID 名前空間の階層の各層においてプロセス ID を一つ持ち、 直接の先祖の名前空間を辿ることで通って root PID 名前空間に至ることができる。 プロセス ID に対して操作を行うシステムコールは、常に、呼び出し元プロセスの PID 名前空間で見えるプロセス ID を使って操作を行う。 B<getpid>(2) の呼び出しでは、 常に、 プロセスが作成された名前空間に関連付けられた PID を返す。"
6910
6911 #
6912 #. type: Plain text
6913 #: build/C/man7/pid_namespaces.7:191
6914 msgid "Some processes in a PID namespace may have parents that are outside of the namespace.  For example, the parent of the initial process in the namespace (i.e., the B<init>(1)  process with PID 1) is necessarily in another namespace.  Likewise, the direct children of a process that uses B<setns>(2)  to cause its children to join a PID namespace are in a different PID namespace from the caller of B<setns>(2).  Calls to B<getppid>(2)  for such processes return 0."
6915 msgstr "PID 名前空間内のプロセスは名前空間の外部に親プロセスを持つことができる。 例えば、その名前空間の初期プロセス (すなわち PID 1 を持つ B<init>(1) プロセス) の親プロセスは必然的に別の名前空間に属すことになる。 同様に、 あるプロセスが B<setns>(2) を使って子プロセスを PID 名前空間に参加させた場合、 子プロセスは B<setns>(2) の呼び出し元とは異なる PID 名前空間に属す。 子プロセスで B<getppid>(2) を呼び出すと 0 が返される。"
6916
6917 #
6918 #.  ============================================================
6919 #. type: Plain text
6920 #: build/C/man7/pid_namespaces.7:204
6921 msgid "While processes may freely descend into child PID namespaces (e.g., using B<setns>(2)  with B<CLONE_NEWPID>), they may not move in the other direction.  That is to say, processes may not enter any ancestor namespaces (parent, grandparent, etc.).  Changing PID namespaces is a one way operation."
6922 msgstr "プロセスは (B<setns>(2) を B<CLONE_NEWPID> で使うなどで) 子供の PID 名前空間に自由に入ることができるが、 逆の方向には移動できない。 つまり、 プロセスは先祖の名前空間 (親、親の親など) に入ることはできない。 PID 名前空間の変更は一方向の操作である。"
6923
6924 #. type: SS
6925 #: build/C/man7/pid_namespaces.7:204
6926 #, no-wrap
6927 msgid "setns(2) and unshare(2) semantics"
6928 msgstr "setns(2) と unshare(2) の動作"
6929
6930 #. type: Plain text
6931 #: build/C/man7/pid_namespaces.7:220
6932 msgid "Calls to B<setns>(2)  that specify a PID namespace file descriptor and calls to B<unshare>(2)  with the B<CLONE_NEWPID> flag cause children subsequently created by the caller to be placed in a different PID namespace from the caller.  These calls do not, however, change the PID namespace of the calling process, because doing so would change the caller's idea of its own PID (as reported by B<getpid>()), which would break many applications and libraries."
6933 msgstr "PID 名前空間のファイルディスクリプタを指定して B<setns>(2) を呼び出したり、 B<CLONE_NEWPID> フラグ付きで B<unshare>(2) を呼び出したりすると、 その結果作成された子プロセスは呼び出し元とは異なる PID 名前空間に置かれる。 しかし、これらの呼び出しでは呼び出し元プロセスの PID 名前空間は変更されない。 なぜなら、PID 名前空間を変更してしまうと、 呼び出し元が認識する (B<getpid>() が返す) 自分の PID が変わってしまい、 多くのアプリケーションやライブラリが正しく動作しなくなるからである。"
6934
6935 #. type: Plain text
6936 #: build/C/man7/pid_namespaces.7:228
6937 msgid "To put things another way: a process's PID namespace membership is determined when the process is created and cannot be changed thereafter.  Among other things, this means that the parental relationship between processes mirrors the parental relationship between PID namespaces: the parent of a process is either in the same namespace or resides in the immediate parent PID namespace."
6938 msgstr "別の言い方をすると、 あるプロセスがどの PID 名前空間に所属するかは、 そのプロセスが作成されたときに決定され、 それ以降は変更されることはない。 いろいろあるが、プロセス間の親子関係には、PID 名前空間の親子関係がそのまま反映されるということだ。 プロセスの親プロセスは、同じ名前空間にいるか、もしくは直接の親 PID 名前空間にいるかのいずれかである。"
6939
6940 #. type: SS
6941 #: build/C/man7/pid_namespaces.7:228
6942 #, no-wrap
6943 msgid "Compatibility of CLONE_NEWPID with other CLONE_* flags"
6944 msgstr "CLONE_NEWPID の他の CLONE_* フラグとの互換性"
6945
6946 #. type: Plain text
6947 #: build/C/man7/pid_namespaces.7:233
6948 msgid "B<CLONE_NEWPID> can't be combined with some other B<CLONE_*> flags:"
6949 msgstr "B<CLONE_NEWPID> はいくつかの他の B<CLONE_*> フラグと組み合わせることができない。"
6950
6951 #. type: Plain text
6952 #: build/C/man7/pid_namespaces.7:241
6953 msgid "B<CLONE_THREAD> requires being in the same PID namespace in order that the threads in a process can send signals to each other.  Similarly, it must be possible to see all of the threads of a processes in the B<proc>(5)  filesystem."
6954 msgstr "B<CLONE_THREAD> は、 プロセス内のスレッド間で互いにシグナルを送信できるようにするため、 同じ PID 名前空間に属している必要がある。 同様に、 プロセス内の全スレッドが B<proc>(5) ファイルシステムで見える必要がある。"
6955
6956 #. type: Plain text
6957 #: build/C/man7/pid_namespaces.7:252
6958 msgid "B<CLONE_SIGHAND> requires being in the same PID namespace; otherwise the process ID of the process sending a signal could not be meaningfully encoded when a signal is sent (see the description of the I<siginfo_t> type in B<sigaction>(2)).  A signal queue shared by processes in multiple PID namespaces will defeat that."
6959 msgstr "B<CLONE_SIGHAND> は、同じ PID 名前空間である必要がある。 さもなければ、 シグナルが送信された際に、シグナルを送信したプロセスのプロセス ID を意味のある形でエンコードすることができない (B<sigaction>(2) の I<siginfo_t> 型の説明を参照)。 複数の PID 名前空間に属するプロセス間で一つのシグナルキューを共有すると、うまく動かなくなる。"
6960
6961 #. type: Plain text
6962 #: build/C/man7/pid_namespaces.7:262
6963 msgid "B<CLONE_VM> requires all of the threads to be in the same PID namespace, because, from the point of view of a core dump, if two processes share the same address space then they are threads and will be core dumped together.  When a core dump is written, the PID of each thread is written into the core dump.  Writing the process IDs could not meaningfully succeed if some of the process IDs were in a parent PID namespace."
6964 msgstr "B<CLONE_VM> は、全スレッドが同じ PID 名前空間に属している必要がある。 なぜなら、 コアダンプの観点から見ると、 2 つのプロセスが同じアドレス空間を共有していれば、 これらはスレッドであり、コアダンプが一緒に行われるからである。 コアダンプが書き込まれる際に、 各スレッドの PID がコアダンプに書き込まれる。 もしプロセス ID のいくつかが親 PID 名前空間に属していたとすると、 プロセス ID の書き込みは意味を持たなくなってしまう。"
6965
6966 #. type: Plain text
6967 #: build/C/man7/pid_namespaces.7:280
6968 msgid "To summarize: there is a technical requirement for each of B<CLONE_THREAD>, B<CLONE_SIGHAND>, and B<CLONE_VM> to share a PID namespace.  (Note furthermore that in B<clone>(2)  requires B<CLONE_VM> to be specified if B<CLONE_THREAD> or B<CLONE_SIGHAND> is specified.)  Thus, call sequences such as the following will fail (with the error B<EINVAL>):"
6969 msgstr "まとめると、 B<CLONE_THREAD>, B<CLONE_SIGHAND>, B<CLONE_VM> では技術的な要件として PID 名前空間が共有されている点がある。 (さらに B<clone>(2) では B<CLONE_THREAD> か B<CLONE_SIGHAND> が指定された際には B<CLONE_VM> が指定されている必要がある点にも注意。) したがって、以下のような順序で呼び出しを行うと (エラー B<EINVAL> で) 失敗する。"
6970
6971 #. type: Plain text
6972 #: build/C/man7/pid_namespaces.7:284
6973 #, no-wrap
6974 msgid ""
6975 "    unshare(CLONE_NEWPID);\n"
6976 "    clone(..., CLONE_VM, ...);    /* Fails */\n"
6977 msgstr ""
6978 "    unshare(CLONE_NEWPID);\n"
6979 "    clone(..., CLONE_VM, ...);    /* Fails */\n"
6980
6981 #. type: Plain text
6982 #: build/C/man7/pid_namespaces.7:287
6983 #, no-wrap
6984 msgid ""
6985 "    setns(fd, CLONE_NEWPID);\n"
6986 "    clone(..., CLONE_VM, ...);    /* Fails */\n"
6987 msgstr ""
6988 "    setns(fd, CLONE_NEWPID);\n"
6989 "    clone(..., CLONE_VM, ...);    /* Fails */\n"
6990
6991 #. type: Plain text
6992 #: build/C/man7/pid_namespaces.7:290
6993 #, no-wrap
6994 msgid ""
6995 "    clone(..., CLONE_VM, ...);\n"
6996 "    setns(fd, CLONE_NEWPID);      /* Fails */\n"
6997 msgstr ""
6998 "    clone(..., CLONE_VM, ...);\n"
6999 "    setns(fd, CLONE_NEWPID);      /* Fails */\n"
7000
7001 #. type: Plain text
7002 #: build/C/man7/pid_namespaces.7:293
7003 #, no-wrap
7004 msgid ""
7005 "    clone(..., CLONE_VM, ...);\n"
7006 "    unshare(CLONE_NEWPID);        /* Fails */\n"
7007 msgstr ""
7008 "    clone(..., CLONE_VM, ...);\n"
7009 "    unshare(CLONE_NEWPID);        /* Fails */\n"
7010
7011 #
7012 #.  ============================================================
7013 #. type: SS
7014 #: build/C/man7/pid_namespaces.7:297
7015 #, no-wrap
7016 msgid "/proc and PID namespaces"
7017 msgstr "/proc と PID 名前空間"
7018
7019 #. type: Plain text
7020 #: build/C/man7/pid_namespaces.7:306
7021 msgid "A I</proc> filesystem shows (in the I</proc/PID> directories) only processes visible in the PID namespace of the process that performed the mount, even if the I</proc> filesystem is viewed from processes in other namespaces."
7022 msgstr "I</proc> ファイルシステムは、I</proc> のマウントを行ったプロセスの PID 名前空間で見えるプロセスだけを表示する。 たとえ、 その I</proc> ファイルシステムが他の名前空間のプロセスから参照されたとしても、そうである。"
7023
7024 #. type: Plain text
7025 #: build/C/man7/pid_namespaces.7:325
7026 msgid "After creating a new PID namespace, it is useful for the child to change its root directory and mount a new procfs instance at I</proc> so that tools such as B<ps>(1)  work correctly.  If a new mount namespace is simultaneously created by including B<CLONE_NEWNS> in the I<flags> argument of B<clone>(2)  or B<unshare>(2), then it isn't necessary to change the root directory: a new procfs instance can be mounted directly over I</proc>."
7027 msgstr "新しい PID 名前空間を作成した後、 子プロセスが、自身の root ディレクトリを変更し、新しい procfs インスタンスを I</proc> にマウントするのは B<ps>(1) などのツールが正しく動作するためにも有用である。 B<clone>(2) の I<flags> 引き数に B<CLONE_NEWNS> も指定されて新しいマウント名前空間が同時に作成された場合は、 root ディレクトリを変更する必要はない。 新しい procfs インスタンスを I</proc> にそのままマウントすることができる。"
7028
7029 #. type: Plain text
7030 #: build/C/man7/pid_namespaces.7:329
7031 msgid "From a shell, the command to mount I</proc> is:"
7032 msgstr "シェルから、コマンドで I</proc> のマウントを行うには次のようにする。"
7033
7034 #. type: Plain text
7035 #: build/C/man7/pid_namespaces.7:331
7036 #, no-wrap
7037 msgid "    $ mount -t proc proc /proc\n"
7038 msgstr "    $ mount -t proc proc /proc\n"
7039
7040 #
7041 #.  ============================================================
7042 #. type: Plain text
7043 #: build/C/man7/pid_namespaces.7:343
7044 msgid "Calling B<readlink>(2)  on the path I</proc/self> yields the process ID of the caller in the PID namespace of the procfs mount (i.e., the PID namespace of the process that mounted the procfs).  This can be useful for introspection purposes, when a process wants to discover its PID in other namespaces."
7045 msgstr "パス I</proc/self> に対して B<readlink>(2) を呼び出すと、 procfs のマウントを行ったプロセスの PID 名前空間におけるプロセス ID が得られる。 これは調査目的でプロセスが他の名前空間で自身の PID を知りたい場合などに役立つ。"
7046
7047 #. type: SS
7048 #: build/C/man7/pid_namespaces.7:343 build/C/man7/user_namespaces.7:635
7049 #, no-wrap
7050 msgid "Miscellaneous"
7051 msgstr "その他"
7052
7053 #. type: Plain text
7054 #: build/C/man7/pid_namespaces.7:351
7055 msgid "When a process ID is passed over a UNIX domain socket to a process in a different PID namespace (see the description of B<SCM_CREDENTIALS> in B<unix>(7)), it is translated into the corresponding PID value in the receiving process's PID namespace."
7056 msgstr "プロセス ID が UNIX ドメインソケット経由で別の PID 名前空間のプロセスに渡される場合 (B<unix>(7) の B<SCM_CREDENTIALS> の説明を参照)、 プロセス ID は受信プロセスの PID 名前空間での対応する PID 値に翻訳される。"
7057
7058 #. type: Plain text
7059 #: build/C/man7/pid_namespaces.7:365
7060 msgid "B<clone>(2), B<setns>(2), B<unshare>(2), B<proc>(5), B<credentials>(7), B<capabilities>(7), B<user_namespaces>(7), B<switch_root>(8)"
7061 msgstr "B<clone>(2), B<setns>(2), B<unshare>(2), B<proc>(5), B<credentials>(7), B<capabilities>(7), B<user_namespaces>(7), B<switch_root>(8)"
7062
7063 #. type: TH
7064 #: build/C/man2/seteuid.2:29
7065 #, no-wrap
7066 msgid "SETEUID"
7067 msgstr "SETEUID"
7068
7069 #. type: Plain text
7070 #: build/C/man2/seteuid.2:32
7071 msgid "seteuid, setegid - set effective user or group ID"
7072 msgstr "seteuid, setegid - 実効ユーザー ID や 実効グループ ID を設定する"
7073
7074 #. type: Plain text
7075 #: build/C/man2/seteuid.2:38
7076 msgid "B<int seteuid(uid_t >I<euid>B<);>"
7077 msgstr "B<int seteuid(uid_t >I<euid>B<);>"
7078
7079 #. type: Plain text
7080 #: build/C/man2/seteuid.2:40
7081 msgid "B<int setegid(gid_t >I<egid>B<);>"
7082 msgstr "B<int setegid(gid_t >I<egid>B<);>"
7083
7084 #. type: Plain text
7085 #: build/C/man2/seteuid.2:49
7086 msgid "B<seteuid>(), B<setegid>():"
7087 msgstr "B<seteuid>(), B<setegid>():"
7088
7089 #. type: Plain text
7090 #: build/C/man2/seteuid.2:51
7091 msgid "_BSD_SOURCE || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600"
7092 msgstr "_BSD_SOURCE || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600"
7093
7094 #. type: Plain text
7095 #: build/C/man2/seteuid.2:58
7096 msgid "B<seteuid>()  sets the effective user ID of the calling process.  Unprivileged user processes may only set the effective user ID to the real user ID, the effective user ID or the saved set-user-ID."
7097 msgstr "B<seteuid>()  は呼び出し元のプロセスの実効ユーザー ID を設定する。 非特権ユーザーのプロセスの場合、実効ユーザー ID に設定できるのは、 実ユーザー ID・実効ユーザー ID・保存 set-user-ID のいずれかだけである。"
7098
7099 #.  When
7100 #.  .I euid
7101 #.  equals \-1, nothing is changed.
7102 #.  (This is an artifact of the implementation in glibc of seteuid()
7103 #.  using setresuid(2).)
7104 #. type: Plain text
7105 #: build/C/man2/seteuid.2:67
7106 msgid "Precisely the same holds for B<setegid>()  with \"group\" instead of \"user\"."
7107 msgstr "B<setegid>()  は「ユーザー」ではなく「グループ」に対して全く同じことを行う。"
7108
7109 #. type: Plain text
7110 #: build/C/man2/seteuid.2:79
7111 msgid "I<Note>: there are cases where B<seteuid>()  can fail even when the caller is UID 0; it is a grave security error to omit checking for a failure return from B<seteuid>()."
7112 msgstr "I<注意>: 呼び出し元が UID 0 であっても B<seteuid>() が失敗する場合がある。 B<seteuid>() からのリターンが失敗かどうかの確認を省略することは重大なセキュリティ上のエラーとなる。"
7113
7114 #. type: Plain text
7115 #: build/C/man2/seteuid.2:83
7116 msgid "The target user or group ID is not valid in this user namespace."
7117 msgstr "対象のユーザー ID かグループ ID がこのユーザー名前空間では有効ではない。"
7118
7119 #. type: Plain text
7120 #: build/C/man2/seteuid.2:99
7121 msgid "The calling process is not privileged (Linux: does not have the B<CAP_SETUID> capability in the case of B<seteuid>(), or the B<CAP_SETGID> capability in the case of B<setegid>())  and I<euid> (respectively, I<egid>)  is not the real user (group) ID, the effective user (group) ID, or the saved set-user-ID (saved set-group-ID)."
7122 msgstr "呼び出し元のプロセスに特権がなく、 I<euid> (I<egid>)  が実ユーザー (グループ) ID、または実効ユーザー (グループ) ID、 保存 set-user-ID (保存 set-group-ID) のいずれでもではない (Linux においては、 B<seteuid>()  では B<CAP_SETUID> ケーパビリティ (capability) が、 B<setegid>()  では B<CAP_SETGID> ケーパビリティがない場合に、特権がないと判断される)。"
7123
7124 #. type: Plain text
7125 #: build/C/man2/seteuid.2:101
7126 msgid "4.3BSD, POSIX.1-2001."
7127 msgstr "4.3BSD, POSIX.1-2001."
7128
7129 #. type: Plain text
7130 #: build/C/man2/seteuid.2:107
7131 msgid "Setting the effective user (group) ID to the saved set-user-ID (saved set-group-ID) is possible since Linux 1.1.37 (1.1.38).  On an arbitrary system one should check B<_POSIX_SAVED_IDS>."
7132 msgstr "実効ユーザー (グループ) ID を保存 set-user-ID (保存 set-group-ID) に 設定できるのは、Linux 1.1.37 (1.1.38) 以降である。 全てのシステムにおいて B<_POSIX_SAVED_IDS> をチェックすべきである。"
7133
7134 #. type: Plain text
7135 #: build/C/man2/seteuid.2:123
7136 msgid "Under glibc 2.0 B<seteuid(>I<euid>B<)> is equivalent to B<setreuid(-1,>I< euid>B<)> and hence may change the saved set-user-ID.  Under glibc 2.1 and later it is equivalent to B<setresuid(-1,>I< euid>B<, -1)> and hence does not change the saved set-user-ID.  Analogous remarks hold for B<setegid>(), with the difference that the change in implementation from B<setregid(-1,>I< egid>B<)> to B<setresgid(-1,>I< egid>B<, -1)> occurred in glibc 2.2 or 2.3 (depending on the hardware architecture)."
7137 msgstr "glibc 2.0 では、 B<seteuid(>I<euid>B<)> は B<setreuid(-1,>I< euid>B<)> と等価であり、保存 set-user-ID を変更するかもしれない。 glibc 2.1 では、 B<setresuid(-1,>I< euid>B<, -1)> と等価であり、保存 set-user-ID 変更しない。 同様のことが B<setegid>() にも言えるが、 glibc 2.2 か 2.3 で、 実装が B<setregid(-1,>I< egid>B<)> から B<setresgid(-1,>I< egid>B<, -1)> へ変更された点だけが違う (どの glibc バージョンで変更が行われたかは、ハードウェアアーキテクチャによって異なる)。"
7138
7139 #. type: Plain text
7140 #: build/C/man2/seteuid.2:132
7141 msgid "According to POSIX.1, B<seteuid>()  (B<setegid>())  need not permit I<euid> (I<egid>)  to be the same value as the current effective user (group) ID, and some implementations do not permit this."
7142 msgstr "POSIX.1 では、 B<seteuid>()  (B<setegid>())  で、 I<euid> (I<egid>)  として現在の実効ユーザ (グループ) ID と同じ値を指定可能である 必要はないとされており、いくつかの実装では I<euid> (I<egid>)  として現在の実効ユーザ (グループ) ID と同じ値を 指定することができない。"
7143
7144 #. type: Plain text
7145 #: build/C/man2/seteuid.2:141
7146 msgid "On Linux, B<seteuid>()  and B<setegid>()  are implemented as library functions that call, respectively, B<setreuid>(2)  and B<setresgid>(2)."
7147 msgstr "Linux では、 B<seteuid>() と B<setegid>() は、それぞれ B<setreuid>(2) と B<setresgid>(2) を呼び出すライブラリ関数として実装されている。"
7148
7149 #. type: Plain text
7150 #: build/C/man2/seteuid.2:149
7151 msgid "B<geteuid>(2), B<setresuid>(2), B<setreuid>(2), B<setuid>(2), B<capabilities>(7), B<credentials>(7), B<user_namespaces>(7)"
7152 msgstr "B<geteuid>(2), B<setresuid>(2), B<setreuid>(2), B<setuid>(2), B<capabilities>(7), B<credentials>(7), B<user_namespaces>(7)"
7153
7154 #. type: TH
7155 #: build/C/man2/setfsgid.2:31
7156 #, no-wrap
7157 msgid "SETFSGID"
7158 msgstr "SETFSGID"
7159
7160 #. type: TH
7161 #: build/C/man2/setfsgid.2:31 build/C/man2/setfsuid.2:31
7162 #, no-wrap
7163 msgid "2013-08-08"
7164 msgstr "2013-08-08"
7165
7166 #. type: Plain text
7167 #: build/C/man2/setfsgid.2:34
7168 msgid "setfsgid - set group identity used for filesystem checks"
7169 msgstr "setfsgid - ファイルシステムのチェックに用いられるグループ ID を設定する"
7170
7171 #. type: Plain text
7172 #: build/C/man2/setfsgid.2:36 build/C/man2/setfsuid.2:36
7173 msgid "B<#include E<lt>sys/fsuid.hE<gt>>"
7174 msgstr "B<#include E<lt>sys/fsuid.hE<gt>>"
7175
7176 #. type: Plain text
7177 #: build/C/man2/setfsgid.2:38
7178 msgid "B<int setfsgid(uid_t >I<fsgid>B<);>"
7179 msgstr "B<int setfsgid(uid_t >I<fsgid>B<);>"
7180
7181 #. type: Plain text
7182 #: build/C/man2/setfsgid.2:51
7183 msgid "The system call B<setfsgid>()  changes the value of the caller's filesystem group ID\\(emthe group ID that the Linux kernel uses to check for all accesses to the filesystem.  Normally, the value of the filesystem group ID will shadow the value of the effective group ID.  In fact, whenever the effective group ID is changed, the filesystem group ID will also be changed to the new value of the effective group ID."
7184 msgstr "システムコール B<setfsgid>() は、 呼び出し元のファイルシステムグループ ID \\(em ファイルシステムへの全てのアクセスのチェックにおいて Linux カーネルが使用するグループ ID \\(em の値を変更する。通常はファイルシステムグループ ID の値は実効 (effective) グループ ID と同じになる。実際、 実効グループ ID が変更される度にファイルシステムグループ ID もまた新しい実効グループ ID の値に変更される。"
7185
7186 #. type: Plain text
7187 #: build/C/man2/setfsgid.2:62
7188 msgid "Explicit calls to B<setfsuid>(2)  and B<setfsgid>()  are usually used only by programs such as the Linux NFS server that need to change what user and group ID is used for file access without a corresponding change in the real and effective user and group IDs.  A change in the normal user IDs for a program such as the NFS server is a security hole that can expose it to unwanted signals.  (But see below.)"
7189 msgstr "通常、 B<setfsuid>()  や B<setfsgid>() を明示的に呼び出すのは、Linux NFS サーバー のように、 ファイルアクセスに用いるユーザID / グループID を変更しなければならないが、 対応する実(real)/実効(effective) ユーザID / グループID は変更したくないような プログラムに限られる。 NFS サーバーのようなプログラムで、通常のユーザID を変更すると、 プロセスを望まないシグナルにさらす可能性があり、 セキュリティホールになる。(下記参照)"
7190
7191 #. type: Plain text
7192 #: build/C/man2/setfsgid.2:68
7193 msgid "B<setfsgid>()  will succeed only if the caller is the superuser or if I<fsgid> matches either the caller's real group ID, effective group ID, saved set-group-ID, or current the filesystem user ID."
7194 msgstr "B<setfsgid>()  は、スーパーユーザによって呼び出された場合か、 I<fsgid> が呼び出し元の実グループID、実効グループID、 保存セットグループID (saved set-group-ID)、現在のファイルシステムグループ ID の値のいずれかに一致する場合にのみ成功する。"
7195
7196 #. type: Plain text
7197 #: build/C/man2/setfsgid.2:71
7198 msgid "On both success and failure, this call returns the previous filesystem group ID of the caller."
7199 msgstr "成功時も失敗時も、 この呼び出しは直前の呼び出し元のファイルシステムグループ ID の値を返す。"
7200
7201 #.  This system call is present since Linux 1.1.44
7202 #.  and in libc since libc 4.7.6.
7203 #. type: Plain text
7204 #: build/C/man2/setfsgid.2:75 build/C/man2/setfsuid.2:75
7205 msgid "This system call is present in Linux since version 1.2."
7206 msgstr "このシステムコールはバージョン 1.2 以降の Linux に存在する。"
7207
7208 #. type: Plain text
7209 #: build/C/man2/setfsgid.2:79
7210 msgid "B<setfsgid>()  is Linux-specific and should not be used in programs intended to be portable."
7211 msgstr "B<setfsgid>()  は Linux 特有であり、移植を想定したプログラムで使用してはいけない。"
7212
7213 #. type: Plain text
7214 #: build/C/man2/setfsgid.2:85
7215 msgid "When glibc determines that the argument is not a valid group ID, it will return -1 and set I<errno> to B<EINVAL> without attempting the system call."
7216 msgstr "glibc が引き数がグループID として不正だと判断した場合は、 システムコールを行わず I<errno> に B<EINVAL> を設定して -1 が返される。"
7217
7218 #. type: Plain text
7219 #: build/C/man2/setfsgid.2:96
7220 msgid "Note that at the time this system call was introduced, a process could send a signal to a process with the same effective user ID.  Today signal permission handling is slightly different.  See B<setfsuid>(2)  for a discussion of why the use of both B<setfsuid>(2)  and B<setfsgid>()  is nowadays unneeded."
7221 msgstr "このシステムコールが導入された当時、プロセスは 同じ実効ユーザIDのプロセスへシグナルを送ることができた。 今日では、シグナル送信権限の扱いはかなり違うものになっている。 なぜ今日では B<setfsuid>(2) と B<setfsgid>() の両者が不要なのかの議論については B<setfsuid>(2) を参照のこと。"
7222
7223 #. type: Plain text
7224 #: build/C/man2/setfsgid.2:106
7225 msgid "The original Linux B<setfsgid>()  system call supported only 16-bit group IDs.  Subsequently, Linux 2.4 added B<setfsgid32>()  supporting 32-bit IDs.  The glibc B<setfsgid>()  wrapper function transparently deals with the variation across kernel versions."
7226 msgstr ""
7227 "元々の Linux の B<setfsgid>() システムコールは\n"
7228 "16 ビットのグループ ID だけに対応していた。\n"
7229 "その後、Linux 2.4 で、32 ビットの ID に対応した\n"
7230 "B<setfsgid32>() が追加された。\n"
7231 "glibc の B<setfsgid>() のラッパー関数は\n"
7232 "カーネルバージョンによるこの違いを吸収している。"
7233
7234 #. type: Plain text
7235 #: build/C/man2/setfsgid.2:123
7236 msgid "No error indications of any kind are returned to the caller, and the fact that both successful and unsuccessful calls return the same value makes it impossible to directly determine whether the call succeeded or failed.  Instead, the caller must resort to looking at the return value from a further call such as I<setfsgid(-1)> (which will always fail), in order to determine if a preceding call to B<setfsgid>()  changed the filesystem group ID.  At the very least, B<EPERM> should be returned when the call fails (because the caller lacks the B<CAP_SETGID> capability)."
7237 msgstr "いかなる種類のエラーメッセージも返さず、 成功した場合も失敗した場合も呼び出しは同じ値を返すため、 呼び出しが成功したか失敗したかを直接判定することはできない。 その代わり、 直前の B<setfsgid>() の呼び出しがファイルシステムグループ ID を変更したかどうかを判定するために、 呼び出し元はこの後に I<setfsgid(-1)> などを呼び出して返り値を見なければならない (I<setfsgid(-1)> は常に失敗する)。 最低でも、失敗した場合は B<EPERM> くらいは返すべきである (呼び出し元には B<CAP_SETGID> ケーパビリティがなかったのだから)。"
7238
7239 #. type: Plain text
7240 #: build/C/man2/setfsgid.2:128
7241 msgid "B<kill>(2), B<setfsuid>(2), B<capabilities>(7), B<credentials>(7)"
7242 msgstr "B<kill>(2), B<setfsuid>(2), B<capabilities>(7), B<credentials>(7)"
7243
7244 #. type: TH
7245 #: build/C/man2/setfsuid.2:31
7246 #, no-wrap
7247 msgid "SETFSUID"
7248 msgstr "SETFSUID"
7249
7250 #. type: Plain text
7251 #: build/C/man2/setfsuid.2:34
7252 msgid "setfsuid - set user identity used for filesystem checks"
7253 msgstr "setfsuid - ファイルシステムのチェックに用いられるユーザ ID を設定する"
7254
7255 #. type: Plain text
7256 #: build/C/man2/setfsuid.2:38
7257 msgid "B<int setfsuid(uid_t >I<fsuid>B<);>"
7258 msgstr "B<int setfsuid(uid_t >I<fsuid>B<);>"
7259
7260 #. type: Plain text
7261 #: build/C/man2/setfsuid.2:51
7262 msgid "The system call B<setfsuid>()  changes the value of the caller's filesystem user ID\\(emthe user ID that the Linux kernel uses to check for all accesses to the filesystem.  Normally, the value of the filesystem user ID will shadow the value of the effective user ID.  In fact, whenever the effective user ID is changed, the filesystem user ID will also be changed to the new value of the effective user ID."
7263 msgstr "B<setfsuid>()  は、 呼び出し元のファイルシステムユーザー ID \\(em ファイルシステムへの全てのアクセスのチェックにおいて Linux カーネルが使用するユーザ ID \\(em の値を変更する。通常はファイルシステムユーザー ID の値は実効 (effective) ユーザID と同じになる。実際、 実効ユーザID が変更される度にファイルシステムユーザー ID もまた新しい実効ユーザ ID の値に変更される。"
7264
7265 #. type: Plain text
7266 #: build/C/man2/setfsuid.2:62
7267 msgid "Explicit calls to B<setfsuid>()  and B<setfsgid>(2)  are usually used only by programs such as the Linux NFS server that need to change what user and group ID is used for file access without a corresponding change in the real and effective user and group IDs.  A change in the normal user IDs for a program such as the NFS server is a security hole that can expose it to unwanted signals.  (But see below.)"
7268 msgstr "通常、 B<setfsuid>()  や B<setfsgid>() を明示的に呼び出すのは、Linux NFS サーバー のように、 ファイルアクセスに用いるユーザID / グループID を変更しなければならないが、 対応する実(real)/実効(effective) ユーザID / グループID は変更したくないような プログラムに限られる。 NFS サーバーのようなプログラムで、通常のユーザID を変更すると、 プロセスを望まないシグナルにさらす可能性があり、 セキュリティホールになる。(下記参照)"
7269
7270 #. type: Plain text
7271 #: build/C/man2/setfsuid.2:68
7272 msgid "B<setfsuid>()  will succeed only if the caller is the superuser or if I<fsuid> matches either the caller's real user ID, effective user ID, saved set-user-ID, or current filesystem user ID."
7273 msgstr "B<setfsuid>()  は、スーパーユーザによって呼び出された場合か、 I<fsuid> が呼び出し元の実ユーザID、実効ユーザID、 保存セットユーザID (saved set-user-ID)、現在のファイルシステムグループ ID の値のいずれかに一致する場合にのみ成功する。"
7274
7275 #. type: Plain text
7276 #: build/C/man2/setfsuid.2:71
7277 msgid "On both success and failure, this call returns the previous filesystem user ID of the caller."
7278 msgstr "成功時も失敗時も、 この呼び出しは直前の呼び出し元のファイルシステムユーザー ID の値を返す。"
7279
7280 #. type: Plain text
7281 #: build/C/man2/setfsuid.2:79
7282 msgid "B<setfsuid>()  is Linux-specific and should not be used in programs intended to be portable."
7283 msgstr "B<setfsuid>()  は Linux 特有であり、移植を想定したプログラムで使用してはいけない。"
7284
7285 #. type: Plain text
7286 #: build/C/man2/setfsuid.2:85
7287 msgid "When glibc determines that the argument is not a valid user ID, it will return -1 and set I<errno> to B<EINVAL> without attempting the system call."
7288 msgstr "glibc が引き数がユーザID として不正だと判断した場合は、 システムコールを行わず I<errno> に B<EINVAL> を設定して -1 が返される。"
7289
7290 #. type: Plain text
7291 #: build/C/man2/setfsuid.2:104
7292 msgid "At the time when this system call was introduced, one process could send a signal to another process with the same effective user ID.  This meant that if a privileged process changed its effective user ID for the purpose of file permission checking, then it could become vulnerable to receiving signals sent by another (unprivileged) process with the same user ID.  The filesystem user ID attribute was thus added to allow a process to change its user ID for the purposes of file permission checking without at the same time becoming vulnerable to receiving unwanted signals.  Since Linux 2.0, signal permission handling is different (see B<kill>(2)), with the result that a process change can change its effective user ID without being vulnerable to receiving signals from unwanted processes.  Thus, B<setfsuid>()  is nowadays unneeded and should be avoided in new applications (likewise for B<setfsgid>(2))."
7293 msgstr "このシステムコールが導入された当時、 あるプロセスは同じ実効ユーザー ID を持つ別のプロセスにシグナルを送信できた。 これは、 特権プロセスがファイルのアクセス許可をチェックするために自身の実効ユーザー ID を変更すると、 同じユーザー ID を持つ別の (非特権) プロセスが送信したシグナルを受け取るようになってしまうことを意味する。そのため、 プロセスが、 受け取りたくないシグナルを受信する状態にならずに、 ファイルのアクセス許可をチェックするために自身のユーザー ID を変更できるように、 ファイルシステムユーザー ID 属性が追加された。 Linux 2.0 以降では、 シグナルの送信許可の扱いは異なり (B<kill>(2) 参照)、 プロセスは、 望まないプロセスからシグナルを受信してしまう状態にならずに、 自身の実効ユーザー ID を変更することができる。 したがって、 B<setfsuid>() は今日では不要であり、 新規のアプリケーションでは使用すべきではない (B<setfsgid>(2) も同様)。"
7294
7295 #. type: Plain text
7296 #: build/C/man2/setfsuid.2:114
7297 msgid "The original Linux B<setfsuid>()  system call supported only 16-bit user IDs.  Subsequently, Linux 2.4 added B<setfsuid32>()  supporting 32-bit IDs.  The glibc B<setfsuid>()  wrapper function transparently deals with the variation across kernel versions."
7298 msgstr ""
7299 "元々の Linux の B<setfsuid>() システムコールは\n"
7300 "16 ビットのグループ ID だけに対応していた。\n"
7301 "その後、Linux 2.4 で、32 ビットの ID に対応した\n"
7302 "B<setfsuid32>() が追加された。\n"
7303 "glibc の B<setfsuid>() のラッパー関数は\n"
7304 "カーネルバージョンによるこの違いを吸収している。"
7305
7306 #. type: Plain text
7307 #: build/C/man2/setfsuid.2:131
7308 msgid "No error indications of any kind are returned to the caller, and the fact that both successful and unsuccessful calls return the same value makes it impossible to directly determine whether the call succeeded or failed.  Instead, the caller must resort to looking at the return value from a further call such as I<setfsuid(-1)> (which will always fail), in order to determine if a preceding call to B<setfsuid>()  changed the filesystem user ID.  At the very least, B<EPERM> should be returned when the call fails (because the caller lacks the B<CAP_SETUID> capability)."
7309 msgstr "いかなる種類のエラーメッセージも返さず、 成功した場合も失敗した場合も呼び出しは同じ値を返すため、 呼び出しが成功したか失敗したかを直接判定することはできない。 その代わり、 直前の B<setfsuid>() の呼び出しがファイルシステムグループ ID を変更したかどうかを判定するために、 呼び出し元はこの後に I<setfsuid(-1)> などを呼び出して返り値を見なければならない (I<setfsuid(-1)> は常に失敗する)。 最低でも、失敗した場合は B<EPERM> くらいは返すべきである (呼び出し元には B<CAP_SETUID> ケーパビリティがなかったのだから)。"
7310
7311 #. type: Plain text
7312 #: build/C/man2/setfsuid.2:136
7313 msgid "B<kill>(2), B<setfsgid>(2), B<capabilities>(7), B<credentials>(7)"
7314 msgstr "B<kill>(2), B<setfsgid>(2), B<capabilities>(7), B<credentials>(7)"
7315
7316 #. type: TH
7317 #: build/C/man2/setgid.2:29
7318 #, no-wrap
7319 msgid "SETGID"
7320 msgstr "SETGID"
7321
7322 #. type: Plain text
7323 #: build/C/man2/setgid.2:32
7324 msgid "setgid - set group identity"
7325 msgstr "setgid - グループ識別(identity)を設定する"
7326
7327 #. type: Plain text
7328 #: build/C/man2/setgid.2:38
7329 msgid "B<int setgid(gid_t >I<gid>B<);>"
7330 msgstr "B<int setgid(gid_t >I<gid>B<);>"
7331
7332 #. type: Plain text
7333 #: build/C/man2/setgid.2:43
7334 msgid "B<setgid>()  sets the effective group ID of the calling process.  If the caller is the superuser, the real GID and saved set-group-ID are also set."
7335 msgstr "B<setgid>()  は呼び出し元のプロセスの実効 (effective) グループID を設定する。 もしスーパーユーザーによって呼び出された場合は、 実 (real) グループID と保存 (saved) set-group-ID も設定される。"
7336
7337 #. type: Plain text
7338 #: build/C/man2/setgid.2:53
7339 msgid "Under Linux, B<setgid>()  is implemented like the POSIX version with the B<_POSIX_SAVED_IDS> feature.  This allows a set-group-ID program that is not set-user-ID-root to drop all of its group privileges, do some un-privileged work, and then reengage the original effective group ID in a secure manner."
7340 msgstr "Linux において、 B<setgid>()  は B<_POSIX_SAVED_IDS> をもった POSIX 版のように実装されている。 これは set-user-ID-root でない set-group-ID プログラムにそのグループの 特権の全て落とし、特権の必要ない仕事をし、本来の実効グループID に 安全な方法で再び戻すことを許す。"
7341
7342 #. type: Plain text
7343 #: build/C/man2/setgid.2:64
7344 msgid "The group ID specified in I<gid> is not valid in this user namespace."
7345 msgstr "I<gid> で指定されたグループ ID がこのユーザー名前空間では有効ではない。"
7346
7347 #. type: Plain text
7348 #: build/C/man2/setgid.2:71
7349 msgid "The calling process is not privileged (does not have the B<CAP_SETGID> capability), and I<gid> does not match the real group ID or saved set-group-ID of the calling process."
7350 msgstr "呼び出し元のプロセスに権限がなく (B<CAP_SETGID> ケーパビリティがなく)、かつ I<gid> が呼び出し元のプロセスの実グループID と保存セットグループID のどちらとも一致しない。"
7351
7352 #. type: Plain text
7353 #: build/C/man2/setgid.2:83
7354 msgid "The original Linux B<setgid>()  system call supported only 16-bit group IDs.  Subsequently, Linux 2.4 added B<setgid32>()  supporting 32-bit IDs.  The glibc B<setgid>()  wrapper function transparently deals with the variation across kernel versions."
7355 msgstr ""
7356 "元々の Linux の B<setgid>() システムコールは\n"
7357 "16 ビットのグループ ID だけに対応していた。\n"
7358 "その後、Linux 2.4 で、32 ビットの ID に対応した\n"
7359 "B<setgid32>() が追加された。\n"
7360 "glibc の B<setgid>() のラッパー関数は\n"
7361 "カーネルバージョンによるこの違いを吸収している。"
7362
7363 #. type: Plain text
7364 #: build/C/man2/setgid.2:90
7365 msgid "B<getgid>(2), B<setegid>(2), B<setregid>(2), B<capabilities>(7), B<credentials>(7), B<user_namespaces>(7)"
7366 msgstr "B<getgid>(2), B<setegid>(2), B<setregid>(2), B<capabilities>(7), B<credentials>(7), B<user_namespaces>(7)"
7367
7368 #. type: TH
7369 #: build/C/man2/setpgid.2:48
7370 #, no-wrap
7371 msgid "SETPGID"
7372 msgstr "SETPGID"
7373
7374 #. type: TH
7375 #: build/C/man2/setpgid.2:48
7376 #, no-wrap
7377 msgid "2014-01-07"
7378 msgstr "2014-01-07"
7379
7380 #. type: Plain text
7381 #: build/C/man2/setpgid.2:51
7382 msgid "setpgid, getpgid, setpgrp, getpgrp - set/get process group"
7383 msgstr "setpgid, getpgid, setpgrp, getpgrp - プロセスグループの設定/取得を行う"
7384
7385 #. type: Plain text
7386 #: build/C/man2/setpgid.2:55
7387 msgid "B<int setpgid(pid_t >I<pid>B<, pid_t >I<pgid>B<);>"
7388 msgstr "B<int setpgid(pid_t >I<pid>B<, pid_t >I<pgid>B<);>"
7389
7390 #. type: Plain text
7391 #: build/C/man2/setpgid.2:57
7392 msgid "B<pid_t getpgid(pid_t >I<pid>B<);>"
7393 msgstr "B<pid_t getpgid(pid_t >I<pid>B<);>"
7394
7395 #. type: Plain text
7396 #: build/C/man2/setpgid.2:59
7397 msgid "B<pid_t getpgrp(void);> /* POSIX.1 version */"
7398 msgstr "B<pid_t getpgrp(void);> /* POSIX.1 version */"
7399
7400 #. type: Plain text
7401 #: build/C/man2/setpgid.2:62
7402 msgid "B<pid_t getpgrp(pid_t >I<pid>B<);\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ > /* BSD version */"
7403 msgstr "B<pid_t getpgrp(pid_t >I<pid>B<);\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ > /* BSD version */"
7404
7405 #. type: Plain text
7406 #: build/C/man2/setpgid.2:64
7407 msgid "B<int setpgrp(void);> /* System V version */"
7408 msgstr "B<int setpgrp(void);> /* System V version */"
7409
7410 #. type: Plain text
7411 #: build/C/man2/setpgid.2:67
7412 msgid "B<int setpgrp(pid_t >I<pid>B<, pid_t >I<pgid>B<);\\ > /* BSD version */"
7413 msgstr "B<int setpgrp(pid_t >I<pid>B<, pid_t >I<pgid>B<);\\ > /* BSD version */"
7414
7415 #. type: Plain text
7416 #: build/C/man2/setpgid.2:76
7417 msgid "B<getpgid>():"
7418 msgstr "B<getpgid>():"
7419
7420 #. type: Plain text
7421 #: build/C/man2/setpgid.2:84
7422 msgid "B<setpgrp>() (POSIX.1):"
7423 msgstr "B<setpgrp>() (POSIX.1):"
7424
7425 #. type: Plain text
7426 #: build/C/man2/setpgid.2:87
7427 #, no-wrap
7428 msgid ""
7429 "    _SVID_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
7430 "    _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED\n"
7431 msgstr ""
7432 "    _SVID_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
7433 "    _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED\n"
7434
7435 #. type: Plain text
7436 #: build/C/man2/setpgid.2:89
7437 #, no-wrap
7438 msgid "    || /* Since glibc 2.19: */ _BSD_SOURCE\n"
7439 msgstr "    || /* glibc 2.19 以降: */ _BSD_SOURCE\n"
7440
7441 #. type: Plain text
7442 #: build/C/man2/setpgid.2:93
7443 msgid "B<setpgrp>()\\ (BSD), B<getpgrp>()\\ (BSD) [before glibc 2.19]:"
7444 msgstr "B<setpgrp>()\\ (BSD), B<getpgrp>()\\ (BSD) [glibc 2.19 より前]:"
7445
7446 #. type: Plain text
7447 #: build/C/man2/setpgid.2:97
7448 #, no-wrap
7449 msgid ""
7450 "    _BSD_SOURCE &&\n"
7451 "        !\\ (_POSIX_SOURCE || _POSIX_C_SOURCE || _XOPEN_SOURCE ||\n"
7452 "           _XOPEN_SOURCE_EXTENDED || _GNU_SOURCE || _SVID_SOURCE)\n"
7453 msgstr ""
7454 "    _BSD_SOURCE &&\n"
7455 "        !\\ (_POSIX_SOURCE || _POSIX_C_SOURCE || _XOPEN_SOURCE ||\n"
7456 "           _XOPEN_SOURCE_EXTENDED || _GNU_SOURCE || _SVID_SOURCE)\n"
7457
7458 #. type: Plain text
7459 #: build/C/man2/setpgid.2:109
7460 msgid "All of these interfaces are available on Linux, and are used for getting and setting the process group ID (PGID) of a process.  The preferred, POSIX.1-specified ways of doing this are: B<getpgrp>(void), for retrieving the calling process's PGID; and B<setpgid>(), for setting a process's PGID."
7461 msgstr "これらのインタフェースすべてが Linux で利用可能で、 これらを使ってプロセスのプロセスグループ ID (PGID) の 取得や設定ができる。 推奨の、POSIX.1 で規定された方法では、 B<getpgrp>(void)  で呼び出し元プロセスの PGID を取得し、 B<setpgid>()  で設定する。"
7462
7463 #. type: Plain text
7464 #: build/C/man2/setpgid.2:134
7465 msgid "B<setpgid>()  sets the PGID of the process specified by I<pid> to I<pgid>.  If I<pid> is zero, then the process ID of the calling process is used.  If I<pgid> is zero, then the PGID of the process specified by I<pid> is made the same as its process ID.  If B<setpgid>()  is used to move a process from one process group to another (as is done by some shells when creating pipelines), both process groups must be part of the same session (see B<setsid>(2)  and B<credentials>(7)).  In this case, the I<pgid> specifies an existing process group to be joined and the session ID of that group must match the session ID of the joining process."
7466 msgstr "B<setpgid>()  は I<pid> で指定したプロセスの PGID に I<pgid> を設定する。 I<pid> がゼロならば、呼び出し元プロセスのプロセス ID が pid として使用される。 I<pgid> がゼロならば、 I<pid> で指定されたプロセスの PGID がそのプロセスのプロセス ID と 同じに設定される。 B<setpgid>()  をプロセスをあるプロセスグループから別のグループへ 移動するために使用する場合は (一部のシェルはパイプラインを生成 する時にこれを行う)、両方のプロセスグループは同じセッションの 一部でなければならない (B<setsid>(2)  と B<credentials>(7)  参照)。この場合は I<pgid> は参加すべき既存の プロセスグループを指定し、そのセッション ID は参加するプロセスの セッション ID に一致しなければならない。"
7467
7468 #. type: Plain text
7469 #: build/C/man2/setpgid.2:139
7470 msgid "The POSIX.1 version of B<getpgrp>(), which takes no arguments, returns the PGID of the calling process."
7471 msgstr "POSIX.1 バージョンの B<getpgrp>()  は引き数を一つもとらず、 呼び出し元プロセスの PGID を返す。"
7472
7473 #. type: Plain text
7474 #: build/C/man2/setpgid.2:150
7475 msgid "B<getpgid>()  returns the PGID of the process specified by I<pid>.  If I<pid> is zero, the process ID of the calling process is used.  (Retrieving the PGID of a process other than the caller is rarely necessary, and the POSIX.1 B<getpgrp>()  is preferred for that task.)"
7476 msgstr "B<getpgid>()  は I<pid> で指定されたプロセスの PGID を返す。 I<pid> がゼロならば、呼び出し元プロセスのプロセス ID が pid として使用される。 (呼び出し元プロセス以外のプロセスの PGID の取得が必要になることは めったになく、呼び出し元プロセスの PGID を取得するには POSIX.1 バージョンの B<getpgrp>()  を使うのが望ましい。)"
7477
7478 #. type: Plain text
7479 #: build/C/man2/setpgid.2:155
7480 msgid "The System\\ V-style B<setpgrp>(), which takes no arguments, is equivalent to I<setpgid(0,\\ 0)>."
7481 msgstr "System\\ V バージョンの B<setpgrp>()  は引き数を一つもとらず、 I<setpgid(0,\\ 0)> と等価である。"
7482
7483 #. type: Plain text
7484 #: build/C/man2/setpgid.2:163
7485 msgid "The BSD-specific B<setpgrp>()  call, which takes arguments I<pid> and I<pgid>, is is a wrapper function that calls"
7486 msgstr "BSD 仕様の B<setpgrp>()  は I<pid> と I<pgid> を引き数にとり、 以下を呼び出すラッパー関数である。"
7487
7488 #. type: Plain text
7489 #: build/C/man2/setpgid.2:165
7490 #, no-wrap
7491 msgid "    setpgid(pid, pgid)\n"
7492 msgstr "    setpgid(pid, pgid)\n"
7493
7494 #.  The true BSD setpgrp() system call differs in allowing the PGID
7495 #.  to be set to arbitrary values, rather than being restricted to
7496 #.  PGIDs in the same session.
7497 #. type: Plain text
7498 #: build/C/man2/setpgid.2:176
7499 msgid "Since glibc 2.19, the BSD-specific B<setpgrp>()  function is no longer exposed by I<E<lt>unistd.hE<gt>>; calls should be replaced with the B<setpgid>()  call shown above."
7500 msgstr "glibc 2.19 以降、 BSD 固有の B<setpgrp>() 関数はもはや I<E<lt>unistd.hE<gt>> では公開されない。 この関数の呼び出しは上記の B<setpgid>() の呼び出しで置き換えるべきである。"
7501
7502 #. type: Plain text
7503 #: build/C/man2/setpgid.2:182
7504 msgid "The BSD-specific B<getpgrp>()  call, which takes a single I<pid> argument, is a wrapper function that calls"
7505 msgstr "BSD 仕様の B<getpgrp>()  は I<pid> だけを引き数にとり、 以下を呼び出すラッパー関数である。"
7506
7507 #. type: Plain text
7508 #: build/C/man2/setpgid.2:184
7509 #, no-wrap
7510 msgid "    getpgid(pid)\n"
7511 msgstr "    getpgid(pid)\n"
7512
7513 #. type: Plain text
7514 #: build/C/man2/setpgid.2:195
7515 msgid "Since glibc 2.19, the BSD-specific B<getpgrp>()  function is no longer exposed by I<E<lt>unistd.hE<gt>>; calls should be replaced with calls to the POSIX.1 B<getpgrp>()  which takes no arguments (if the intent is to obtain the caller's PGID), or with the B<getpgid>()  call shown above."
7516 msgstr "glibc 2.19 以降、 BSD 固有の B<getpgrp>() 関数はもはや I<E<lt>unistd.hE<gt>> では公開されない。 この関数の呼び出しは、引き数を取らない POSIX.1 の B<getpgrp>() の呼び出し (呼び出し元の PGID を取得する目的の場合)、もしくは上記の B<getpgid>() の呼び出しで置き換えるべきである。"
7517
7518 #. type: Plain text
7519 #: build/C/man2/setpgid.2:204
7520 msgid "On success, B<setpgid>()  and B<setpgrp>()  return zero.  On error, -1 is returned, and I<errno> is set appropriately."
7521 msgstr "B<setpgid>()  と B<setpgrp>()  は成功した場合、ゼロを返す。エラーの場合は -1 を返し、 I<errno> が適切に設定される。"
7522
7523 #. type: Plain text
7524 #: build/C/man2/setpgid.2:208
7525 msgid "The POSIX.1 B<getpgrp>()  always returns the PGID of the caller."
7526 msgstr "POSIX.1 バージョンの B<getpgrp>()  は常に呼び出しプロセスの PGID を返す。"
7527
7528 #. type: Plain text
7529 #: build/C/man2/setpgid.2:216
7530 msgid "B<getpgid>(), and the BSD-specific B<getpgrp>()  return a process group on success.  On error, -1 is returned, and I<errno> is set appropriately."
7531 msgstr "B<getpgid>()  と BSD 仕様の B<getpgrp>()  は成功した場合プロセスグループを返す。 エラーの場合は -1 を返し、 I<errno> が適切に設定される。"
7532
7533 #. type: Plain text
7534 #: build/C/man2/setpgid.2:225
7535 msgid "An attempt was made to change the process group ID of one of the children of the calling process and the child had already performed an B<execve>(2)  (B<setpgid>(), B<setpgrp>())."
7536 msgstr "呼び出し元プロセスの子プロセスのプロセスグループ ID を変更しようとしたが、 すでにその子プロセスは B<execve>(2)  を実行していた。 (B<setpgid>(), B<setpgrp>())"
7537
7538 #. type: Plain text
7539 #: build/C/man2/setpgid.2:231
7540 msgid "I<pgid> is less than 0 (B<setpgid>(), B<setpgrp>())."
7541 msgstr "I<pgid> が 0 より小さい。 (B<setpgid>(), B<setpgrp>())"
7542
7543 #. type: Plain text
7544 #: build/C/man2/setpgid.2:240
7545 msgid "An attempt was made to move a process into a process group in a different session, or to change the process group ID of one of the children of the calling process and the child was in a different session, or to change the process group ID of a session leader (B<setpgid>(), B<setpgrp>())."
7546 msgstr "プロセスを異なるセッションのプロセスグループに移動させようとした。 または呼び出し元プロセスの子プロセスのプロセスグループ ID を変更しようと したが、その子プロセスは別のセッションだった。 またはセッションリーダーのプロセスグループ ID を変更しようとした。 (B<setpgid>(), B<setpgrp>())"
7547
7548 #. type: Plain text
7549 #: build/C/man2/setpgid.2:250
7550 msgid "For B<getpgid>(): I<pid> does not match any process.  For B<setpgid>(): I<pid> is not the calling process and not a child of the calling process."
7551 msgstr "B<getpgid>()  の場合: I<pid> がどのプロセスにも一致しない。 B<setpgid>()  の場合: I<pid> が呼び出し元のプロセスではなく、呼び出し元のプロセスの子プロセスでもない。"
7552
7553 #. type: Plain text
7554 #: build/C/man2/setpgid.2:256
7555 msgid "B<setpgid>()  and the version of B<getpgrp>()  with no arguments conform to POSIX.1-2001."
7556 msgstr "B<setpgid>()  と、引き数なしバージョンの B<getpgrp>()  は POSIX.1-2001 に準拠している。"
7557
7558 #. type: Plain text
7559 #: build/C/man2/setpgid.2:265
7560 msgid "POSIX.1-2001 also specifies B<getpgid>()  and the version of B<setpgrp>()  that takes no arguments.  (POSIX.1-2008 marks this B<setpgrp>()  specification as obsolete.)"
7561 msgstr "POSIX.1-2001 は、 B<getpgid>()  と、引き数なしバージョンの B<setpgrp>()  も規定している。 POSIX.1-2008 は、この B<setpgrp>()  の仕様を廃止予定としている。"
7562
7563 #. type: Plain text
7564 #: build/C/man2/setpgid.2:272
7565 msgid "The version of B<getpgrp>()  with one argument and the version of B<setpgrp>()  that takes two arguments derive from 4.2BSD, and are not specified by POSIX.1."
7566 msgstr "引き数 1 個バージョンの B<getpgrp>()  と引き数 2 個バージョンの B<setpgrp>()  は 4.2BSD に由来し、 POSIX.1 では規定されていない。"
7567
7568 #. type: Plain text
7569 #: build/C/man2/setpgid.2:278
7570 msgid "A child created via B<fork>(2)  inherits its parent's process group ID.  The PGID is preserved across an B<execve>(2)."
7571 msgstr "B<fork>(2)  で作成された子プロセスは、親プロセスの PGID を継承する。 B<execve>(2)  の前後で PGID は保存される。"
7572
7573 #. type: Plain text
7574 #: build/C/man2/setpgid.2:281
7575 msgid "Each process group is a member of a session and each process is a member of the session of which its process group is a member."
7576 msgstr "各プロセスグループはセッションのメンバーであり、各プロセスは そのプロセスグループが所属しているセッションのメンバーである。"
7577
7578 #. type: Plain text
7579 #: build/C/man2/setpgid.2:308
7580 msgid "A session can have a controlling terminal.  At any time, one (and only one) of the process groups in the session can be the foreground process group for the terminal; the remaining process groups are in the background.  If a signal is generated from the terminal (e.g., typing the interrupt key to generate B<SIGINT>), that signal is sent to the foreground process group.  (See B<termios>(3)  for a description of the characters that generate signals.)  Only the foreground process group may B<read>(2)  from the terminal; if a background process group tries to B<read>(2)  from the terminal, then the group is sent a B<SIGTTIN> signal, which suspends it.  The B<tcgetpgrp>(3)  and B<tcsetpgrp>(3)  functions are used to get/set the foreground process group of the controlling terminal."
7581 msgstr "セッションは制御端末 (controlling terminal) を持つことができる。 いつでも、セッションに所属するプロセスグループの一つ (だけ) が 端末のフォアグランドのプロセスグループになることができ、 残りのプロセスグループはバックグラウンドになる。 端末からシグナルが生成された場合 (例えば、中断キーを叩いて B<SIGINT> が生成されるなど)、そのシグナルはフォアグラウンドのプロセスグループ に送られる (シグナルを生成する文字の説明は B<termios>(3)  を参照)。 フォアグラウンドのプロセスグループだけが端末からの B<read>(2)  ができる。 バックグラウンドのプロセスグループが端末からの B<read>(2)  を行おうとした場合、そのプロセスグループにはシグナル B<SIGTTIN> が送られ、そのプロセスグループは一時停止 (suspend) する。 関数 B<tcgetpgrp>(3)  と B<tcsetpgrp>(3)  を使うと、制御端末のフォアグラウンドのプロセスグループを 取得/設定できる。"
7582
7583 #. type: Plain text
7584 #: build/C/man2/setpgid.2:316
7585 msgid "The B<setpgid>()  and B<getpgrp>()  calls are used by programs such as B<bash>(1)  to create process groups in order to implement shell job control."
7586 msgstr "B<setpgid>()  と B<getpgrp>()  は、 B<bash>(1)  のようなプログラムで、シェルのジョブ制御 (job control) の実装のための プロセスグループを作成するのに使われる。"
7587
7588 #. type: Plain text
7589 #: build/C/man2/setpgid.2:326
7590 msgid "If a session has a controlling terminal, and the B<CLOCAL> flag for that terminal is not set, and a terminal hangup occurs, then the session leader is sent a B<SIGHUP>.  If the session leader exits, then a B<SIGHUP> signal will also be sent to each process in the foreground process group of the controlling terminal."
7591 msgstr "セッションが制御端末を持っていて、その端末に対して B<CLOCAL> フラグが設定されておらず、端末のハングアップが起きた場合、 セッションリーダーに B<SIGHUP> が送られる。 セッションリーダーが終了した場合には、その制御端末の フォアグランドのプロセスグループに所属する各プロセスにも B<SIGHUP> シグナルが送られる。"
7592
7593 #.  exit.3 refers to the following text:
7594 #. type: Plain text
7595 #: build/C/man2/setpgid.2:340
7596 msgid "If the exit of the process causes a process group to become orphaned, and if any member of the newly orphaned process group is stopped, then a B<SIGHUP> signal followed by a B<SIGCONT> signal will be sent to each process in the newly orphaned process group.  An orphaned process group is one in which the parent of every member of process group is either itself also a member of the process group or is a member of a process group in a different session (see also B<credentials>(7))."
7597 msgstr "プロセスの終了によってプロセスグループが孤児 (orphaned) になった際に、 その新たに孤児になったプロセスグループに停止しているメンバーがいれば、 その孤児になったプロセスグループに属す全てのプロセスに B<SIGHUP> シグナルに続けて B<SIGCONT> シグナルが送られる。 孤児になった (orphaned) プロセスグループとは、 そのプロセスグループの全てのメンバーについて、メンバーの親プロセスが、 親プロセス自身もそのプロセスグループのメンバーか、 別のセッションに属すプロセスグループのメンバーのいずれかであるような、 プロセスグループのことである。"
7598
7599 #. type: Plain text
7600 #: build/C/man2/setpgid.2:347
7601 msgid "B<getuid>(2), B<setsid>(2), B<tcgetpgrp>(3), B<tcsetpgrp>(3), B<termios>(3), B<credentials>(7)"
7602 msgstr "B<getuid>(2), B<setsid>(2), B<tcgetpgrp>(3), B<tcsetpgrp>(3), B<termios>(3), B<credentials>(7)"
7603
7604 #. type: TH
7605 #: build/C/man2/setresuid.2:26
7606 #, no-wrap
7607 msgid "SETRESUID"
7608 msgstr "SETRESUID"
7609
7610 #. type: Plain text
7611 #: build/C/man2/setresuid.2:29
7612 msgid "setresuid, setresgid - set real, effective and saved user or group ID"
7613 msgstr "setresuid, setresgid - ユーザやグループの 実、実効、保存 ID を設定する"
7614
7615 #. type: Plain text
7616 #: build/C/man2/setresuid.2:35
7617 msgid "B<int setresuid(uid_t >I<ruid>B<, uid_t >I<euid>B<, uid_t >I<suid>B<);>"
7618 msgstr "B<int setresuid(uid_t >I<ruid>B<, uid_t >I<euid>B<, uid_t >I<suid>B<);>"
7619
7620 #. type: Plain text
7621 #: build/C/man2/setresuid.2:37
7622 msgid "B<int setresgid(gid_t >I<rgid>B<, gid_t >I<egid>B<, gid_t >I<sgid>B<);>"
7623 msgstr "B<int setresgid(gid_t >I<rgid>B<, gid_t >I<egid>B<, gid_t >I<sgid>B<);>"
7624
7625 #. type: Plain text
7626 #: build/C/man2/setresuid.2:41
7627 msgid "B<setresuid>()  sets the real user ID, the effective user ID, and the saved set-user-ID of the calling process."
7628 msgstr "B<setresuid>()  は呼び出し元のプロセスの実 (real) ユーザーID、実効 (effective) ユーザーID、 保存 set-user-ID を設定する。"
7629
7630 #. type: Plain text
7631 #: build/C/man2/setresuid.2:47
7632 msgid "Unprivileged user processes may change the real UID, effective UID, and saved set-user-ID, each to one of: the current real UID, the current effective UID or the current saved set-user-ID."
7633 msgstr "非特権ユーザーのプロセスは、その実 UID、実効 UID、保存 set-user-ID を、 現在の実 UID、現在の実効 UID、現在の保存 set-user-ID のどれかに変更することができる:"
7634
7635 #. type: Plain text
7636 #: build/C/man2/setresuid.2:51
7637 msgid "Privileged processes (on Linux, those having the B<CAP_SETUID> capability)  may set the real UID, effective UID, and saved set-user-ID to arbitrary values."
7638 msgstr "特権プロセス (Linux では B<CAP_SETUID> ケーパビリティ (capability) を持つ プロセス) は、実 UID、実効 UID、保存 set-user-ID を任意の値に設定できる。"
7639
7640 #. type: Plain text
7641 #: build/C/man2/setresuid.2:53
7642 msgid "If one of the arguments equals -1, the corresponding value is not changed."
7643 msgstr "引き数のどれかが -1 の場合はその値は変更されずに残される。"
7644
7645 #. type: Plain text
7646 #: build/C/man2/setresuid.2:57
7647 msgid "Regardless of what changes are made to the real UID, effective UID, and saved set-user-ID, the filesystem UID is always set to the same value as the (possibly new) effective UID."
7648 msgstr "実 UID、実効 UID、保存 set-user-ID にどんな変更が行われたかに関わらず、 ファイルシステム UID は常に実効 UID (可能であれば変更後の新しい実効 UID)  と同じ値に設定される。"
7649
7650 #. type: Plain text
7651 #: build/C/man2/setresuid.2:64
7652 msgid "Completely analogously, B<setresgid>()  sets the real GID, effective GID, and saved set-group-ID of the calling process (and always modifies the filesystem GID to be the same as the effective GID), with the same restrictions for unprivileged processes."
7653 msgstr "全く同じように、 B<setresgid>()  は呼び出し元のプロセスの実 GID、実効 GID、保存 set-group-ID を設定する (さらにファイルシステム GID を実効 GID と同じ値に修正する)。 非特権プロセスは同様の制限を受ける。"
7654
7655 #. type: Plain text
7656 #: build/C/man2/setresuid.2:76
7657 msgid "I<Note>: there are cases where B<setresuid>()  can fail even when the caller is UID 0; it is a grave security error to omit checking for a failure return from B<setresuid>()."
7658 msgstr "I<注意>: 呼び出し元が UID 0 であっても B<setresuid>() が失敗する場合がある。 B<setresuid>() からのリターンが失敗かどうかの確認を省略することは重大なセキュリティ上のエラーとなる。"
7659
7660 #. type: TP
7661 #: build/C/man2/setresuid.2:77 build/C/man2/setresuid.2:84
7662 #: build/C/man2/setreuid.2:106 build/C/man2/setreuid.2:113
7663 #: build/C/man2/setuid.2:83 build/C/man2/setuid.2:90
7664 #, no-wrap
7665 msgid "B<EAGAIN>"
7666 msgstr "B<EAGAIN>"
7667
7668 #. type: Plain text
7669 #: build/C/man2/setresuid.2:84 build/C/man2/setreuid.2:113
7670 msgid "The call would change the caller's real UID (i.e., I<ruid> does not match the caller's real UID), but there was a temporary failure allocating the necessary kernel data structures."
7671 msgstr "この呼び出しで呼び出し元の実 UID が変更されるはずだったが (つまり、 I<ruid> が呼び出し元の実 UID と一致していない)、 必要なカーネルのデータ構造体の割り当てで一時的な失敗があった。"
7672
7673 #. type: Plain text
7674 #: build/C/man2/setresuid.2:99 build/C/man2/setreuid.2:128
7675 msgid "I<ruid> does not match the caller's real UID and this call would bring the number of processes belonging to the real user ID I<ruid> over the caller's B<RLIMIT_NPROC> resource limit.  Since Linux 3.1, this error case no longer occurs (but robust applications should check for this error); see the description of B<EAGAIN> in B<execve>(2)."
7676 msgstr "I<ruid> は呼び出し元の実 UID と一致しておらず、 この呼び出しで実ユーザー ID I<ruid> に属するプロセス数が呼び出し元の B<RLIMIT_NPROC> リソース上限を超過するところであった。 Linux 3.1 以降では、このエラーはもはや発生することはない (しかし、堅牢性が求められるアプリケーションではこのエラーを確認すべきである)。 B<execve>(2) の B<EAGAIN> の説明を参照。"
7677
7678 #. type: Plain text
7679 #: build/C/man2/setresuid.2:103 build/C/man2/setreuid.2:132
7680 msgid "One or more of the target user or group IDs is not valid in this user namespace."
7681 msgstr "対象のユーザー ID やグループ ID のうち 1 つ以上がこのユーザー名前空間で有効ではない。"
7682
7683 #. type: Plain text
7684 #: build/C/man2/setresuid.2:107
7685 msgid "The calling process is not privileged (did not have the B<CAP_SETUID> capability) and tried to change the IDs to values that are not permitted."
7686 msgstr "呼び出したプロセスが特権を持たないのに (B<CAP_SETUID> ケーパビリティを持たないのに)、 ID を許されていない値に変更しようとした。"
7687
7688 #. type: Plain text
7689 #: build/C/man2/setresuid.2:109
7690 msgid "These calls are available under Linux since Linux 2.1.44."
7691 msgstr "Linux ではバージョン 2.1.44 より利用可能になった。"
7692
7693 #. type: Plain text
7694 #: build/C/man2/setresuid.2:116
7695 msgid "Under HP-UX and FreeBSD, the prototype is found in I<E<lt>unistd.hE<gt>>.  Under Linux, the prototype is provided by glibc since version 2.3.2."
7696 msgstr ""
7697 "HP-UX や FreeBSD では I<E<lt>unistd.hE<gt>> にプロトタイプが存在する。 \n"
7698 "Linux では、glibc 2.3.2 以降で プロトタイプが提供されている。"
7699
7700 #. type: Plain text
7701 #: build/C/man2/setresuid.2:132
7702 msgid "The original Linux B<setresuid>()  and B<setresgid>()  system calls supported only 16-bit user and group IDs.  Subsequently, Linux 2.4 added B<setresuid32>()  and B<setresgid32>(), supporting 32-bit IDs.  The glibc B<setresuid>()  and B<setresgid>()  wrapper functions transparently deal with the variations across kernel versions."
7703 msgstr ""
7704 "元々の Linux の B<setresuid>() と B<setresgid>() システムコールは\n"
7705 "16 ビットのグループ ID だけに対応していた。\n"
7706 "その後、Linux 2.4 で、32 ビットの ID に対応した\n"
7707 "B<setresuid32>() と B<setresgid32>() が追加された。\n"
7708 "glibc の B<setresuid>() と B<setresgid>() のラッパー関数は\n"
7709 "カーネルバージョンによるこの違いを吸収している。"
7710
7711 #. type: Plain text
7712 #: build/C/man2/setresuid.2:142
7713 msgid "B<getresuid>(2), B<getuid>(2), B<setfsgid>(2), B<setfsuid>(2), B<setreuid>(2), B<setuid>(2), B<capabilities>(7), B<credentials>(7), B<user_namespaces>(7)"
7714 msgstr "B<getresuid>(2), B<getuid>(2), B<setfsgid>(2), B<setfsuid>(2), B<setreuid>(2), B<setuid>(2), B<capabilities>(7), B<credentials>(7), B<user_namespaces>(7)"
7715
7716 #. type: TH
7717 #: build/C/man2/setreuid.2:45
7718 #, no-wrap
7719 msgid "SETREUID"
7720 msgstr "SETREUID"
7721
7722 #. type: Plain text
7723 #: build/C/man2/setreuid.2:48
7724 msgid "setreuid, setregid - set real and/or effective user or group ID"
7725 msgstr "setreuid, setregid - 実 (real) と実効 (effective) ユーザー (グループ) ID を設定する"
7726
7727 #. type: Plain text
7728 #: build/C/man2/setreuid.2:54
7729 msgid "B<int setreuid(uid_t >I<ruid>B<, uid_t >I<euid>B<);>"
7730 msgstr "B<int setreuid(uid_t >I<ruid>B<, uid_t >I<euid>B<);>"
7731
7732 #. type: Plain text
7733 #: build/C/man2/setreuid.2:56
7734 msgid "B<int setregid(gid_t >I<rgid>B<, gid_t >I<egid>B<);>"
7735 msgstr "B<int setregid(gid_t >I<rgid>B<, gid_t >I<egid>B<);>"
7736
7737 #. type: Plain text
7738 #: build/C/man2/setreuid.2:64
7739 msgid "B<setreuid>(), B<setregid>():"
7740 msgstr "B<setreuid>(), B<setregid>():"
7741
7742 #. type: Plain text
7743 #: build/C/man2/setreuid.2:68
7744 msgid "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED"
7745 msgstr "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED"
7746
7747 #. type: Plain text
7748 #: build/C/man2/setreuid.2:73
7749 msgid "B<setreuid>()  sets real and effective user IDs of the calling process."
7750 msgstr "B<setreuid>()  は呼び出し元のプロセスの実 (real) ユーザー ID と 実効 (effective) ユーザー ID を設定する。"
7751
7752 #. type: Plain text
7753 #: build/C/man2/setreuid.2:76
7754 msgid "Supplying a value of -1 for either the real or effective user ID forces the system to leave that ID unchanged."
7755 msgstr "実ユーザー ID や実効ユーザー ID に -1 を与えた場合、 システムはその ID を変更しない。"
7756
7757 #. type: Plain text
7758 #: build/C/man2/setreuid.2:79
7759 msgid "Unprivileged processes may only set the effective user ID to the real user ID, the effective user ID, or the saved set-user-ID."
7760 msgstr "非特権プロセスは実効ユーザー ID を実ユーザー ID または実効ユーザー ID または 保存 set-user-ID にしか設定できない。"
7761
7762 #. type: Plain text
7763 #: build/C/man2/setreuid.2:82
7764 msgid "Unprivileged users may only set the real user ID to the real user ID or the effective user ID."
7765 msgstr "非特権ユーザーは、実ユーザー ID を実ユーザー ID または 実効ユーザー ID にしか設定できない。"
7766
7767 #. type: Plain text
7768 #: build/C/man2/setreuid.2:88
7769 msgid "If the real user ID is set (i.e., I<ruid> is not -1) or the effective user ID is set to a value not equal to the previous real user ID, the saved set-user-ID will be set to the new effective user ID."
7770 msgstr "実ユーザーID が設定されたり (I<ruid> が -1 ではない)、実効ユーザーID が前の実ユーザーID と 異った値に設定された場合、保存 set-user-ID には新しい実効ユーザーID の値が設定される。"
7771
7772 #. type: Plain text
7773 #: build/C/man2/setreuid.2:93
7774 msgid "Completely analogously, B<setregid>()  sets real and effective group ID's of the calling process, and all of the above holds with \"group\" instead of \"user\"."
7775 msgstr "これと全く同様に、 B<setregid>()  は呼び出し元のプロセスの実グループ ID と実効グループ ID を設定し、 上記の説明で「ユーザー」を「グループ」に読み替えたことが成り立つ。"
7776
7777 #. type: Plain text
7778 #: build/C/man2/setreuid.2:105
7779 msgid "I<Note>: there are cases where B<setreuid>()  can fail even when the caller is UID 0; it is a grave security error to omit checking for a failure return from B<setreuid>()."
7780 msgstr "I<注意>: 呼び出し元が UID 0 であっても B<setreuid>() が失敗する場合がある。 B<setreuid>() からのリターンが失敗かどうかの確認を省略することは重大なセキュリティ上のエラーとなる。"
7781
7782 #. type: Plain text
7783 #: build/C/man2/setreuid.2:148
7784 msgid "The calling process is not privileged (Linux: does not have the B<CAP_SETUID> capability in the case of B<setreuid>(), or the B<CAP_SETGID> capability in the case of B<setregid>())  and a change other than (i)  swapping the effective user (group) ID with the real user (group) ID, or (ii) setting one to the value of the other or (iii) setting the effective user (group) ID to the value of the saved set-user-ID (saved set-group-ID) was specified."
7785 msgstr "呼び出し元のプロセスに特権がなく (Linux では B<setreuid>()  の場合に B<CAP_SETUID> ケーパビリティ (capability) がなく、 B<setregid>()  の場合に B<CAP_SETGID> ケーパビリティがない)、 以下のいずれでもない変更が指定された: (i) 実効ユーザー (グループ) ID と実ユーザー (グループ) ID を入れ換える。 (ii) 片方の値を他方に設定する。 (iii) 実効ユーザー (グループ) ID に保存 set-user-ID (保存 set-group-ID)  の値を設定する。"
7786
7787 #. type: Plain text
7788 #: build/C/man2/setreuid.2:154
7789 msgid "POSIX.1-2001, 4.3BSD (the B<setreuid>()  and B<setregid>()  function calls first appeared in 4.2BSD)."
7790 msgstr "POSIX.1-2001, 4.3BSD (B<setreuid>()  と B<setregid>()  関数コールは 4.2BSD で登場した)。"
7791
7792 #. type: Plain text
7793 #: build/C/man2/setreuid.2:158
7794 msgid "Setting the effective user (group) ID to the saved set-user-ID (saved set-group-ID) is possible since Linux 1.1.37 (1.1.38)."
7795 msgstr "実効ユーザー (グループ) ID を保存ユーザー (グループ) ID に 設定することが、Linux 1.1.37 (1.1.38) から可能になった。"
7796
7797 #. type: Plain text
7798 #: build/C/man2/setreuid.2:175
7799 msgid "POSIX.1 does not specify all of possible ID changes that are permitted on Linux for an unprivileged process.  For B<setreuid>(), the effective user ID can be made the same as the real user ID or the save set-user-ID, and it is unspecified whether unprivileged processes may set the real user ID to the real user ID, the effective user ID, or the saved set-user-ID.  For B<setregid>(), the real group ID can be changed to the value of the saved set-group-ID, and the effective group ID can be changed to the value of the real group ID or the saved set-group-ID.  The precise details of what ID changes are permitted vary across implementations."
7800 msgstr "POSIX.1 では、非特権プロセスに対して Linux 上で認められている ID の変更の 全パターンを規定しているわけではない。 B<setreuid>()  では、実効ユーザ ID を実ユーザ ID もしくは保存 set-user-ID と 同じ値にすることができるが、 非特権プロセスが実ユーザ ID を実ユーザ ID、実効ユーザ ID、 保存 set-user-ID のどの値にも設定できるかは規定されていない。 B<setregid>()  では、実グループ ID を保存 set-group-ID と同じ値に変更でき、 実効グループ ID を実グループ ID や保存 set-group-ID と同じ値に変更できる。 どのような ID の変更が認められているかの正確な詳細は 実装ごとに異なる。"
7801
7802 #. type: Plain text
7803 #: build/C/man2/setreuid.2:178
7804 msgid "POSIX.1 makes no specification about the effect of these calls on the saved set-user-ID and saved set-group-ID."
7805 msgstr "POSIX.1 では、これらのシステムコールが保存 set-user-ID や 保存 set-group-ID に与える影響については規定していない。"
7806
7807 #. type: Plain text
7808 #: build/C/man2/setreuid.2:194
7809 msgid "The original Linux B<setreuid>()  and B<setregid>()  system calls supported only 16-bit user and group IDs.  Subsequently, Linux 2.4 added B<setreuid32>()  and B<setregid32>(), supporting 32-bit IDs.  The glibc B<setreuid>()  and B<setregid>()  wrapper functions transparently deal with the variations across kernel versions."
7810 msgstr ""
7811 "元々の Linux の B<setreuid>() と B<setregid>() システムコールは\n"
7812 "16 ビットのグループ ID だけに対応していた。\n"
7813 "その後、Linux 2.4 で、32 ビットの ID に対応した\n"
7814 "B<setreuid32>() と B<setregid32>() が追加された。\n"
7815 "glibc の B<setreuid>() と B<setregid>() のラッパー関数は\n"
7816 "カーネルバージョンによるこの違いを吸収している。"
7817
7818 #. type: Plain text
7819 #: build/C/man2/setreuid.2:203
7820 msgid "B<getgid>(2), B<getuid>(2), B<seteuid>(2), B<setgid>(2), B<setresuid>(2), B<setuid>(2), B<capabilities>(7), B<user_namespaces>(7)"
7821 msgstr "B<getgid>(2), B<getuid>(2), B<seteuid>(2), B<setgid>(2), B<setresuid>(2), B<setuid>(2), B<capabilities>(7), B<user_namespaces>(7)"
7822
7823 #. type: TH
7824 #: build/C/man2/setsid.2:31
7825 #, no-wrap
7826 msgid "SETSID"
7827 msgstr "SETSID"
7828
7829 #. type: Plain text
7830 #: build/C/man2/setsid.2:34
7831 msgid "setsid - creates a session and sets the process group ID"
7832 msgstr "setsid - セッション (session) を作成し、プロセスグループ ID を設定する"
7833
7834 #. type: Plain text
7835 #: build/C/man2/setsid.2:39
7836 msgid "B<pid_t setsid(void);>"
7837 msgstr "B<pid_t setsid(void);>"
7838
7839 #. type: Plain text
7840 #: build/C/man2/setsid.2:50
7841 msgid "B<setsid>()  creates a new session if the calling process is not a process group leader.  The calling process is the leader of the new session (i.e., its session ID is made the same as it process ID).  The calling process also becomes the process group leader of a new process group in the session (i.e., its process group ID is made the same as it process ID)."
7842 msgstr "B<setsid>() は、 呼び出したプロセスがプロセスグループリーダー (process group leader) でなければ、 新しいセッションを作成する。 呼び出したプロセスは、 新しいセッションのリーダーとなる (すなわち、そのセッション ID がプロセス ID と同じ値になる)。 また、呼び出したプロセスは、 そのセッションの新しいプロセスグループのプロセスグループリーダーにもなる (すなわち、プロセスグループ ID がプロセス ID と同じ値になる)。"
7843
7844 #. type: Plain text
7845 #: build/C/man2/setsid.2:54
7846 msgid "The calling process will be the only process in the new process group and in the new session.  The new session has no controlling terminal."
7847 msgstr "呼び出したプロセスは、 新しいプロセスグループと新しいセッションの唯一のプロセスとなる。 新しいセッションは制御端末を持たない。"
7848
7849 #. type: Plain text
7850 #: build/C/man2/setsid.2:61
7851 msgid "On success, the (new) session ID of the calling process is returned.  On error, I<(pid_t)\\ -1> is returned, and I<errno> is set to indicate the error."
7852 msgstr "成功すると、呼び出したプロセスの (新しい) セッション ID が返される。 エラーの場合は、 I<(pid_t)\\ -1> が返され、 I<errno> にエラーを示す値が設定される。"
7853
7854 #. type: Plain text
7855 #: build/C/man2/setsid.2:68
7856 msgid "The process group ID of any process equals the PID of the calling process.  Thus, in particular, B<setsid>()  fails if the calling process is already a process group leader."
7857 msgstr "いずれかのプロセスのプロセスグループ ID が、 呼び出したプロセスの PID と等しい。 これは、呼び出したプロセスが既にプロセスリーダーの場合には B<setsid>()  は失敗することを意味する。"
7858
7859 #. type: Plain text
7860 #: build/C/man2/setsid.2:76
7861 msgid "A child created via B<fork>(2)  inherits its parent's session ID.  The session ID is preserved across an B<execve>(2)."
7862 msgstr "B<fork>(2)  で作成された子プロセスは、親プロセスのセッション ID を継承する。 B<execve>(2)  の前後でセッション ID は保存される。"
7863
7864 #. type: Plain text
7865 #: build/C/man2/setsid.2:93
7866 msgid "A process group leader is a process whose process group ID equals its PID.  Disallowing a process group leader from calling B<setsid>()  prevents the possibility that a process group leader places itself in a new session while other processes in the process group remain in the original session; such a scenario would break the strict two-level hierarchy of sessions and process groups.  In order to be sure that B<setsid>()  will succeed, B<fork>(2)  and B<_exit>(2), and have the child do B<setsid>()."
7867 msgstr "プロセスグループリーダーは、 プロセスグループ ID がその PID と同じ値のプロセスである。 プロセスグループリーダーが B<setsid>() を呼び出すことを許可しないと、 そのプロセスグループ内の他のプロセスを元のセッションに残したまま、 プロセスグループリーダーが自分自身を新しいセッションに入れるということができなくなる。 このようなシナリオは、 セッションとプロセスグループという厳密な 2 階層モデルを壊すことになる。 B<setsid>() が成功することを保証するには、 B<fork>(2) と B<_exit>(2) を行い、 その子プロセスに B<setsid>() をさせればよい。"
7868
7869 #. type: Plain text
7870 #: build/C/man2/setsid.2:100
7871 msgid "B<setsid>(1), B<getsid>(2), B<setpgid>(2), B<setpgrp>(2), B<tcgetsid>(3), B<credentials>(7)"
7872 msgstr "B<setsid>(1), B<getsid>(2), B<setpgid>(2), B<setpgrp>(2), B<tcgetsid>(3), B<credentials>(7)"
7873
7874 #. type: TH
7875 #: build/C/man2/setuid.2:30
7876 #, no-wrap
7877 msgid "SETUID"
7878 msgstr "SETUID"
7879
7880 #. type: Plain text
7881 #: build/C/man2/setuid.2:33
7882 msgid "setuid - set user identity"
7883 msgstr "setuid - ユーザー識別 (identity) を設定する"
7884
7885 #. type: Plain text
7886 #: build/C/man2/setuid.2:39
7887 msgid "B<int setuid(uid_t >I<uid>B<);>"
7888 msgstr "B<int setuid(uid_t >I<uid>B<);>"
7889
7890 #. type: Plain text
7891 #: build/C/man2/setuid.2:44
7892 msgid "B<setuid>()  sets the effective user ID of the calling process.  If the effective UID of the caller is root, the real UID and saved set-user-ID are also set."
7893 msgstr "B<setuid>()  は呼び出し元のプロセスの実効 (effective) ユーザー ID を設定する。 もし呼び出し元プロセスの実効 UID が root ならば、 実 (real) UID と保存 (saved) set-user-ID も設定される。"
7894
7895 #. type: Plain text
7896 #: build/C/man2/setuid.2:53
7897 msgid "Under Linux, B<setuid>()  is implemented like the POSIX version with the B<_POSIX_SAVED_IDS> feature.  This allows a set-user-ID (other than root) program to drop all of its user privileges, do some un-privileged work, and then reengage the original effective user ID in a secure manner."
7898 msgstr "Linux では、 B<setuid>()  は B<_POSIX_SAVED_IDS> をもった POSIX 版のように実装されている。 これは (ルート以外の) set-user-ID プログラムにそのユーザーの特権を 全て与え、特権の必要ない仕事をし、本来の実効ユーザー ID に 安全な方法で再び戻すことを許す。"
7899
7900 #. type: Plain text
7901 #: build/C/man2/setuid.2:63
7902 msgid "If the user is root or the program is set-user-ID-root, special care must be taken.  The B<setuid>()  function checks the effective user ID of the caller and if it is the superuser, all process-related user ID's are set to I<uid>.  After this has occurred, it is impossible for the program to regain root privileges."
7903 msgstr "ユーザーが root またはプログラムが root に set-user-ID されているならば、 特別の注意が払われる。 B<setuid>()  関数は呼び出し者の実効ユーザー ID をチェックし、 それがスーパーユーザーならば、 プロセスに関連する全てのユーザー ID に I<uid> を設定する。 これが行なわれた後にはプログラムが再びルートの特権を得ることはできない。"
7904
7905 #. type: Plain text
7906 #: build/C/man2/setuid.2:70
7907 msgid "Thus, a set-user-ID-root program wishing to temporarily drop root privileges, assume the identity of an unprivileged user, and then regain root privileges afterward cannot use B<setuid>().  You can accomplish this with B<seteuid>(2)."
7908 msgstr "したがって、set-user-ID-root プログラムで、一時的にルート特権を解除し、 非特権ユーザであるかのように振舞い、後でルート権限をもう一度得ようと する場合には、 B<setuid>()  を使うことができない。その場合には、 B<seteuid>(2)  を使う必要がある。"
7909
7910 #. type: Plain text
7911 #: build/C/man2/setuid.2:82
7912 msgid "I<Note>: there are cases where B<setuid>()  can fail even when the caller is UID 0; it is a grave security error to omit checking for a failure return from B<setuid>()."
7913 msgstr "I<注意>: 呼び出し元が UID 0 であっても B<setuid>() が失敗する場合がある。 B<setuid>() からのリターンが失敗かどうかの確認を省略することは重大なセキュリティ上のエラーとなる。"
7914
7915 #. type: Plain text
7916 #: build/C/man2/setuid.2:90
7917 msgid "The call would change the caller's real UID (i.e., I<uid> does not match the caller's real UID), but there was a temporary failure allocating the necessary kernel data structures."
7918 msgstr "この呼び出しで呼び出し元の実 UID が変更されるはずだったが (つまり、 I<uid> が呼び出し元の実 UID と一致していない)、 必要なカーネルのデータ構造体の割り当てで一時的な失敗があった。"
7919
7920 #. type: Plain text
7921 #: build/C/man2/setuid.2:105
7922 msgid "I<uid> does not match the real user ID of the caller and this call would bring the number of processes belonging to the real user ID I<uid> over the caller's B<RLIMIT_NPROC> resource limit.  Since Linux 3.1, this error case no longer occurs (but robust applications should check for this error); see the description of B<EAGAIN> in B<execve>(2)."
7923 msgstr "I<uid> は呼び出し元の実 UID と一致しておらず、 この呼び出しで実ユーザー ID I<ruid> に属するプロセス数が呼び出し元の B<RLIMIT_NPROC> リソース上限を超過するところであった。 Linux 3.1 以降では、このエラーはもはや発生することはない (しかし、堅牢性が求められるアプリケーションではこのエラーを確認すべきである)。 B<execve>(2) の B<EAGAIN> の説明を参照。"
7924
7925 #. type: Plain text
7926 #: build/C/man2/setuid.2:110
7927 msgid "The user ID specified in I<uid> is not valid in this user namespace."
7928 msgstr "I<uid> で指定されたユーザー ID がこのユーザー名前空間では有効ではない。"
7929
7930 #. type: Plain text
7931 #: build/C/man2/setuid.2:117
7932 msgid "The user is not privileged (Linux: does not have the B<CAP_SETUID> capability) and I<uid> does not match the real UID or saved set-user-ID of the calling process."
7933 msgstr "ユーザーが特権を持たず (Linux では B<CAP_SETUID> ケーパビリティ (capability) を持たず)、 I<uid> が呼び出し元プロセスの実 UID または保存 set-user-ID と一致しない。"
7934
7935 #.  SVr4 documents an additional EINVAL error condition.
7936 #. type: Plain text
7937 #: build/C/man2/setuid.2:122
7938 msgid "SVr4, POSIX.1-2001.  Not quite compatible with the 4.4BSD call, which sets all of the real, saved, and effective user IDs."
7939 msgstr "SVr4, POSIX.1-2001.  4.4BSD のコールとは完全な互換性はない、 BSD のコールは実 (real)、保存 (saved)、実効 (effective) ID の全てを設定する。"
7940
7941 #. type: Plain text
7942 #: build/C/man2/setuid.2:130
7943 msgid "Linux has the concept of the filesystem user ID, normally equal to the effective user ID.  The B<setuid>()  call also sets the filesystem user ID of the calling process.  See B<setfsuid>(2)."
7944 msgstr ""
7945 "Linux はファイルシステムユーザー ID の概念を持つ。\n"
7946 "通常、これは実効ユーザー ID に等しい。 \n"
7947 "B<setuid>()  コールは呼び出し元のプロセスの\n"
7948 "ファイルシステムユーザー ID も設定する。 \n"
7949 "B<setfsuid>(2) も参照すること。"
7950
7951 #. type: Plain text
7952 #: build/C/man2/setuid.2:135
7953 msgid "If I<uid> is different from the old effective UID, the process will be forbidden from leaving core dumps."
7954 msgstr ""
7955 "I<uid> が前の実効 UID と異っていた場合、\n"
7956 "プロセスはコアダンプすることを禁止される。"
7957
7958 #. type: Plain text
7959 #: build/C/man2/setuid.2:145
7960 msgid "The original Linux B<setuid>()  system call supported only 16-bit user IDs.  Subsequently, Linux 2.4 added B<setuid32>()  supporting 32-bit IDs.  The glibc B<setuid>()  wrapper function transparently deals with the variation across kernel versions."
7961 msgstr ""
7962 "元々の Linux の B<setuid>() システムコールは\n"
7963 "16 ビットのグループ ID だけに対応していた。\n"
7964 "その後、Linux 2.4 で、32 ビットの ID に対応した\n"
7965 "B<setuid32>() が追加された。\n"
7966 "glibc の B<setuid>() のラッパー関数は\n"
7967 "カーネルバージョンによるこの違いを吸収している。"
7968
7969 #. type: Plain text
7970 #: build/C/man2/setuid.2:153
7971 msgid "B<getuid>(2), B<seteuid>(2), B<setfsuid>(2), B<setreuid>(2), B<capabilities>(7), B<credentials>(7), B<user_namespaces>(7)"
7972 msgstr "B<getuid>(2), B<seteuid>(2), B<setfsuid>(2), B<setreuid>(2), B<capabilities>(7), B<credentials>(7), B<user_namespaces>(7)"
7973
7974 #. type: TH
7975 #: build/C/man7/svipc.7:40
7976 #, no-wrap
7977 msgid "SVIPC"
7978 msgstr "SVIPC"
7979
7980 #. type: Plain text
7981 #: build/C/man7/svipc.7:43
7982 msgid "svipc - System V interprocess communication mechanisms"
7983 msgstr "svipc - System V プロセス間通信機構"
7984
7985 #. type: Plain text
7986 #: build/C/man7/svipc.7:48
7987 #, no-wrap
7988 msgid ""
7989 "B<#include E<lt>sys/msg.hE<gt>>\n"
7990 "B<#include E<lt>sys/sem.hE<gt>>\n"
7991 "B<#include E<lt>sys/shm.hE<gt>>\n"
7992 msgstr ""
7993 "B<#include E<lt>sys/msg.hE<gt>>\n"
7994 "B<#include E<lt>sys/sem.hE<gt>>\n"
7995 "B<#include E<lt>sys/shm.hE<gt>>\n"
7996
7997 #. type: Plain text
7998 #: build/C/man7/svipc.7:56
7999 msgid "This manual page refers to the Linux implementation of the System V interprocess communication (IPC) mechanisms: message queues, semaphore sets, and shared memory segments.  In the following, the word I<resource> means an instantiation of one among such mechanisms."
8000 msgstr "このマニュアルページは System V プロセス間通信 (interprocess communication; IPC) 機構の Linux に おける実装を説明する。 このプロセス間通信機構には、 メッセージキュー (message queue)、セマフォー集合 (semaphore set)、 共有メモリセグメント (shared memory segment) などがある。以下で I<資源 (resource)> という用語を使用した場合にはこれらの機構のどれかを意味する。"
8001
8002 #. type: SS
8003 #: build/C/man7/svipc.7:56
8004 #, no-wrap
8005 msgid "Resource access permissions"
8006 msgstr "資源へのアクセス許可"
8007
8008 #. type: Plain text
8009 #: build/C/man7/svipc.7:64
8010 msgid "For each resource, the system uses a common structure of type I<struct ipc_perm> to store information needed in determining permissions to perform an IPC operation.  The I<ipc_perm> structure includes the following members:"
8011 msgstr "システムのそれぞれの資源は、IPC への操作を許可するかどうかを決定する ための情報を共通の構造体 I<struct ipc_perm> に格納して使用する。 I<ipc_perm> 構造体には以下のメンバーが定義されている:"
8012
8013 #. type: Plain text
8014 #: build/C/man7/svipc.7:74
8015 #, no-wrap
8016 msgid ""
8017 "struct ipc_perm {\n"
8018 "    uid_t          cuid;   /* creator user ID */\n"
8019 "    gid_t          cgid;   /* creator group ID */\n"
8020 "    uid_t          uid;    /* owner user ID */\n"
8021 "    gid_t          gid;    /* owner group ID */\n"
8022 "    unsigned short mode;   /* r/w permissions */\n"
8023 "};\n"
8024 msgstr ""
8025 "struct ipc_perm {\n"
8026 "    uid_t          cuid;   /* 作成者のユーザーID */\n"
8027 "    gid_t          cgid;   /* 作成者のグループID */\n"
8028 "    uid_t          uid;    /* 所有者のユーザーID */\n"
8029 "    gid_t          gid;    /* 所有者のグループID */\n"
8030 "    unsigned short mode;   /* 読み書きの許可 */\n"
8031 "};\n"
8032
8033 #. type: Plain text
8034 #: build/C/man7/svipc.7:84
8035 msgid "The I<mode> member of the I<ipc_perm> structure defines, with its lower 9 bits, the access permissions to the resource for a process executing an IPC system call.  The permissions are interpreted as follows:"
8036 msgstr "I<ipc_perm> 構造体の I<mode> メンバーは以下の 9 ビットで、プロセスの IPC システムコール による資源へのアクセス許可を定義する。 許可は以下のように解釈される:"
8037
8038 #. type: Plain text
8039 #: build/C/man7/svipc.7:88
8040 #, no-wrap
8041 msgid ""
8042 "    0400    Read by user.\n"
8043 "    0200    Write by user.\n"
8044 msgstr ""
8045 "    0400    ユーザーによる読み込み。\n"
8046 "    0200    ユーザーによる書き込み。\n"
8047
8048 #. type: Plain text
8049 #: build/C/man7/svipc.7:91
8050 #, no-wrap
8051 msgid ""
8052 "    0040    Read by group.\n"
8053 "    0020    Write by group.\n"
8054 msgstr ""
8055 "    0040    グループによる読み込み。\n"
8056 "    0020    グループによる書き込み。\n"
8057
8058 #. type: Plain text
8059 #: build/C/man7/svipc.7:94
8060 #, no-wrap
8061 msgid ""
8062 "    0004    Read by others.\n"
8063 "    0002    Write by others.\n"
8064 msgstr ""
8065 "    0004    他人による読み込み。\n"
8066 "    0002    他人による書き込み。\n"
8067
8068 #. type: Plain text
8069 #: build/C/man7/svipc.7:102
8070 msgid "Bits 0100, 0010, and 0001 (the execute bits) are unused by the system.  Furthermore, \"write\" effectively means \"alter\" for a semaphore set."
8071 msgstr "システムはビット 0100, 0010, 0001 (実行ビット) は使用しない。 さらに、セマフォーの場合には \"書き込み(write)\" は実際には \"変更(alter)\" を意味する。"
8072
8073 #. type: Plain text
8074 #: build/C/man7/svipc.7:105
8075 msgid "The same system header file also defines the following symbolic constants:"
8076 msgstr "同じヘッダーファイルには以下のシンボルの定義が含まれている:"
8077
8078 #. type: TP
8079 #: build/C/man7/svipc.7:105
8080 #, no-wrap
8081 msgid "B<IPC_CREAT>"
8082 msgstr "B<IPC_CREAT>"
8083
8084 #. type: Plain text
8085 #: build/C/man7/svipc.7:108
8086 msgid "Create entry if key doesn't exist."
8087 msgstr "キー(key)が存在しない場合には新たなエントリを作成する。"
8088
8089 #. type: TP
8090 #: build/C/man7/svipc.7:108
8091 #, no-wrap
8092 msgid "B<IPC_EXCL>"
8093 msgstr "B<IPC_EXCL>"
8094
8095 #. type: Plain text
8096 #: build/C/man7/svipc.7:111
8097 msgid "Fail if key exists."
8098 msgstr "キー(key)が存在する場合には失敗する。"
8099
8100 #. type: TP
8101 #: build/C/man7/svipc.7:111
8102 #, no-wrap
8103 msgid "B<IPC_NOWAIT>"
8104 msgstr "B<IPC_NOWAIT>"
8105
8106 #. type: Plain text
8107 #: build/C/man7/svipc.7:114
8108 msgid "Error if request must wait."
8109 msgstr "要求が待たされる場合にはエラーになる。"
8110
8111 #. type: TP
8112 #: build/C/man7/svipc.7:114
8113 #, no-wrap
8114 msgid "B<IPC_PRIVATE>"
8115 msgstr "B<IPC_PRIVATE>"
8116
8117 #. type: Plain text
8118 #: build/C/man7/svipc.7:117
8119 msgid "Private key."
8120 msgstr "プライベートキー。"
8121
8122 #. type: TP
8123 #: build/C/man7/svipc.7:117
8124 #, no-wrap
8125 msgid "B<IPC_RMID>"
8126 msgstr "B<IPC_RMID>"
8127
8128 #. type: Plain text
8129 #: build/C/man7/svipc.7:120
8130 msgid "Remove resource."
8131 msgstr "資源を削除する。"
8132
8133 #. type: TP
8134 #: build/C/man7/svipc.7:120
8135 #, no-wrap
8136 msgid "B<IPC_SET>"
8137 msgstr "B<IPC_SET>"
8138
8139 #. type: Plain text
8140 #: build/C/man7/svipc.7:123
8141 msgid "Set resource options."
8142 msgstr "資源にオプションを設定する。"
8143
8144 #. type: TP
8145 #: build/C/man7/svipc.7:123
8146 #, no-wrap
8147 msgid "B<IPC_STAT>"
8148 msgstr "B<IPC_STAT>"
8149
8150 #. type: Plain text
8151 #: build/C/man7/svipc.7:126
8152 msgid "Get resource options."
8153 msgstr "資源のオプションを取得する。"
8154
8155 #. type: Plain text
8156 #: build/C/man7/svipc.7:135
8157 msgid "Note that B<IPC_PRIVATE> is a I<key_t> type, while all the other symbolic constants are flag fields and can be OR'ed into an I<int> type variable."
8158 msgstr "B<IPC_PRIVATE> は I<key_t> 型である。その他の全てのシンボルはフラグフィールドとして I<int> 変数に OR 演算で格納することができる。"
8159
8160 #. type: SS
8161 #: build/C/man7/svipc.7:135
8162 #, no-wrap
8163 msgid "Message queues"
8164 msgstr "メッセージキュー"
8165
8166 #. type: Plain text
8167 #: build/C/man7/svipc.7:143
8168 msgid "A message queue is uniquely identified by a positive integer (its I<msqid>)  and has an associated data structure of type I<struct msqid_ds>, defined in I<E<lt>sys/msg.hE<gt>>, containing the following members:"
8169 msgstr "メッセージキューは正の整数 (I<msqid>)  によって識別され、 I<E<lt>sys/msg.hE<gt>> に定義されている構造体 I<struct msqid_ds> に結びつけられている。 この構造体は以下のメンバーを含んでいる:"
8170
8171 #. type: Plain text
8172 #: build/C/man7/svipc.7:156
8173 #, no-wrap
8174 msgid ""
8175 "struct msqid_ds {\n"
8176 "    struct ipc_perm msg_perm;\n"
8177 "    msgqnum_t       msg_qnum;    /* no of messages on queue */\n"
8178 "    msglen_t        msg_qbytes;  /* bytes max on a queue */\n"
8179 "    pid_t           msg_lspid;   /* PID of last msgsnd(2) call */\n"
8180 "    pid_t           msg_lrpid;   /* PID of last msgrcv(2) call */\n"
8181 "    time_t          msg_stime;   /* last msgsnd(2) time */\n"
8182 "    time_t          msg_rtime;   /* last msgrcv(2) time */\n"
8183 "    time_t          msg_ctime;   /* last change time */\n"
8184 "};\n"
8185 msgstr ""
8186 "struct msqid_ds {\n"
8187 "    struct ipc_perm msg_perm;\n"
8188 "    msgqnum_t       msg_qnum;    /* キューにあるメッセージの数 */\n"
8189 "    msglen_t        msg_qbytes;  /* キューの最大バイト数 */\n"
8190 "    pid_t           msg_lspid;   /* 最後に msgsnd(2) をした PID */\n"
8191 "    pid_t           msg_lrpid;   /* 最後に msgrcv(2) をした PID */\n"
8192 "    time_t          msg_stime;   /* 最後に msgsnd(2) をした時間 */\n"
8193 "    time_t          msg_rtime;   /* 最後に msgrcv(2) をした時間 */\n"
8194 "    time_t          msg_ctime;   /* 最後に変更された時間 */\n"
8195 "};\n"
8196
8197 #. type: TP
8198 #: build/C/man7/svipc.7:158
8199 #, no-wrap
8200 msgid "I<msg_perm>"
8201 msgstr "I<msg_perm>"
8202
8203 #. type: Plain text
8204 #: build/C/man7/svipc.7:163
8205 msgid "I<ipc_perm> structure that specifies the access permissions on the message queue."
8206 msgstr "メッセージキューへのアクセス許可を指定する I<ipc_perm> 構造体。"
8207
8208 #. type: TP
8209 #: build/C/man7/svipc.7:163
8210 #, no-wrap
8211 msgid "I<msg_qnum>"
8212 msgstr "I<msg_qnum>"
8213
8214 #. type: Plain text
8215 #: build/C/man7/svipc.7:166
8216 msgid "Number of messages currently on the message queue."
8217 msgstr "現在、このメッセージキューにあるメッセージの数。"
8218
8219 #. type: TP
8220 #: build/C/man7/svipc.7:166
8221 #, no-wrap
8222 msgid "I<msg_qbytes>"
8223 msgstr "I<msg_qbytes>"
8224
8225 #. type: Plain text
8226 #: build/C/man7/svipc.7:170
8227 msgid "Maximum number of bytes of message text allowed on the message queue."
8228 msgstr "メッセージキューに入れることができるメッセージの最大バイト数。"
8229
8230 #. type: TP
8231 #: build/C/man7/svipc.7:170
8232 #, no-wrap
8233 msgid "I<msg_lspid>"
8234 msgstr "I<msg_lspid>"
8235
8236 #. type: Plain text
8237 #: build/C/man7/svipc.7:175
8238 msgid "ID of the process that performed the last B<msgsnd>(2)  system call."
8239 msgstr "最後に B<msgsnd>(2)  システムコールを行なったプロセスの ID。"
8240
8241 #. type: TP
8242 #: build/C/man7/svipc.7:175
8243 #, no-wrap
8244 msgid "I<msg_lrpid>"
8245 msgstr "I<msg_lrpid>"
8246
8247 #. type: Plain text
8248 #: build/C/man7/svipc.7:180
8249 msgid "ID of the process that performed the last B<msgrcv>(2)  system call."
8250 msgstr "最後に B<msgrcv>(2)  システムコールを行なったプロセスの ID。"
8251
8252 #. type: TP
8253 #: build/C/man7/svipc.7:180
8254 #, no-wrap
8255 msgid "I<msg_stime>"
8256 msgstr "I<msg_stime>"
8257
8258 #. type: Plain text
8259 #: build/C/man7/svipc.7:185
8260 msgid "Time of the last B<msgsnd>(2)  system call."
8261 msgstr "最後に B<msgsnd>(2)  システムコールを行なった時間。"
8262
8263 #. type: TP
8264 #: build/C/man7/svipc.7:185
8265 #, no-wrap
8266 msgid "I<msg_rtime>"
8267 msgstr "I<msg_rtime>"
8268
8269 #. type: Plain text
8270 #: build/C/man7/svipc.7:190
8271 msgid "Time of the last B<msgrcv>(2)  system call."
8272 msgstr "最後に B<msgrcv>(2)  を行なった時間。"
8273
8274 #. type: TP
8275 #: build/C/man7/svipc.7:190
8276 #, no-wrap
8277 msgid "I<msg_ctime>"
8278 msgstr "I<msg_ctime>"
8279
8280 #. type: Plain text
8281 #: build/C/man7/svipc.7:196
8282 msgid "Time of the last system call that changed a member of the I<msqid_ds> structure."
8283 msgstr "最後に I<msqid_ds> 構造体のメンバーが変更された時間。"
8284
8285 #. type: SS
8286 #: build/C/man7/svipc.7:196
8287 #, no-wrap
8288 msgid "Semaphore sets"
8289 msgstr "セマフォー集合"
8290
8291 #. type: Plain text
8292 #: build/C/man7/svipc.7:204
8293 msgid "A semaphore set is uniquely identified by a positive integer (its I<semid>)  and has an associated data structure of type I<struct semid_ds>, defined in I<E<lt>sys/sem.hE<gt>>, containing the following members:"
8294 msgstr "セマフォー集合は正の整数 (I<semid>)  によって識別され、 I<E<lt>sys/sem.hE<gt>> に定義されている構造体 I<struct semid_ds> に結びつけられている。 この構造体は以下のメンバーを含んでいる:"
8295
8296 #. type: Plain text
8297 #: build/C/man7/svipc.7:213
8298 #, no-wrap
8299 msgid ""
8300 "struct semid_ds {\n"
8301 "    struct ipc_perm sem_perm;\n"
8302 "    time_t          sem_otime;   /* last operation time */\n"
8303 "    time_t          sem_ctime;   /* last change time */\n"
8304 "    unsigned long   sem_nsems;   /* count of sems in set */\n"
8305 "};\n"
8306 msgstr ""
8307 "struct semid_ds {\n"
8308 "    struct ipc_perm sem_perm;\n"
8309 "    time_t          sem_otime;   /* 最後に操作した時間 */\n"
8310 "    time_t          sem_ctime;   /* 最後に変更した時間 */\n"
8311 "    unsigned long   sem_nsems;   /* 集合の中にあるセマフォー数 */\n"
8312 "};\n"
8313
8314 #. type: TP
8315 #: build/C/man7/svipc.7:215
8316 #, no-wrap
8317 msgid "I<sem_perm>"
8318 msgstr "I<sem_perm>"
8319
8320 #. type: Plain text
8321 #: build/C/man7/svipc.7:220
8322 msgid "I<ipc_perm> structure that specifies the access permissions on the semaphore set."
8323 msgstr "セマフォー集合へのアクセス許可を指定する I<ipc_perm> 構造体。"
8324
8325 #. type: TP
8326 #: build/C/man7/svipc.7:220
8327 #, no-wrap
8328 msgid "I<sem_otime>"
8329 msgstr "I<sem_otime>"
8330
8331 #. type: Plain text
8332 #: build/C/man7/svipc.7:225
8333 msgid "Time of last B<semop>(2)  system call."
8334 msgstr "最後に B<semop>(2)  システムコールを行なった時間。"
8335
8336 #. type: TP
8337 #: build/C/man7/svipc.7:225
8338 #, no-wrap
8339 msgid "I<sem_ctime>"
8340 msgstr "I<sem_ctime>"
8341
8342 #. type: Plain text
8343 #: build/C/man7/svipc.7:231
8344 msgid "Time of last B<semctl>(2)  system call that changed a member of the above structure or of one semaphore belonging to the set."
8345 msgstr "最後に B<semctl>(2)  を行なって上記の構造体のメンバーを変更するか、セマフォー集合に属する セマフォーを変更した時間。"
8346
8347 #. type: TP
8348 #: build/C/man7/svipc.7:231
8349 #, no-wrap
8350 msgid "I<sem_nsems>"
8351 msgstr "I<sem_nsems>"
8352
8353 #. type: Plain text
8354 #: build/C/man7/svipc.7:239
8355 msgid "Number of semaphores in the set.  Each semaphore of the set is referenced by a nonnegative integer ranging from B<0> to I<sem_nsems-1>."
8356 msgstr "セマフォー集合の中にあるセマフォーの数。 集合の中にあるそれぞれのセマフォーは負でない整数によって参照され、 B<0> から I<sem_nsems-1> までの番号を持つ。"
8357
8358 #. type: Plain text
8359 #: build/C/man7/svipc.7:243
8360 msgid "A semaphore is a data structure of type I<struct sem> containing the following members:"
8361 msgstr "セマフォーは I<struct sem> 型のデータ構造体であり、以下のメンバーを含んでいる:"
8362
8363 #.     unsigned short semncnt; /* nr awaiting semval to increase */
8364 #.     unsigned short semzcnt; /* nr awaiting semval = 0 */
8365 #. type: Plain text
8366 #: build/C/man7/svipc.7:252
8367 #, no-wrap
8368 msgid ""
8369 "struct sem {\n"
8370 "    int semval;  /* semaphore value */\n"
8371 "    int sempid;  /* PID for last operation */\n"
8372 "};\n"
8373 msgstr ""
8374 "struct sem {\n"
8375 "    int semval;  /* セマフォーの値 */\n"
8376 "    int sempid;  /* 最後に操作したプロセス ID */\n"
8377 "};\n"
8378
8379 #. type: TP
8380 #: build/C/man7/svipc.7:254
8381 #, no-wrap
8382 msgid "I<semval>"
8383 msgstr "I<semval>"
8384
8385 #. type: Plain text
8386 #: build/C/man7/svipc.7:257
8387 msgid "Semaphore value: a nonnegative integer."
8388 msgstr "セマフォー値: 負でない整数。"
8389
8390 #. type: TP
8391 #: build/C/man7/svipc.7:257
8392 #, no-wrap
8393 msgid "I<sempid>"
8394 msgstr "I<sempid>"
8395
8396 #. .TP
8397 #. .I semncnt
8398 #. Number of processes suspended awaiting for
8399 #. .I semval
8400 #. to increase.
8401 #. .TP
8402 #. .I semznt
8403 #. Number of processes suspended awaiting for
8404 #. .I semval
8405 #. to become zero.
8406 #. type: Plain text
8407 #: build/C/man7/svipc.7:271
8408 msgid "ID of the last process that performed a semaphore operation on this semaphore."
8409 msgstr "このセマフォーを最後に操作したプロセスの ID。"
8410
8411 #. type: SS
8412 #: build/C/man7/svipc.7:271
8413 #, no-wrap
8414 msgid "Shared memory segments"
8415 msgstr "共有メモリセグメント"
8416
8417 #. type: Plain text
8418 #: build/C/man7/svipc.7:279
8419 msgid "A shared memory segment is uniquely identified by a positive integer (its I<shmid>)  and has an associated data structure of type I<struct shmid_ds>, defined in I<E<lt>sys/shm.hE<gt>>, containing the following members:"
8420 msgstr "共有メモリセグメントは正の整数 (I<shmid>)  によって識別され、 I<E<lt>sys/shm.hE<gt>> に定義されている I<struct shmid_ds> 構造体に結びつけられている。 この構造体は以下のメンバーを含んでいる:"
8421
8422 #. type: Plain text
8423 #: build/C/man7/svipc.7:292
8424 #, no-wrap
8425 msgid ""
8426 "struct shmid_ds {\n"
8427 "    struct ipc_perm shm_perm;\n"
8428 "    size_t          shm_segsz;   /* size of segment */\n"
8429 "    pid_t           shm_cpid;    /* PID of creator */\n"
8430 "    pid_t           shm_lpid;    /* PID, last operation */\n"
8431 "    shmatt_t        shm_nattch;  /* no. of current attaches */\n"
8432 "    time_t          shm_atime;   /* time of last attach */\n"
8433 "    time_t          shm_dtime;   /* time of last detach */\n"
8434 "    time_t          shm_ctime;   /* time of last change */\n"
8435 "};\n"
8436 msgstr ""
8437 "struct shmid_ds {\n"
8438 "    struct ipc_perm shm_perm;\n"
8439 "    size_t          shm_segsz;   /* セグメントのサイズ */\n"
8440 "    pid_t           shm_cpid;    /* 作成者のプロセス ID */\n"
8441 "    pid_t           shm_lpid;    /* 最後に操作したプロセス ID */\n"
8442 "    shmatt_t        shm_nattch;  /* 現在、付加している数 */\n"
8443 "    time_t          shm_atime;   /* 最後に付加した時間 */\n"
8444 "    time_t          shm_dtime;   /* 最後に分離した時間 */\n"
8445 "    time_t          shm_ctime;   /* 最後に変更した時間 */\n"
8446 "};\n"
8447
8448 #. type: TP
8449 #: build/C/man7/svipc.7:294
8450 #, no-wrap
8451 msgid "I<shm_perm>"
8452 msgstr "I<shm_perm>"
8453
8454 #. type: Plain text
8455 #: build/C/man7/svipc.7:299
8456 msgid "I<ipc_perm> structure that specifies the access permissions on the shared memory segment."
8457 msgstr "共有メモリセグメントへのアクセス許可を指定した I<ipc_perm> 構造体。"
8458
8459 #. type: TP
8460 #: build/C/man7/svipc.7:299
8461 #, no-wrap
8462 msgid "I<shm_segsz>"
8463 msgstr "I<shm_segsz>"
8464
8465 #. type: Plain text
8466 #: build/C/man7/svipc.7:302
8467 msgid "Size in bytes of the shared memory segment."
8468 msgstr "共有メモリセグメントのバイト数。"
8469
8470 #. type: TP
8471 #: build/C/man7/svipc.7:302
8472 #, no-wrap
8473 msgid "I<shm_cpid>"
8474 msgstr "I<shm_cpid>"
8475
8476 #. type: Plain text
8477 #: build/C/man7/svipc.7:305
8478 msgid "ID of the process that created the shared memory segment."
8479 msgstr "共有メモリセグメントを作成したプロセスの ID。"
8480
8481 #. type: TP
8482 #: build/C/man7/svipc.7:305
8483 #, no-wrap
8484 msgid "I<shm_lpid>"
8485 msgstr "I<shm_lpid>"
8486
8487 #. type: Plain text
8488 #: build/C/man7/svipc.7:312
8489 msgid "ID of the last process that executed a B<shmat>(2)  or B<shmdt>(2)  system call."
8490 msgstr "最後に B<shmat>(2)  または B<shmdt>(2)  システムコールを実行したプロセスの ID。"
8491
8492 #. type: TP
8493 #: build/C/man7/svipc.7:312
8494 #, no-wrap
8495 msgid "I<shm_nattch>"
8496 msgstr "I<shm_nattch>"
8497
8498 #. type: Plain text
8499 #: build/C/man7/svipc.7:315
8500 msgid "Number of current alive attaches for this shared memory segment."
8501 msgstr "この共有メモリセグメントをメモリに付加 (attach) しているプロセスの数。"
8502
8503 #. type: TP
8504 #: build/C/man7/svipc.7:315
8505 #, no-wrap
8506 msgid "I<shm_atime>"
8507 msgstr "I<shm_atime>"
8508
8509 #. type: Plain text
8510 #: build/C/man7/svipc.7:320
8511 msgid "Time of the last B<shmat>(2)  system call."
8512 msgstr "最後に B<shmat>(2)  システムコールを行なった時間。"
8513
8514 #. type: TP
8515 #: build/C/man7/svipc.7:320
8516 #, no-wrap
8517 msgid "I<shm_dtime>"
8518 msgstr "I<shm_dtime>"
8519
8520 #. type: Plain text
8521 #: build/C/man7/svipc.7:325
8522 msgid "Time of the last B<shmdt>(2)  system call."
8523 msgstr "最後に B<shmdt>(2)  システムコールを行なった時間。"
8524
8525 #. type: TP
8526 #: build/C/man7/svipc.7:325
8527 #, no-wrap
8528 msgid "I<shm_ctime>"
8529 msgstr "I<shm_ctime>"
8530
8531 #. type: Plain text
8532 #: build/C/man7/svipc.7:331
8533 msgid "Time of the last B<shmctl>(2)  system call that changed I<shmid_ds>."
8534 msgstr "最後に B<shmctl>(2)  システムコールを行なって、 I<shmid_ds> 構造体を変更した時間。"
8535
8536 #. type: SS
8537 #: build/C/man7/svipc.7:331
8538 #, no-wrap
8539 msgid "IPC namespaces"
8540 msgstr "IPC 名前空間"
8541
8542 #. type: Plain text
8543 #: build/C/man7/svipc.7:335
8544 msgid "For a discussion of the interaction of System V IPC objects and IPC namespaces, see B<namespaces>(7)."
8545 msgstr "System V IPC オブジェクトと IPC 名前空間の相互の影響に関する議論は B<namespaces>(7) を参照。"
8546
8547 #. type: Plain text
8548 #: build/C/man7/svipc.7:353
8549 msgid "B<ipcmk>(1), B<ipcrm>(1), B<ipcs>(1), B<ipc>(2), B<msgctl>(2), B<msgget>(2), B<msgrcv>(2), B<msgsnd>(2), B<semctl>(2), B<semget>(2), B<semop>(2), B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<shmget>(2), B<ftok>(3), B<namespaces>(7)"
8550 msgstr "B<ipcmk>(1), B<ipcrm>(1), B<ipcs>(1), B<ipc>(2), B<msgctl>(2), B<msgget>(2), B<msgrcv>(2), B<msgsnd>(2), B<semctl>(2), B<semget>(2), B<semop>(2), B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<shmget>(2), B<ftok>(3), B<namespaces>(7)"
8551
8552 #. type: TH
8553 #: build/C/man3/ulimit.3:27
8554 #, no-wrap
8555 msgid "ULIMIT"
8556 msgstr "ULIMIT"
8557
8558 #. type: TH
8559 #: build/C/man3/ulimit.3:27
8560 #, no-wrap
8561 msgid "2008-08-06"
8562 msgstr "2008-08-06"
8563
8564 #. type: Plain text
8565 #: build/C/man3/ulimit.3:30
8566 msgid "ulimit - get and set user limits"
8567 msgstr "ulimit - ユーザー制限を取得・設定する"
8568
8569 #. type: Plain text
8570 #: build/C/man3/ulimit.3:32
8571 msgid "B<#include E<lt>ulimit.hE<gt>>"
8572 msgstr "B<#include E<lt>ulimit.hE<gt>>"
8573
8574 #. type: Plain text
8575 #: build/C/man3/ulimit.3:34
8576 msgid "B<long ulimit(int >I<cmd>B<, long >I<newlimit>B<);>"
8577 msgstr "B<long ulimit(int >I<cmd>B<, long >I<newlimit>B<);>"
8578
8579 #. type: Plain text
8580 #: build/C/man3/ulimit.3:46
8581 msgid "Warning: This routine is obsolete.  Use B<getrlimit>(2), B<setrlimit>(2), and B<sysconf>(3)  instead.  For the shell command B<ulimit>(), see B<bash>(1)."
8582 msgstr "注意: このルーチンは古い。 代わりに B<getrlimit>(2), B<setrlimit>(2), B<sysconf>(3)  などを用いること。 シェルコマンドとしての B<ulimit>()  については、 B<bash>(1)  を見ること。"
8583
8584 #. type: Plain text
8585 #: build/C/man3/ulimit.3:53
8586 msgid "The B<ulimit>()  call will get or set some limit for the calling process.  The I<cmd> argument can have one of the following values."
8587 msgstr "B<ulimit>()  は呼び出し元のプロセスに関する制限のいくつかを取得・設定する。 I<cmd> 引き数には、以下の値のうちのどれか一つを与えることができる。"
8588
8589 #. type: TP
8590 #: build/C/man3/ulimit.3:53
8591 #, no-wrap
8592 msgid "B<UL_GETFSIZE>"
8593 msgstr "B<UL_GETFSIZE>"
8594
8595 #. type: Plain text
8596 #: build/C/man3/ulimit.3:56
8597 msgid "Return the limit on the size of a file, in units of 512 bytes."
8598 msgstr "ファイルサイズに関する制限を返す。単位は 512 バイト。"
8599
8600 #. type: TP
8601 #: build/C/man3/ulimit.3:56
8602 #, no-wrap
8603 msgid "B<UL_SETFSIZE>"
8604 msgstr "B<UL_SETFSIZE>"
8605
8606 #. type: Plain text
8607 #: build/C/man3/ulimit.3:59
8608 msgid "Set the limit on the size of a file."
8609 msgstr "ファイルサイズに関する制限を設定する。"
8610
8611 #. type: TP
8612 #: build/C/man3/ulimit.3:59
8613 #, no-wrap
8614 msgid "B<3>"
8615 msgstr "B<3>"
8616
8617 #. type: Plain text
8618 #: build/C/man3/ulimit.3:63
8619 msgid "(Not implemented for Linux.)  Return the maximum possible address of the data segment."
8620 msgstr "(Linux では実装されていない)  データセグメントで指定できるアドレスの最大値を返す。"
8621
8622 #. type: TP
8623 #: build/C/man3/ulimit.3:63
8624 #, no-wrap
8625 msgid "B<4>"
8626 msgstr "B<4>"
8627
8628 #. type: Plain text
8629 #: build/C/man3/ulimit.3:67
8630 msgid "(Implemented but no symbolic constant provided.)  Return the maximum number of files that the calling process can open."
8631 msgstr "(実装されているが、対応するシンボリックな定数は存在しない)  プロセスがオープンできるファイル数の最大値を返す。"
8632
8633 #. type: Plain text
8634 #: build/C/man3/ulimit.3:74
8635 msgid "On success, B<ulimit>()  returns a nonnegative value.  On error, -1 is returned, and I<errno> is set appropriately."
8636 msgstr "成功すると B<ulimit>()  は 0 または正の値を返す。 エラーが生じると -1 を返し、 I<errno> を適切な値に設定する。"
8637
8638 #. type: Plain text
8639 #: build/C/man3/ulimit.3:78
8640 msgid "A unprivileged process tried to increase a limit."
8641 msgstr "非特権プロセスが制限値を増加させようとした。"
8642
8643 #. type: Plain text
8644 #: build/C/man3/ulimit.3:83
8645 msgid "SVr4, POSIX.1-2001.  POSIX.1-2008 marks B<ulimit>()  as obsolete."
8646 msgstr "SVr4, POSIX.1-2001.  POSIX.1-2008 は B<ulimit>()  を廃止予定としている。"
8647
8648 #. type: Plain text
8649 #: build/C/man3/ulimit.3:88
8650 msgid "B<bash>(1), B<getrlimit>(2), B<setrlimit>(2), B<sysconf>(3)"
8651 msgstr "B<bash>(1), B<getrlimit>(2), B<setrlimit>(2), B<sysconf>(3)"
8652
8653 #. type: TH
8654 #: build/C/man7/user_namespaces.7:27
8655 #, no-wrap
8656 msgid "USER_NAMESPACES"
8657 msgstr "USER_NAMESPACES"
8658
8659 #. type: Plain text
8660 #: build/C/man7/user_namespaces.7:30
8661 msgid "user_namespaces - overview of Linux user namespaces"
8662 msgstr "user_namespaces - Linux ユーザー名前空間の概要"
8663
8664 #
8665 #.  FIXME: This page says very little about the interaction
8666 #.  of user namespaces and keys. Add something on this topic.
8667 #.  ============================================================
8668 #. type: Plain text
8669 #: build/C/man7/user_namespaces.7:56
8670 msgid "User namespaces isolate security-related identifiers and attributes, in particular, user IDs and group IDs (see B<credentials>(7)), the root directory, keys (see B<keyctl>(2)), and capabilities (see B<capabilities>(7)).  A process's user and group IDs can be different inside and outside a user namespace.  In particular, a process can have a normal unprivileged user ID outside a user namespace while at the same time having a user ID of 0 inside the namespace; in other words, the process has full privileges for operations inside the user namespace, but is unprivileged for operations outside the namespace."
8671 msgstr "ユーザー名前空間は、 セキュリティに関連する識別子や属性、 特にユーザー ID やグループ ID (B<credentials>(7) 参照)、 root ディレクトリ、 キー (B<keyctl>(2) 参照)、 ケーパビリティを分離する。 プロセスのユーザー ID とグループ ID はユーザー名前空間の内部と外部で異なる場合がある。 特に、 あるプロセスがユーザー名前空間の外部では通常の非特権ユーザー ID を持つが、 同時にユーザー名前空間の内部ではユーザー ID 0 を持つという場合がある。 言い換えると、 そのプロセスはそのユーザー名前空間の内部での操作に対してすべての特権を持つが、 名前空間の外部での操作では特権を持たない。"
8672
8673 #. type: SS
8674 #: build/C/man7/user_namespaces.7:56
8675 #, no-wrap
8676 msgid "Nested namespaces, namespace membership"
8677 msgstr "ネストされた名前空間、名前空間のメンバー"
8678
8679 #. type: Plain text
8680 #: build/C/man7/user_namespaces.7:69
8681 msgid "User namespaces can be nested; that is, each user namespace\\(emexcept the initial (\"root\")  namespace\\(emhas a parent user namespace, and can have zero or more child user namespaces.  The parent user namespace is the user namespace of the process that creates the user namespace via a call to B<unshare>(2)  or B<clone>(2)  with the B<CLONE_NEWUSER> flag."
8682 msgstr "ユーザー名前空間は入れ子にすることができる。 つまり、 最初の (\"root\") 名前空間以外の各名前空間は親のユーザー名前空間を持ち、 0 個以上のユーザー名前空間を持つということである。 親のユーザー名前空間は、 B<CLONE_NEWUSER> フラグを指定して B<unshare>(2) や B<clone>(2) を呼び出してユーザー名前空間を作成したプロセスのユーザー名前空間である。"
8683
8684 #.  commit 8742f229b635bf1c1c84a3dfe5e47c814c20b5c8
8685 #.  FIXME Explain the rationale for this limit. (What is the rationale?)
8686 #. type: Plain text
8687 #: build/C/man7/user_namespaces.7:80
8688 msgid "The kernel imposes (since version 3.11) a limit of 32 nested levels of user namespaces.  Calls to B<unshare>(2)  or B<clone>(2)  that would cause this limit to be exceeded fail with the error B<EUSERS>."
8689 msgstr "カーネルにより (バージョン 3.11 以降では) ユーザー名前空間のネスト数に 32 という上限が課される。 B<unshare>(2) や B<clone>(2) の呼び出しでこの上限を超えてしまう場合はエラー B<EUSERS> で失敗する。"
8690
8691 #. type: Plain text
8692 #: build/C/man7/user_namespaces.7:95
8693 msgid "Each process is a member of exactly one user namespace.  A process created via B<fork>(2)  or B<clone>(2)  without the B<CLONE_NEWUSER> flag is a member of the same user namespace as its parent.  A single-threaded process can join another user namespace with B<setns>(2)  if it has the B<CAP_SYS_ADMIN> in that namespace; upon doing so, it gains a full set of capabilities in that namespace."
8694 msgstr "各プロセスは必ず 1 個のユーザー名前空間のメンバーとなる。 B<CLONE_NEWUSER> フラグを指定せずに B<fork>(2) や B<clone>(2) でプロセスを作成した場合、 そのプロセスは親プロセスと同じユーザー名前空間のメンバーとなる。 シングルスレッドのプログラムは、 変更先のユーザー名前空間で B<CAP_SYS_ADMIN> を持っていれば、 B<setns>(2) を使って別のユーザー名前空間に参加することができる。 変更時に、 変更後の名前空間ですべてのケーパビリティを獲得する。"
8695
8696 #
8697 #.  ============================================================
8698 #. type: Plain text
8699 #: build/C/man7/user_namespaces.7:110
8700 msgid "A call to B<clone>(2)  or B<unshare>(2)  with the B<CLONE_NEWUSER> flag makes the new child process (for B<clone>(2))  or the caller (for B<unshare>(2))  a member of the new user namespace created by the call."
8701 msgstr "B<CLONE_NEWUSER> を指定して B<clone>(2) や B<unshare>(2) を呼び出すと、 新しいプロセス (B<clone>(2) の場合) や呼び出したプロセス (B<unshare>(2) の場合) がその呼び出しで作成された新しいユーザー名前空間のメンバーとなる。"
8702
8703 #. type: SS
8704 #: build/C/man7/user_namespaces.7:110
8705 #, no-wrap
8706 msgid "Capabilities"
8707 msgstr "ケーパビリティ"
8708
8709 #. type: Plain text
8710 #: build/C/man7/user_namespaces.7:132
8711 msgid "The child process created by B<clone>(2)  with the B<CLONE_NEWUSER> flag starts out with a complete set of capabilities in the new user namespace.  Likewise, a process that creates a new user namespace using B<unshare>(2)  or joins an existing user namespace using B<setns>(2)  gains a full set of capabilities in that namespace.  On the other hand, that process has no capabilities in the parent (in the case of B<clone>(2))  or previous (in the case of B<unshare>(2)  and B<setns>(2))  user namespace, even if the new namespace is created or joined by the root user (i.e., a process with user ID 0 in the root namespace)."
8712 msgstr "B<CLONE_NEWUSER> フラグが指定された B<clone>(2) で作成された子プロセスは、 新しい名前空間ですべてのケーパビリティを持った状態で開始される。 同様に、 B<unshare>(2) を使って新しいユーザー名前空間を作成したり、 B<setns>(2) を使って既存のユーザー名前空間に参加したりしたプロセスは、 その名前空間ですべてのケーパビリティを獲得する。 一方、 そのプロセスは、親のユーザー名前空間 (B<clone>(2) の場合) や直前のユーザー名前空間 (B<unshare>(2) や B<setns>(2) の場合) では、 root ユーザー (root 名前空間のユーザー ID 0 のプロセス) により新しい名前空間の作成や参加が行われた場合であっても、 ケーパビリティを全く持たない。"
8713
8714 #. type: Plain text
8715 #: build/C/man7/user_namespaces.7:142
8716 msgid "Note that a call to B<execve>(2)  will cause a process's capabilities to be recalculated in the usual way (see B<capabilities>(7)), so that usually, unless it has a user ID of 0 within the namespace or the executable file has a nonempty inheritable capabilities mask, it will lose all capabilities.  See the discussion of user and group ID mappings, below."
8717 msgstr "B<execve>(2) の呼び出しでは、 プロセスのケーパビリティは通常の方法 (B<capabilities>(7) 参照) で再計算され、 通常は、 名前空間内でユーザー ID 0 を持つ場合や実行ファイルが空でない継承可能ケーパビリティマスクを持っている場合を除くと、 すべてのケーパビリティを失うことになる。 下記の、ユーザー ID やグループ ID のマッピングの議論を参照。"
8718
8719 #. type: Plain text
8720 #: build/C/man7/user_namespaces.7:167
8721 msgid "A call to B<clone>(2), B<unshare>(2), or B<setns>(2)  using the B<CLONE_NEWUSER> flag sets the \"securebits\" flags (see B<capabilities>(7))  to their default values (all flags disabled) in the child (for B<clone>(2))  or caller (for B<unshare>(2), or B<setns>(2)).  Note that because the caller no longer has capabilities in its original user namespace after a call to B<setns>(2), it is not possible for a process to reset its \"securebits\" flags while retaining its user namespace membership by using a pair of B<setns>(2)  calls to move to another user namespace and then return to its original user namespace."
8722 msgstr "B<CLONE_NEWUSER> フラグを使って B<clone>(2), B<unshare>(2), B<setns>(2) を呼び出すと、 子プロセス (B<clone>(2) の場合) や呼び出し元 (B<unshare>(2) や B<setns>(2) の場合) では \"securebits\" フラグ (B<capabilities>(7) 参照) がデフォルト値に設定される。 呼び出し元は B<setns>(2) の呼び出し後は元のユーザー名前空間ではケーパビリティを持たないので、 B<setns>(2) を 2 回呼び出して一度別のユーザー名前空間に移動して元のユーザー名前空間に戻ることで、 プロセスが元のユーザー名前空間にとどまりつつ自身の \"securebits\" フラグを再設定することはできない。"
8723
8724 #. type: Plain text
8725 #: build/C/man7/user_namespaces.7:173
8726 msgid "Having a capability inside a user namespace permits a process to perform operations (that require privilege)  only on resources governed by that namespace.  The rules for determining whether or not a process has a capability in a particular user namespace are as follows:"
8727 msgstr "ユーザー名前空間内部でケーパビリティを持つというのは、 そのプロセスがその名前空間の支配下にあるリソースに対してのみ (特権を必要とする) 操作を実行できるということである。 プロセスが特定のユーザー名前空間でケーパビリティを持つかどうかを判定するルールは以下の通りである。"
8728
8729 #.  In the 3.8 sources, see security/commoncap.c::cap_capable():
8730 #. type: Plain text
8731 #: build/C/man7/user_namespaces.7:189
8732 msgid "A process has a capability inside a user namespace if it is a member of that namespace and it has the capability in its effective capability set.  A process can gain capabilities in its effective capability set in various ways.  For example, it may execute a set-user-ID program or an executable with associated file capabilities.  In addition, a process may gain capabilities via the effect of B<clone>(2), B<unshare>(2), or B<setns>(2), as already described."
8733 msgstr "プロセスがその名前空間のメンバーで、実効ケーパビリティセットにそのケーパビリティがあれば、 そのプロセスはユーザー名前空間内でケーパビリティを持つ。 プロセスが実効ケーパビリティセットでケーパビリティを得るにはいくつかの方法がある。 例えば、 set-user-ID プログラムや関連するファイルケーパビリティを持った実行ファイルを実行する。 また、 すでに説明したとおり、 プロセスは B<clone>(2), B<unshare>(2), B<setns>(2) の結果としてケーパビリティを獲得することもできる。"
8734
8735 #. type: Plain text
8736 #: build/C/man7/user_namespaces.7:193
8737 msgid "If a process has a capability in a user namespace, then it has that capability in all child (and further removed descendant)  namespaces as well."
8738 msgstr "プロセスがユーザー名前空間でケーパビリティを持っている場合、 そのプロセスはすべての子供の名前空間 (および削除された子孫の名前空間) でケーパビリティを持つ。"
8739
8740 #
8741 #.  * The owner of the user namespace in the parent of the
8742 #.  * user namespace has all caps.
8743 #.  (and likewise associates the effective group ID of the creating process
8744 #.  with the namespace).
8745 #.  See kernel commit 520d9eabce18edfef76a60b7b839d54facafe1f9 for a fix
8746 #.  on this point
8747 #.      This includes the case where the process executes a set-user-ID
8748 #.      program that confers the effective UID of the creator of the namespace.
8749 #.  ============================================================
8750 #. type: Plain text
8751 #: build/C/man7/user_namespaces.7:214
8752 msgid "When a user namespace is created, the kernel records the effective user ID of the creating process as being the \"owner\" of the namespace.  A process that resides in the parent of the user namespace and whose effective user ID matches the owner of the namespace has all capabilities in the namespace.  By virtue of the previous rule, this means that the process has all capabilities in all further removed descendant user namespaces as well."
8753 msgstr "ユーザー名前空間が作成された際、 カーネルはその名前空間の「所有者」として作成したプロセスの実効ユーザー ID を記録する。 親のユーザー名前空間に属するプロセスで、 そのプロセスの実効ユーザー ID が名前空間の所有者と一致する場合、 そのプロセスはその名前空間ですべてのケーパビリティを持つ。 一つ前のルールも合わせて考えると、 このプロセスはすべての削除された子孫のユーザー名前空間ですべてのケーパビリティを持つことを意味する。"
8754
8755 #. type: SS
8756 #: build/C/man7/user_namespaces.7:214
8757 #, no-wrap
8758 msgid "Interaction of user namespaces and other types of namespaces"
8759 msgstr "ユーザー名前空間と他の名前空間の関係"
8760
8761 #. type: Plain text
8762 #: build/C/man7/user_namespaces.7:219
8763 msgid "Starting in Linux 3.8, unprivileged processes can create user namespaces, and mount, PID, IPC, network, and UTS namespaces can be created with just the B<CAP_SYS_ADMIN> capability in the caller's user namespace."
8764 msgstr "Linux 3.8 以降では、 非特権プロセスがユーザー名前空間を作成することができる。 また、 呼び出し元のユーザー名前空間で B<CAP_SYS_ADMIN> ケーパビリティを持っているだけで、 マウント名前空間、 PID 名前空間、 IPC 名前空間、 ネットワーク名前空間、 UTS 名前空間を作成できる。"
8765
8766 #. type: Plain text
8767 #: build/C/man7/user_namespaces.7:225
8768 msgid "When a non-user-namespace is created, it is owned by the user namespace in which the creating process was a member at the time of the creation of the namespace.  Actions on the non-user-namespace require capabilities in the corresponding user namespace."
8769 msgstr "ユーザー名前空間以外の名前空間が作成された場合、 その名前空間は呼び出したプロセスが名前空間の作成時にメンバーであったユーザー名前空間により所有される。 ユーザー名前空間以外の名前空間における操作には、 対応するユーザー名前空間でのケーパビリティが必要である。"
8770
8771 #. type: Plain text
8772 #: build/C/man7/user_namespaces.7:242
8773 msgid "If B<CLONE_NEWUSER> is specified along with other B<CLONE_NEW*> flags in a single B<clone>(2)  or B<unshare>(2)  call, the user namespace is guaranteed to be created first, giving the child (B<clone>(2))  or caller (B<unshare>(2))  privileges over the remaining namespaces created by the call.  Thus, it is possible for an unprivileged caller to specify this combination of flags."
8774 msgstr "一つの B<clone>(2) や B<unshare>(2) の呼び出しで B<CLONE_NEWUSER> が他の B<CLONE_NEW*> フラグと一緒に指定された場合、 そのユーザー名前空間が最初に作成されることが保証され、 子プロセス (B<clone>(2) の場合) や呼び出し元 (B<unshare>(2) の場合) はその呼び出しで作成される残りの名前空間で特権を持つ。 したがって、 特権を持たない呼び出し元がフラグを組み合わせて指定することができる。"
8775
8776 #
8777 #.  ============================================================
8778 #. type: Plain text
8779 #: build/C/man7/user_namespaces.7:258
8780 msgid "When a new IPC, mount, network, PID, or UTS namespace is created via B<clone>(2)  or B<unshare>(2), the kernel records the user namespace of the creating process against the new namespace.  (This association can't be changed.)  When a process in the new namespace subsequently performs privileged operations that operate on global resources isolated by the namespace, the permission checks are performed according to the process's capabilities in the user namespace that the kernel associated with the new namespace."
8781 msgstr "新しい IPC 名前空間、 マウント名前空間、 ネットワーク名前空間、 PID 名前空間、 UTS 名前空間が B<clone>(2) や B<unshare>(2) で作成される際、 カーネルは新しい名前空間に対して作成したプロセスのユーザー名前空間を記録する (この関連付けは変更できない)。 その新しい名前空間のプロセスがその後名前空間で分離されたグローバルリソースに対して特権操作を行う場合、 カーネルが新しい名前空間に対して関連付けたユーザー名前空間でのプロセスのケーパビリティに基づいてアクセス許可のチェックが行われる。"
8782
8783 #. type: SS
8784 #: build/C/man7/user_namespaces.7:258
8785 #, no-wrap
8786 msgid "Restrictions on mount namespaces"
8787 msgstr "マウント名前空間における制限"
8788
8789 #. type: Plain text
8790 #: build/C/man7/user_namespaces.7:261
8791 msgid "Note the following points with respect to mount namespaces:"
8792 msgstr "マウント名前空間に関しては以下の点に注意すること。"
8793
8794 #. type: Plain text
8795 #: build/C/man7/user_namespaces.7:266
8796 msgid "A mount namespace has an owner user namespace.  A mount namespace whose owner user namespace is different from the owner user namespace of its parent mount namespace is considered a less privileged mount namespace."
8797 msgstr "マウント名前空間は所有者のユーザー名前空間を持つ。 所有者のユーザー名前空間が親のマウント名前空間の所有者のユーザー名前空間と異なるマウント名前空間は、 特権が少ないマウント名前空間 (less privileged mount namespace) である。"
8798
8799 #. type: Plain text
8800 #: build/C/man7/user_namespaces.7:272
8801 msgid "When creating a less privileged mount namespace, shared mounts are reduced to slave mounts.  This ensures that mappings performed in less privileged mount namespaces will not propagate to more privileged mount namespaces."
8802 msgstr "特権が少ないマウント名前空間を作成する場合、 共有マウントは slave マウントに縮小される。 これにより、 特権の少ないマウント名前空間で実行されるマッピングが、 より特権を持つマウント名前空間 (more privileged mount namespace) に伝搬しないことが保証される。"
8803
8804 #.  FIXME .
8805 #.      What does "come as a single unit from more privileged mount" mean?
8806 #. type: Plain text
8807 #: build/C/man7/user_namespaces.7:285
8808 msgid "Mounts that come as a single unit from more privileged mount are locked together and may not be separated in a less privileged mount namespace.  (The B<unshare>(2)  B<CLONE_NEWNS> operation brings across all of the mounts from the original mount namespace as a single unit, and recursive mounts that propagate between mount namespaces propagate as a single unit.)"
8809 msgstr "より特権を持つマウントで一つのまとまりとして行われたマウントは一つにまとまったままとなり、 特権が少ないマウント名前空間で分割することはできない。 (B<unshare>(2) の B<CLONE_NEWNS> 操作では、 元のマウント名前空間のすべてのマウントは一つのまとまりとして扱われ、 マウント名前空間間で伝わる再帰的なマウントでは一つのまとまりとして伝わる。)"
8810
8811 #
8812 #.  commit 9566d6742852c527bf5af38af5cbb878dad75705
8813 #.  Author: Eric W. Biederman <ebiederm@xmission.com>
8814 #.  Date:   Mon Jul 28 17:26:07 2014 -0700
8815 #.       mnt: Correct permission checks in do_remount
8816 #. type: Plain text
8817 #: build/C/man7/user_namespaces.7:306
8818 msgid "The B<mount>(2)  flags B<MS_RDONLY>, B<MS_NOSUID>, B<MS_NOEXEC>, and the \"atime\" flags (B<MS_NOATIME>, B<MS_NODIRATIME>, B<MS_RELATIME>)  settings become locked when propagated from a more privileged to a less privileged mount namespace, and may not be changed in the less privileged mount namespace."
8819 msgstr "より特権を持つマウント名前空間から特権の少ないマウント名前空間に伝わる際に、 B<mount>(2) の B<MS_RDONLY>, B<MS_NOSUID>, B<MS_NOEXEC> フラグと \"atime\" フラグ (B<MS_NOATIME>, B<MS_NODIRATIME>, B<MS_REALTIME>) 設定はロックされ、 特権の少ないマウント名前空間では変更することはできない。"
8820
8821 #.  (As of 3.18-rc1 (in Al Viro's 2014-08-30 vfs.git#for-next tree))
8822 #. type: Plain text
8823 #: build/C/man7/user_namespaces.7:313
8824 msgid "A file or directory that is a mount point in one namespace that is not a mount point in another namespace, may be renamed, unlinked, or removed (B<rmdir>(2))  in the mount namespace in which it is not a mount point (subject to the usual permission checks)."
8825 msgstr "ある名前空間でマウントポイントとなっているが別の名前空間でのマウントポイントになっていないファイルやディレクトリは、 マウントポイントになっていないマウント名前空間では (通常のアクセス許可チェックにもとづいて) rename, unlink, remove (B<rmdir>(2)) を行うことができる。"
8826
8827 #
8828 #.  ============================================================
8829 #. type: Plain text
8830 #: build/C/man7/user_namespaces.7:324
8831 msgid "Previously, attempting to unlink, rename, or remove a file or directory that was a mount point in another mount namespace would result in the error B<EBUSY>.  That behavior had technical problems of enforcement (e.g., for NFS)  and permitted denial-of-service attacks against more privileged users.  (i.e., preventing individual files from being updated by bind mounting on top of them)."
8832 msgstr "以前は、 別のマウント名前空間でマウントポイントとなっていたファイルやディレクトリを rename, unlink, remove しようとすると、 エラー B<EBUSY> が返されていた。 この動作は、 (NFS などで) 適用にあたっての技術的な問題があるとともに、 より特権を持つユーザーに対してサービス不能攻撃 (denial-of-service attack) を許してしまっていた (ファイルをバインドマウントで更新することができなくなっていた)。"
8833
8834 #. type: SS
8835 #: build/C/man7/user_namespaces.7:324
8836 #, no-wrap
8837 msgid "User and group ID mappings: uid_map and gid_map"
8838 msgstr "ユーザー ID とグループ ID のマッピング: uid_map と gid_map"
8839
8840 #.  commit 22d917d80e842829d0ca0a561967d728eb1d6303
8841 #. type: Plain text
8842 #: build/C/man7/user_namespaces.7:339
8843 msgid "When a user namespace is created, it starts out without a mapping of user IDs (group IDs)  to the parent user namespace.  The I</proc/[pid]/uid_map> and I</proc/[pid]/gid_map> files (available since Linux 3.5)  expose the mappings for user and group IDs inside the user namespace for the process I<pid>.  These files can be read to view the mappings in a user namespace and written to (once) to define the mappings."
8844 msgstr "ユーザー名前空間が作成された際、 その名前空間は親のユーザー名前空間へのユーザー ID (とグループ ID) のマッピングを行わずに開始される。 ファイル I</proc/[pid]/uid_map> と I</proc/[pid]/gid_map> (Linux 3.5 以降で利用可能) でプロセス I<pid> のユーザー名前空間内でのユーザー ID とグループ ID のマッピングにアクセスできる。 これらのファイルを読み出してユーザー名前空間内のマッピングを参照したり、 これらのファイルに書き込んでマッピングを (一度だけ) 定義することができる。"
8845
8846 #. type: Plain text
8847 #: build/C/man7/user_namespaces.7:345
8848 msgid "The description in the following paragraphs explains the details for I<uid_map>; I<gid_map> is exactly the same, but each instance of \"user ID\" is replaced by \"group ID\"."
8849 msgstr "以下の段落で I<uid_map> の詳細を説明する。 I<gid_map> に関しても全く同じである。 \"user ID\" という部分を \"group ID\" に置き換えればよい。"
8850
8851 #. type: Plain text
8852 #: build/C/man7/user_namespaces.7:359
8853 msgid "The I<uid_map> file exposes the mapping of user IDs from the user namespace of the process I<pid> to the user namespace of the process that opened I<uid_map> (but see a qualification to this point below).  In other words, processes that are in different user namespaces will potentially see different values when reading from a particular I<uid_map> file, depending on the user ID mappings for the user namespaces of the reading processes."
8854 msgstr "I<uid_map> ファイルで、 プロセス I<pid> のユーザー名前空間から I<uid_map> をオープンしたプロセスのユーザー名前空間にユーザー ID のマッピングが公開される (公開するポリシーの条件については下記を参照)。 言い換えると、 別のユーザー名前空間のプロセスでは、 特定の I<uid_map> ファイルを読み出した際に潜在的には別の値が見えることがあるということである。 見える値は読み出したプロセスのユーザー名前空間のユーザー ID マッピングに依存する。"
8855
8856 #. type: Plain text
8857 #: build/C/man7/user_namespaces.7:371
8858 msgid "Each line in the I<uid_map> file specifies a 1-to-1 mapping of a range of contiguous user IDs between two user namespaces.  (When a user namespace is first created, this file is empty.)  The specification in each line takes the form of three numbers delimited by white space.  The first two numbers specify the starting user ID in each of the two user namespaces.  The third number specifies the length of the mapped range.  In detail, the fields are interpreted as follows:"
8859 msgstr "I<uid_map> ファイルの各行は 2 つのユーザー名前空間間の連続するユーザー ID の範囲の 1 対 1 マッピングを指定する (ユーザー名前空間が最初に作成された際にはこのファイルは空である)。 各行の指定の形式はホワイトスペース区切りの 3 つの数字である。 最初の 2 つの数字は 2 つの ユーザー名前空間それぞれの開始ユーザー ID を指定する。 3 つ目の数字はマッピングされる範囲の長さを指定する。 詳しくは、各フィールドは以下のように解釈される。"
8860
8861 #. type: Plain text
8862 #: build/C/man7/user_namespaces.7:375
8863 msgid "The start of the range of user IDs in the user namespace of the process I<pid>."
8864 msgstr "プロセス I<pid> のユーザー名前空間におけるユーザー ID の範囲の開始値。"
8865
8866 #. type: Plain text
8867 #: build/C/man7/user_namespaces.7:383
8868 msgid "The start of the range of user IDs to which the user IDs specified by field one map.  How field two is interpreted depends on whether the process that opened I<uid_map> and the process I<pid> are in the same user namespace, as follows:"
8869 msgstr "1 番目のフィールドで指定されたユーザー ID がマッピングされる先のユーザー ID の範囲の開始値。 2 番目のフィールドがどのように解釈されるかは、 I<uid_map> をオープンしたプロセスとプロセス I<pid> が同じユーザー名前空間かどうかに依存する。 以下のとおり。"
8870
8871 #. type: Plain text
8872 #: build/C/man7/user_namespaces.7:389
8873 msgid "If the two processes are in different user namespaces: field two is the start of a range of user IDs in the user namespace of the process that opened I<uid_map>."
8874 msgstr "2 つのプロセスが異なるユーザー名前空間に属す場合、 2 番目のフィールドは I<uid_map> をオープンしたプロセスのユーザー名前空間におけるユーザー ID の範囲の開始値である。"
8875
8876 #. type: Plain text
8877 #: build/C/man7/user_namespaces.7:400
8878 msgid "If the two processes are in the same user namespace: field two is the start of the range of user IDs in the parent user namespace of the process I<pid>.  This case enables the opener of I<uid_map> (the common case here is opening I</proc/self/uid_map>)  to see the mapping of user IDs into the user namespace of the process that created this user namespace."
8879 msgstr "2 つのプロセスが同じユーザー名前空間に属す場合、 2 番目のフィールドはプロセス I<pid> の親のユーザー名前空間におけるユーザー ID の範囲の開始値である。 この場合、 I<uid_map> をオープンしたプロセス (よくあるのは I</proc/self/uid_map> をオープンした場合である) は、 このユーザー名前空間を作成したプロセスのユーザー名前空間に対するユーザー ID マッピングを参照することができる。"
8880
8881 #. type: Plain text
8882 #: build/C/man7/user_namespaces.7:404
8883 msgid "The length of the range of user IDs that is mapped between the two user namespaces."
8884 msgstr "2 つのユーザー名前空間間でマッピングされるユーザー ID の範囲の長さ。"
8885
8886 #. type: Plain text
8887 #: build/C/man7/user_namespaces.7:411
8888 msgid "System calls that return user IDs (group IDs)\\(emfor example, B<getuid>(2), B<getgid>(2), and the credential fields in the structure returned by B<stat>(2)\\(emreturn the user ID (group ID) mapped into the caller's user namespace."
8889 msgstr "ユーザー ID (グループ ID) を返すシステムコール、例えば B<getuid>(2), B<getgid>(2) や B<stat>(2) が返す構造体の credential フィールド、は呼び出し元のユーザー名前空間にマッピングされたユーザー ID (グループ ID) を返す。"
8890
8891 #. type: Plain text
8892 #: build/C/man7/user_namespaces.7:419
8893 msgid "When a process accesses a file, its user and group IDs are mapped into the initial user namespace for the purpose of permission checking and assigning IDs when creating a file.  When a process retrieves file user and group IDs via B<stat>(2), the IDs are mapped in the opposite direction, to produce values relative to the process user and group ID mappings."
8894 msgstr "プロセスがファイルにアクセスする場合、 アクセス許可のチェックやファイル作成時の ID 割り当てのために、 そのユーザー ID とグループ ID は初期ユーザー名前空間にマッピングされる。 プロセスが B<stat>(2) を使ってファイルのユーザー ID やグループ ID を取得する際には、 上記の反対方向に ID のマッピングが行われ、 プロセスにおける相対的なユーザー ID とグループ ID の値が生成される。"
8895
8896 #. type: Plain text
8897 #: build/C/man7/user_namespaces.7:428
8898 msgid "The initial user namespace has no parent namespace, but, for consistency, the kernel provides dummy user and group ID mapping files for this namespace.  Looking at the I<uid_map> file (I<gid_map> is the same) from a shell in the initial namespace shows:"
8899 msgstr "初期ユーザー名前空間は親の名前空間を持たないが、 一貫性を持たせるため、 カーネルは初期の名前空間に対してダミーのユーザー ID とグループ ID のマッピングを提供する。 初期の名前空間のシェルから I<uid_map> ファイル (I<gid_map> も同じ) を参照するには以下のようにする。"
8900
8901 #. type: Plain text
8902 #: build/C/man7/user_namespaces.7:433
8903 #, no-wrap
8904 msgid ""
8905 "$ B<cat /proc/$$/uid_map>\n"
8906 "         0          0 4294967295\n"
8907 msgstr ""
8908 "$ B<cat /proc/$$/uid_map>\n"
8909 "         0          0 4294967295\n"
8910
8911 #
8912 #.  ============================================================
8913 #. type: Plain text
8914 #: build/C/man7/user_namespaces.7:453
8915 msgid "This mapping tells us that the range starting at user ID 0 in this namespace maps to a range starting at 0 in the (nonexistent) parent namespace, and the length of the range is the largest 32-bit unsigned integer.  (This deliberately leaves 4294967295 (the 32-bit signed -1 value) unmapped.  This is deliberate: I<(uid_t)\\ -\\1> is used in several interfaces (e.g., B<setreuid>(2))  as a way to specify \"no user ID\".  Leaving I<(uid_t)\\ -\\1> unmapped and unusable guarantees that there will be no confusion when using these interfaces."
8916 msgstr "このマッピングは、 この名前空間のユーザー ID 0 から始まる範囲が (実際には存在しない) 親の名前空間の 0 から始まる範囲にマッピングされ、 範囲の流さは 32 ビットの unsigned integer の最大値である、 と言っている。 (ここで 4294967295 (32 ビットの符号付き -1 の値) は意図的にマッピングされていない。 I<(uid_t)\\ -\\1> は (B<setreuid>(2) など) いくつかのインターフェースで \"no user ID\" (ユーザー ID なし) を示す手段として使用されているので、 意図的にこのようになっている。 I<(uid_t)\\ -\\1> をマッピングせず、 利用できないようにすることで、 これらのインターフェースを使った際に混乱が起こらないように保証している。)"
8917
8918 #. type: SS
8919 #: build/C/man7/user_namespaces.7:453
8920 #, no-wrap
8921 msgid "Defining user and group ID mappings: writing to uid_map and gid_map"
8922 msgstr "ユーザー ID とグループ ID のマッピングの定義: uid_map と gid_map への書き込み"
8923
8924 #. type: Plain text
8925 #: build/C/man7/user_namespaces.7:469
8926 msgid "After the creation of a new user namespace, the I<uid_map> file of I<one> of the processes in the namespace may be written to I<once> to define the mapping of user IDs in the new user namespace.  An attempt to write more than once to a I<uid_map> file in a user namespace fails with the error B<EPERM>.  Similar rules apply for I<gid_map> files."
8927 msgstr "新しいユーザー名前空間を作成した後、 新しいユーザー名前空間におけるユーザー ID のマッピングを定義するため、 その名前空間のプロセスの「一つ」の I<uid_map> ファイルに「一度だけ」書き込みを行うことができる。 ユーザー名前空間の I<uid_map> ファイルに二度目以降の書き込みを行おうとすると、 エラー B<EPERM> で失敗する。 I<gid_map> ファイルについては同じルールが適用される。"
8928
8929 #. type: Plain text
8930 #: build/C/man7/user_namespaces.7:474
8931 msgid "The lines written to I<uid_map> (I<gid_map>)  must conform to the following rules:"
8932 msgstr "I<uid_map> (I<gid_map>) に書き込む行は以下のルールに従っていなければならない。"
8933
8934 #. type: Plain text
8935 #: build/C/man7/user_namespaces.7:477
8936 msgid "The three fields must be valid numbers, and the last field must be greater than 0."
8937 msgstr "3 のフィールドは有効な数字でなければならず、最後のフィールドは 0 より大きくなければならない。"
8938
8939 #. type: Plain text
8940 #: build/C/man7/user_namespaces.7:479
8941 msgid "Lines are terminated by newline characters."
8942 msgstr "行は改行文字で終了しなければならない。"
8943
8944 #.  FIXME(Eric): the restriction "less than" rather than "less than or equal"
8945 #.  seems strangely arbitrary. Furthermore, the comment does not agree
8946 #.  with the code in kernel/user_namespace.c. Which is correct?
8947 #. type: Plain text
8948 #: build/C/man7/user_namespaces.7:492
8949 msgid "There is an (arbitrary) limit on the number of lines in the file.  As at Linux 3.8, the limit is five lines.  In addition, the number of bytes written to the file must be less than the system page size, and the write must be performed at the start of the file (i.e., B<lseek>(2)  and B<pwrite>(2)  can't be used to write to nonzero offsets in the file)."
8950 msgstr "ファイルの行数には上限がある。 Linux 3.8 時点では、上限は 5 行である。 さらに、 ファイルに書き込むバイト数はシステムページサイズより小さくなければならず、 書き込みはファイルの先頭に対して行わなければならない (つまり、 B<lseek>(2) や B<pwrite>(2) を使って 0 以外のファイルオフセットに書き込むことはできない)。"
8951
8952 #.  commit 0bd14b4fd72afd5df41e9fd59f356740f22fceba
8953 #. type: Plain text
8954 #: build/C/man7/user_namespaces.7:505
8955 msgid "The range of user IDs (group IDs)  specified in each line cannot overlap with the ranges in any other lines.  In the initial implementation (Linux 3.8), this requirement was satisfied by a simplistic implementation that imposed the further requirement that the values in both field 1 and field 2 of successive lines must be in ascending numerical order, which prevented some otherwise valid maps from being created.  Linux 3.9 and later fix this limitation, allowing any valid set of nonoverlapping maps."
8956 msgstr "各行で指定されるユーザー ID (グループ ID) の範囲は他の行が指定する範囲と重なってはならない。 最初の実装 (Linux 3.8) では、 この要件は、 後続行のフィールド 1 とフィールド 2 の両方の値が昇順になっていなければならないという追加の要件を設け、 これが満たされなかった場合は有効なマッピングは作成されない、 という単純な実装により満たされていた。 Linux 3.9 以降ではこの制限は修正され、 重複がない有効なマッピングであればどんな組み合わせでも指定できるようになった。"
8957
8958 #. type: Plain text
8959 #: build/C/man7/user_namespaces.7:507
8960 msgid "At least one line must be written to the file."
8961 msgstr "少なくとも 1 行はファイルに書き込まなければならない。"
8962
8963 #. type: Plain text
8964 #: build/C/man7/user_namespaces.7:510
8965 msgid "Writes that violate the above rules fail with the error B<EINVAL>."
8966 msgstr "上記のルールを満たさない書き込みはエラー B<EINVAL> で失敗する。"
8967
8968 #. type: Plain text
8969 #: build/C/man7/user_namespaces.7:515
8970 msgid "In order for a process to write to the I</proc/[pid]/uid_map> (I</proc/[pid]/gid_map>)  file, all of the following requirements must be met:"
8971 msgstr "プロセスが I</proc/[pid]/uid_map> (I</proc/[pid]/gid_map>) ファイルに書き込むためには、 以下の要件がすべて満たされる必要がある。"
8972
8973 #. type: Plain text
8974 #: build/C/man7/user_namespaces.7:521
8975 msgid "The writing process must have the B<CAP_SETUID> (B<CAP_SETGID>)  capability in the user namespace of the process I<pid>."
8976 msgstr "書き込みプロセスは、 プロセス I<pid> のユーザー名前空間で B<CAP_SETUID> (B<CAP_SETGID>) ケーパビリティを持っていなければならない。"
8977
8978 #. type: Plain text
8979 #: build/C/man7/user_namespaces.7:526
8980 msgid "The writing process must be in either the user namespace of the process I<pid> or inside the parent user namespace of the process I<pid>."
8981 msgstr "書き込みプロセスは、 プロセス I<pid> のユーザー名前空間もしくはプロセス I<pid> の親のユーザー名前空間に属していなければならない。"
8982
8983 #. type: Plain text
8984 #: build/C/man7/user_namespaces.7:529
8985 msgid "The mapped user IDs (group IDs) must in turn have a mapping in the parent user namespace."
8986 msgstr "マッピングされたユーザー ID (グループ ID) は親のユーザー名前空間にマッピングを持っていなければならない。"
8987
8988 #. type: Plain text
8989 #: build/C/man7/user_namespaces.7:531
8990 msgid "One of the following is true:"
8991 msgstr "以下のいずれか一つが真である。"
8992
8993 #. type: Plain text
8994 #: build/C/man7/user_namespaces.7:541
8995 msgid "The data written to I<uid_map> (I<gid_map>)  consists of a single line that maps the writing process's filesystem user ID (group ID) in the parent user namespace to a user ID (group ID)  in the user namespace.  The usual case here is that this single line provides a mapping for user ID of the process that created the namespace."
8996 msgstr "I<uid_map> (I<gid_map>) に書き込まれるデータは、 書き込みを行うプロセスの親のユーザー名前空間でのファイルシステムユーザー ID (グループ ID) をそのユーザー名前空間でのユーザー ID (グループ ID) にマッピングする 1 行で構成されている。"
8997
8998 #. type: Plain text
8999 #: build/C/man7/user_namespaces.7:548
9000 msgid "The opening process has the B<CAP_SETUID> (B<CAP_SETGID>)  capability in the parent user namespace.  Thus, a privileged process can make mappings to arbitrary user IDs (group IDs)  in the parent user namespace."
9001 msgstr "オープンしたプロセスが親のユーザー名前空間で B<CAP_SETUID> (B<CAP_SETGID>) ケーパビリティを持っている。 したがって、 特権プロセスは親のユーザー名前空間の任意のユーザー ID (グループ ID) に対するマッピングを作成できる。"
9002
9003 #
9004 #.  ============================================================
9005 #. type: Plain text
9006 #: build/C/man7/user_namespaces.7:555
9007 msgid "Writes that violate the above rules fail with the error B<EPERM>."
9008 msgstr "上記のルールを満たさない書き込みはエラー B<EPERM> で失敗する。"
9009
9010 #. type: SS
9011 #: build/C/man7/user_namespaces.7:555
9012 #, no-wrap
9013 msgid "Unmapped user and group IDs"
9014 msgstr "マッピングされていないユーザー ID とグループ ID"
9015
9016 #.  from_kuid_munged(), from_kgid_munged()
9017 #. type: Plain text
9018 #: build/C/man7/user_namespaces.7:572
9019 msgid "There are various places where an unmapped user ID (group ID)  may be exposed to user space.  For example, the first process in a new user namespace may call B<getuid>()  before a user ID mapping has been defined for the namespace.  In most such cases, an unmapped user ID is converted to the overflow user ID (group ID); the default value for the overflow user ID (group ID) is 65534.  See the descriptions of I</proc/sys/kernel/overflowuid> and I</proc/sys/kernel/overflowgid> in B<proc>(5)."
9020 msgstr ""
9021 "マッピングされていないユーザー ID (グループ ID) がユーザー空間に公開される場合はいろいろある。\n"
9022 "例えば、 新しいユーザー名前空間の最初のプロセスが、 その名前空間に対するユーザー ID マッピングが定義される前に B<getuid>() を呼び出すなどである。 このようなほとんどの場合で、 マッピングされていないユーザー ID はオーバーフローユーザー ID (グループ ID)に変換される。 デフォルトのオーバーフローユーザー ID (グループ ID) は 65534 である。 B<proc>(5) の I</proc/sys/kernel/overflowuid> と I</proc/sys/kernel/overflowgid> の説明を参照。"
9023
9024 #.  also SO_PEERCRED
9025 #. type: Plain text
9026 #: build/C/man7/user_namespaces.7:600
9027 msgid "The cases where unmapped IDs are mapped in this fashion include system calls that return user IDs (B<getuid>(2), B<getgid>(2), and similar), credentials passed over a UNIX domain socket, credentials returned by B<stat>(2), B<waitid>(2), and the System V IPC \"ctl\" B<IPC_STAT> operations, credentials exposed by I</proc/PID/status> and the files in I</proc/sysvipc/*>, credentials returned via the I<si_uid> field in the I<siginfo_t> received with a signal (see B<sigaction>(2)), credentials written to the process accounting file (see B<acct>(5)), and credentials returned with POSIX message queue notifications (see B<mq_notify>(3))."
9028 msgstr "マッピングされていない ID がこのようにマッピングされる場合としては、 ユーザー ID を返すシステムコール (B<getuid>(2), B<getgid>(2) やその同類)、 UNIX ドメインソケットで渡される ID 情報 (credential)、 B<stat>(2) が返す ID 情報、 B<waitid>(2)、 System V IPC \"ctl\" B<IPC_STAT> 操作、 I</proc/PID/status> や I</proc/sysvipc/*> 内のファイルで公開される ID 情報、 シグナル受信時の I<siginfo_t> の I<si_uid> フィールドで返される ID 情報 (B<sigaction>(2) 参照)、 プロセスアカウンティングファイルに書き込まれる ID 情報 (B<acct>(5) 参照)、 POSIX メッセージキュー通知で返される ID 情報 (B<mq_notify>(3) 参照) がある。"
9029
9030 #
9031 #.  from_kuid(), from_kgid()
9032 #.  Also F_GETOWNER_UIDS is an exception
9033 #.  ============================================================
9034 #. type: Plain text
9035 #: build/C/man7/user_namespaces.7:615
9036 msgid "There is one notable case where unmapped user and group IDs are I<not> converted to the corresponding overflow ID value.  When viewing a I<uid_map> or I<gid_map> file in which there is no mapping for the second field, that field is displayed as 4294967295 (-1 as an unsigned integer);"
9037 msgstr "マッピングされていないユーザー ID やグループ ID が対応するオーバーフロー ID 値に変換され「ない」重要な場合が一つある。 2 番目のフィールドにマッピングがない I<uid_map> や I<gid_map> ファイルを参照した際、 そのフィールドは 4294967295 (unsigned integer では -1) が表示される。"
9038
9039 #. type: SS
9040 #: build/C/man7/user_namespaces.7:615
9041 #, no-wrap
9042 msgid "Set-user-ID and set-group-ID programs"
9043 msgstr "set-user-ID や set-group-ID されたプログラム"
9044
9045 #
9046 #.  ============================================================
9047 #. type: Plain text
9048 #: build/C/man7/user_namespaces.7:635
9049 msgid "When a process inside a user namespace executes a set-user-ID (set-group-ID) program, the process's effective user (group) ID inside the namespace is changed to whatever value is mapped for the user (group) ID of the file.  However, if either the user I<or> the group ID of the file has no mapping inside the namespace, the set-user-ID (set-group-ID) bit is silently ignored: the new program is executed, but the process's effective user (group) ID is left unchanged.  (This mirrors the semantics of executing a set-user-ID or set-group-ID program that resides on a filesystem that was mounted with the B<MS_NOSUID> flag, as described in B<mount>(2).)"
9050 msgstr "ユーザー名前空間内のプロセスが set-user-ID (set-group-ID) されたプログラムを実行した場合、 そのプロセスの名前空間内の実効ユーザー ID (実効グループ ID) は、 そのファイルのユーザー ID (グループ ID) にマッピングされる。 しかし、 そのファイルのユーザー ID 「か」グループ ID が名前空間内のマッピングにない場合、 set-user-ID (set-group-ID) ビットは黙って無視される。 新しいプログラムは実行されるが、 そのプロセスの実効ユーザー ID (実効グループ ID) は変更されないままとなる。 (これは B<MS_NOSUID> フラグ付きでマウントされたファイルシステム上にある set-user-ID/set-group-ID プログラムを実行した場合の動作を反映したものである。 B<mount>(2) を参照。)"
9051
9052 #. type: Plain text
9053 #: build/C/man7/user_namespaces.7:645
9054 msgid "When a process's user and group IDs are passed over a UNIX domain socket to a process in a different user namespace (see the description of B<SCM_CREDENTIALS> in B<unix>(7)), they are translated into the corresponding values as per the receiving process's user and group ID mappings."
9055 msgstr "プロセスのユーザー ID とグループ ID が UNIX ドメインソケットを通して別のユーザー名前空間のプロセスに渡された場合 (B<unix>(7) の B<SCM_CREDENTIALS> の説明を参照)、 ユーザー ID とグループ ID は受信プロセスのユーザー ID とグループ ID のマッピングに基づき対応する値に翻訳される。"
9056
9057 #
9058 #.  ============================================================
9059 #. type: Plain text
9060 #: build/C/man7/user_namespaces.7:658
9061 msgid "Over the years, there have been a lot of features that have been added to the Linux kernel that have been made available only to privileged users because of their potential to confuse set-user-ID-root applications.  In general, it becomes safe to allow the root user in a user namespace to use those features because it is impossible, while in a user namespace, to gain more privilege than the root user of a user namespace has."
9062 msgstr "長年にわたり、Linux カーネルには特権ユーザーに対してだけ利用できる機能が多く追加されて来た。 これは set-user-ID-root アプリケーションを混乱させる潜在的な可能性を考慮してである。 一般的には、 ユーザー名前空間の root ユーザーにだけこれらの機能の使用を許可するのが安全である。 なぜなら、ユーザー名前空間の中にいる間は、 ユーザー名前空間の root ユーザーが持っている以上の特権を得ることはできないからである。"
9063
9064 #. type: SS
9065 #: build/C/man7/user_namespaces.7:658
9066 #, no-wrap
9067 msgid "Availability"
9068 msgstr "可用性"
9069
9070 #. type: Plain text
9071 #: build/C/man7/user_namespaces.7:666
9072 msgid "Use of user namespaces requires a kernel that is configured with the B<CONFIG_USER_NS> option.  User namespaces require support in a range of subsystems across the kernel.  When an unsupported subsystem is configured into the kernel, it is not possible to configure user namespaces support."
9073 msgstr "ユーザー名前空間を使用するには、 B<CONFIG_USER_NS> オプションが有効になったカーネルが必要である。 ユーザー名前空間をカーネルの様々なサブシステムのサポートを必要とする。 サポートされていないサブシステムがカーネルに組み込まれている場合、 ユーザー名前空間のサポートを有効にすることはできない。"
9074
9075 #.  commit d6970d4b726cea6d7a9bc4120814f95c09571fc3
9076 #. type: Plain text
9077 #: build/C/man7/user_namespaces.7:677
9078 msgid "As at Linux 3.8, most relevant subsystems supported user namespaces, but a number of filesystems did not have the infrastructure needed to map user and group IDs between user namespaces.  Linux 3.9 added the required infrastructure support for many of the remaining unsupported filesystems (Plan 9 (9P), Andrew File System (AFS), Ceph, CIFS, CODA, NFS, and OCFS2).  Linux 3.11 added support the last of the unsupported major filesystems, XFS."
9079 msgstr "Linux 3.8 時点では、 ほとんどの関連するサブシステムはユーザー名前空間に対応しているが、 多くのファイルシステムにユーザー名前空間間でユーザー ID やグループ ID のマッピングを行うのに必要な基盤がなかった。 Linux 3.9 では、 残りの未サポートのファイルシステムの多くで必要な基盤のサポートが追加された (Plan 9 (9P), Andrew File System (AFS), Ceph, CIFS, CODA, NFS, OCFS2)。 Linux 3.11 では、最後の主要な未サポートのファイルシステムであった XFS のサポートが追加された。"
9080
9081 #. type: Plain text
9082 #: build/C/man7/user_namespaces.7:686
9083 msgid "The program below is designed to allow experimenting with user namespaces, as well as other types of namespaces.  It creates namespaces as specified by command-line options and then executes a command inside those namespaces.  The comments and I<usage()> function inside the program provide a full explanation of the program.  The following shell session demonstrates its use."
9084 msgstr "以下のプログラムは、ユーザー名前空間で実験を行えるように設計されている。 他の種類の名前空間も扱える。 このプログラムはコマンドライン引き数で指定された名前空間を作成し、作成した名前空間内でコマンドを実行する。 コメントとプログラム内の I<usage()> 関数に、プログラムの詳しい説明が書かれている。 以下のシェルセッションに実行例を示す。"
9085
9086 #. type: Plain text
9087 #: build/C/man7/user_namespaces.7:688
9088 msgid "First, we look at the run-time environment:"
9089 msgstr "まず最初に、実行環境を確認しておく。"
9090
9091 #. type: Plain text
9092 #: build/C/man7/user_namespaces.7:697
9093 #, no-wrap
9094 msgid ""
9095 "$ B<uname -rs>     # Need Linux 3.8 or later\n"
9096 "Linux 3.8.0\n"
9097 "$ B<id -u>         # Running as unprivileged user\n"
9098 "1000\n"
9099 "$ B<id -g>\n"
9100 "1000\n"
9101 msgstr ""
9102 "$ B<uname -rs>     # Linux 3.8 以降が必要\n"
9103 "Linux 3.8.0\n"
9104 "$ B<id -u>         # 非特権ユーザーで実行する\n"
9105 "1000\n"
9106 "$ B<id -g>\n"
9107 "1000\n"
9108
9109 #. type: Plain text
9110 #: build/C/man7/user_namespaces.7:711
9111 msgid "Now start a new shell in new user (I<-U>), mount (I<-m>), and PID (I<-p>)  namespaces, with user ID (I<-M>)  and group ID (I<-G>)  1000 mapped to 0 inside the user namespace:"
9112 msgstr "新しいユーザー名前空間 (I<-U>), マウント名前空間 (I<-m>), PID 名前空間 (I<-p>) で新しいシェルを開始する。ユーザー ID (I<-M>) 1000 とグループ ID (I<-G>) 1000 をユーザー名前空間内で 0 にマッピングしている。"
9113
9114 #. type: Plain text
9115 #: build/C/man7/user_namespaces.7:715
9116 #, no-wrap
9117 msgid "$ B<./userns_child_exec -p -m -U -M '0 1000 1' -G '0 1000 1' bash>\n"
9118 msgstr "$ B<./userns_child_exec -p -m -U -M '0 1000 1' -G '0 1000 1' bash>\n"
9119
9120 #. type: Plain text
9121 #: build/C/man7/user_namespaces.7:720
9122 msgid "The shell has PID 1, because it is the first process in the new PID namespace:"
9123 msgstr "シェルは PID 1 を持つ。このシェルは新しい PID 名前空間の最初のプロセスだからである。"
9124
9125 #. type: Plain text
9126 #: build/C/man7/user_namespaces.7:725
9127 #, no-wrap
9128 msgid ""
9129 "bash$ B<echo $$>\n"
9130 "1\n"
9131 msgstr ""
9132 "bash$ B<echo $$>\n"
9133 "1\n"
9134
9135 #. type: Plain text
9136 #: build/C/man7/user_namespaces.7:730
9137 msgid "Inside the user namespace, the shell has user and group ID 0, and a full set of permitted and effective capabilities:"
9138 msgstr "ユーザー名前空間内では、シェルのユーザー ID とグループ ID ともに 0 で、すべての許可ケーパビリティと実効ケーパビリティが有効になっている。"
9139
9140 #. type: Plain text
9141 #: build/C/man7/user_namespaces.7:740
9142 #, no-wrap
9143 msgid ""
9144 "bash$ B<cat /proc/$$/status | egrep '^[UG]id'>\n"
9145 "Uid:\t0\t0\t0\t0\n"
9146 "Gid:\t0\t0\t0\t0\n"
9147 "bash$ B<cat /proc/$$/status | egrep '^Cap(Prm|Inh|Eff)'>\n"
9148 "CapInh:\t0000000000000000\n"
9149 "CapPrm:\t0000001fffffffff\n"
9150 "CapEff:\t0000001fffffffff\n"
9151 msgstr ""
9152 "bash$ B<cat /proc/$$/status | egrep '^[UG]id'>\n"
9153 "Uid:\t0\t0\t0\t0\n"
9154 "Gid:\t0\t0\t0\t0\n"
9155 "bash$ B<cat /proc/$$/status | egrep '^Cap(Prm|Inh|Eff)'>\n"
9156 "CapInh:\t0000000000000000\n"
9157 "CapPrm:\t0000001fffffffff\n"
9158 "CapEff:\t0000001fffffffff\n"
9159
9160 #. type: Plain text
9161 #: build/C/man7/user_namespaces.7:748
9162 msgid "Mounting a new I</proc> filesystem and listing all of the processes visible in the new PID namespace shows that the shell can't see any processes outside the PID namespace:"
9163 msgstr "I</proc> ファイルシステムをマウントし、新しい PID 名前空間で見えるプロセス一覧を表示すると、 シェルからは PID 名前空間外のプロセスが見えないことが分かる。"
9164
9165 #. type: Plain text
9166 #: build/C/man7/user_namespaces.7:756
9167 #, no-wrap
9168 msgid ""
9169 "bash$ B<mount -t proc proc /proc>\n"
9170 "bash$ B<ps ax>\n"
9171 "  PID TTY      STAT   TIME COMMAND\n"
9172 "    1 pts/3    S      0:00 bash\n"
9173 "   22 pts/3    R+     0:00 ps ax\n"
9174 msgstr ""
9175 "bash$ B<mount -t proc proc /proc>\n"
9176 "bash$ B<ps ax>\n"
9177 "  PID TTY      STAT   TIME COMMAND\n"
9178 "    1 pts/3    S      0:00 bash\n"
9179 "   22 pts/3    R+     0:00 ps ax\n"
9180
9181 #. type: SS
9182 #: build/C/man7/user_namespaces.7:758 build/C/man2/seccomp.2:574
9183 #, no-wrap
9184 msgid "Program source"
9185 msgstr "プログラムのソース"
9186
9187 #. type: Plain text
9188 #: build/C/man7/user_namespaces.7:762
9189 #, no-wrap
9190 msgid "/* userns_child_exec.c\n"
9191 msgstr "/* userns_child_exec.c\n"
9192
9193 #. type: Plain text
9194 #: build/C/man7/user_namespaces.7:764
9195 #, no-wrap
9196 msgid "   Licensed under GNU General Public License v2 or later\n"
9197 msgstr "   GNU General Public License v2 以降の元でライセンスされる\n"
9198
9199 #. type: Plain text
9200 #: build/C/man7/user_namespaces.7:780
9201 #, no-wrap
9202 msgid ""
9203 "   Create a child process that executes a shell command in new\n"
9204 "   namespace(s); allow UID and GID mappings to be specified when\n"
9205 "   creating a user namespace.\n"
9206 "*/\n"
9207 "#define _GNU_SOURCE\n"
9208 "#include E<lt>sched.hE<gt>\n"
9209 "#include E<lt>unistd.hE<gt>\n"
9210 "#include E<lt>stdlib.hE<gt>\n"
9211 "#include E<lt>sys/wait.hE<gt>\n"
9212 "#include E<lt>signal.hE<gt>\n"
9213 "#include E<lt>fcntl.hE<gt>\n"
9214 "#include E<lt>stdio.hE<gt>\n"
9215 "#include E<lt>string.hE<gt>\n"
9216 "#include E<lt>limits.hE<gt>\n"
9217 "#include E<lt>errno.hE<gt>\n"
9218 msgstr ""
9219 "   新しい名前空間でシェルコマンドを実行する子プロセスを作成する。\n"
9220 "   ユーザー名前空間を作成する際に UID と GID のマッピングを\n"
9221 "   指定することができる。\n"
9222 "*/\n"
9223 "#define _GNU_SOURCE\n"
9224 "#include E<lt>sched.hE<gt>\n"
9225 "#include E<lt>unistd.hE<gt>\n"
9226 "#include E<lt>stdlib.hE<gt>\n"
9227 "#include E<lt>sys/wait.hE<gt>\n"
9228 "#include E<lt>signal.hE<gt>\n"
9229 "#include E<lt>fcntl.hE<gt>\n"
9230 "#include E<lt>stdio.hE<gt>\n"
9231 "#include E<lt>string.hE<gt>\n"
9232 "#include E<lt>limits.hE<gt>\n"
9233 "#include E<lt>errno.hE<gt>\n"
9234
9235 #. type: Plain text
9236 #: build/C/man7/user_namespaces.7:783
9237 #, no-wrap
9238 msgid ""
9239 "/* A simple error-handling function: print an error message based\n"
9240 "   on the value in \\(aqerrno\\(aq and terminate the calling process */\n"
9241 msgstr ""
9242 "/* 簡単なエラー処理関数: \\\\(aqerrno\\\\(aq の値に基づいて\n"
9243 "   エラーメッセージを出力し、呼び出し元プロセスを終了する。 */\n"
9244
9245 #. type: Plain text
9246 #: build/C/man7/user_namespaces.7:786
9247 #, no-wrap
9248 msgid ""
9249 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
9250 "                        } while (0)\n"
9251 msgstr ""
9252 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
9253 "                        } while (0)\n"
9254
9255 #. type: Plain text
9256 #: build/C/man7/user_namespaces.7:791
9257 #, no-wrap
9258 msgid ""
9259 "struct child_args {\n"
9260 "    char **argv;        /* Command to be executed by child, with args */\n"
9261 "    int    pipe_fd[2];  /* Pipe used to synchronize parent and child */\n"
9262 "};\n"
9263 msgstr ""
9264 "struct child_args {\n"
9265 "    char **argv;        /* 子プロセスが実行するコマンドと引き数 */\n"
9266 "    int    pipe_fd[2];  /* 親プロセスと子プロセスを同期するためのパイプ */\n"
9267 "};\n"
9268
9269 #. type: Plain text
9270 #: build/C/man7/user_namespaces.7:793
9271 #, no-wrap
9272 msgid "static int verbose;\n"
9273 msgstr "static int verbose;\n"
9274
9275 #. type: Plain text
9276 #: build/C/man7/user_namespaces.7:826
9277 #, no-wrap
9278 msgid ""
9279 "static void\n"
9280 "usage(char *pname)\n"
9281 "{\n"
9282 "    fprintf(stderr, \"Usage: %s [options] cmd [arg...]\\en\\en\", pname);\n"
9283 "    fprintf(stderr, \"Create a child process that executes a shell \"\n"
9284 "            \"command in a new user namespace,\\en\"\n"
9285 "            \"and possibly also other new namespace(s).\\en\\en\");\n"
9286 "    fprintf(stderr, \"Options can be:\\en\\en\");\n"
9287 "#define fpe(str) fprintf(stderr, \"    %s\", str);\n"
9288 "    fpe(\"-i          New IPC namespace\\en\");\n"
9289 "    fpe(\"-m          New mount namespace\\en\");\n"
9290 "    fpe(\"-n          New network namespace\\en\");\n"
9291 "    fpe(\"-p          New PID namespace\\en\");\n"
9292 "    fpe(\"-u          New UTS namespace\\en\");\n"
9293 "    fpe(\"-U          New user namespace\\en\");\n"
9294 "    fpe(\"-M uid_map  Specify UID map for user namespace\\en\");\n"
9295 "    fpe(\"-G gid_map  Specify GID map for user namespace\\en\");\n"
9296 "    fpe(\"-z          Map user\\(aqs UID and GID to 0 in user namespace\\en\");\n"
9297 "    fpe(\"            (equivalent to: -M \\(aq0 E<lt>uidE<gt> 1\\(aq -G \\(aq0 E<lt>gidE<gt> 1\\(aq)\\en\");\n"
9298 "    fpe(\"-v          Display verbose messages\\en\");\n"
9299 "    fpe(\"\\en\");\n"
9300 "    fpe(\"If -z, -M, or -G is specified, -U is required.\\en\");\n"
9301 "    fpe(\"It is not permitted to specify both -z and either -M or -G.\\en\");\n"
9302 "    fpe(\"\\en\");\n"
9303 "    fpe(\"Map strings for -M and -G consist of records of the form:\\en\");\n"
9304 "    fpe(\"\\en\");\n"
9305 "    fpe(\"    ID-inside-ns   ID-outside-ns   len\\en\");\n"
9306 "    fpe(\"\\en\");\n"
9307 "    fpe(\"A map string can contain multiple records, separated\"\n"
9308 "        \" by commas;\\en\");\n"
9309 "    fpe(\"the commas are replaced by newlines before writing\"\n"
9310 "        \" to map files.\\en\");\n"
9311 msgstr ""
9312 "static void\n"
9313 "usage(char *pname)\n"
9314 "{\n"
9315 "    fprintf(stderr, \"Usage: %s [options] cmd [arg...]\\en\\en\", pname);\n"
9316 "    fprintf(stderr, \"Create a child process that executes a shell \"\n"
9317 "            \"command in a new user namespace,\\en\"\n"
9318 "            \"and possibly also other new namespace(s).\\en\\en\");\n"
9319 "    fprintf(stderr, \"Options can be:\\en\\en\");\n"
9320 "#define fpe(str) fprintf(stderr, \"    %s\", str);\n"
9321 "    fpe(\"-i          New IPC namespace\\en\");\n"
9322 "    fpe(\"-m          New mount namespace\\en\");\n"
9323 "    fpe(\"-n          New network namespace\\en\");\n"
9324 "    fpe(\"-p          New PID namespace\\en\");\n"
9325 "    fpe(\"-u          New UTS namespace\\en\");\n"
9326 "    fpe(\"-U          New user namespace\\en\");\n"
9327 "    fpe(\"-M uid_map  Specify UID map for user namespace\\en\");\n"
9328 "    fpe(\"-G gid_map  Specify GID map for user namespace\\en\");\n"
9329 "    fpe(\"-z          Map user\\(aqs UID and GID to 0 in user namespace\\en\");\n"
9330 "    fpe(\"            (equivalent to: -M \\(aq0 E<lt>uidE<gt> 1\\(aq -G \\(aq0 E<lt>gidE<gt> 1\\(aq)\\en\");\n"
9331 "    fpe(\"-v          Display verbose messages\\en\");\n"
9332 "    fpe(\"\\en\");\n"
9333 "    fpe(\"If -z, -M, or -G is specified, -U is required.\\en\");\n"
9334 "    fpe(\"It is not permitted to specify both -z and either -M or -G.\\en\");\n"
9335 "    fpe(\"\\en\");\n"
9336 "    fpe(\"Map strings for -M and -G consist of records of the form:\\en\");\n"
9337 "    fpe(\"\\en\");\n"
9338 "    fpe(\"    ID-inside-ns   ID-outside-ns   len\\en\");\n"
9339 "    fpe(\"\\en\");\n"
9340 "    fpe(\"A map string can contain multiple records, separated\"\n"
9341 "        \" by commas;\\en\");\n"
9342 "    fpe(\"the commas are replaced by newlines before writing\"\n"
9343 "        \" to map files.\\en\");\n"
9344
9345 #. type: Plain text
9346 #: build/C/man7/user_namespaces.7:834
9347 #, no-wrap
9348 msgid ""
9349 "/* Update the mapping file \\(aqmap_file\\(aq, with the value provided in\n"
9350 "   \\(aqmapping\\(aq, a string that defines a UID or GID mapping. A UID or\n"
9351 "   GID mapping consists of one or more newline-delimited records\n"
9352 "   of the form:\n"
9353 msgstr ""
9354 "/* マッピングファイル \\(aqmap_file\\(aq を \\(aqmapping\\(aq で指定\n"
9355 "   された値で更新する。 \\(aqmapping\\(aq は UID や GID マッピングを\n"
9356 "   定義する文字列である。 UID や GID マッピングは以下の形式の改行\n"
9357 "   で区切られた 1 つ以上のレコードである。\n"
9358
9359 #. type: Plain text
9360 #: build/C/man7/user_namespaces.7:836
9361 #, no-wrap
9362 msgid "       ID_inside-ns    ID-outside-ns   length\n"
9363 msgstr "       NS 内 ID        NS 外 ID        長さ\n"
9364
9365 #. type: Plain text
9366 #: build/C/man7/user_namespaces.7:841
9367 #, no-wrap
9368 msgid ""
9369 "   Requiring the user to supply a string that contains newlines is\n"
9370 "   of course inconvenient for command-line use. Thus, we permit the\n"
9371 "   use of commas to delimit records in this string, and replace them\n"
9372 "   with newlines before writing the string to the file. */\n"
9373 msgstr ""
9374 "   ユーザーに改行を含む文字列を指定するのを求めるのは、\n"
9375 "   コマンドラインを使う場合にはもちろん不便なことである。\n"
9376 "   そのため、 この文字列でレコードを区切るのにカンマを\n"
9377 "   使えるようにして、ファイルにこの文字列を書き込む前に\n"
9378 "   カンマを改行に置換する。 */\n"
9379
9380 #. type: Plain text
9381 #: build/C/man7/user_namespaces.7:847
9382 #, no-wrap
9383 msgid ""
9384 "static void\n"
9385 "update_map(char *mapping, char *map_file)\n"
9386 "{\n"
9387 "    int fd, j;\n"
9388 "    size_t map_len;     /* Length of \\(aqmapping\\(aq */\n"
9389 msgstr ""
9390 "static void\n"
9391 "update_map(char *mapping, char *map_file)\n"
9392 "{\n"
9393 "    int fd, j;\n"
9394 "    size_t map_len;     /* \\(aqmapping\\(aq の長さ */\n"
9395
9396 #. type: Plain text
9397 #: build/C/man7/user_namespaces.7:849
9398 #, no-wrap
9399 msgid "    /* Replace commas in mapping string with newlines */\n"
9400 msgstr "    /* マッピング文字列内のカンマを改行で置換する */\n"
9401
9402 #. type: Plain text
9403 #: build/C/man7/user_namespaces.7:854
9404 #, no-wrap
9405 msgid ""
9406 "    map_len = strlen(mapping);\n"
9407 "    for (j = 0; j E<lt> map_len; j++)\n"
9408 "        if (mapping[j] == \\(aq,\\(aq)\n"
9409 "            mapping[j] = \\(aq\\en\\(aq;\n"
9410 msgstr ""
9411 "    map_len = strlen(mapping);\n"
9412 "    for (j = 0; j E<lt> map_len; j++)\n"
9413 "        if (mapping[j] == \\(aq,\\(aq)\n"
9414 "            mapping[j] = \\(aq\\en\\(aq;\n"
9415
9416 #. type: Plain text
9417 #: build/C/man7/user_namespaces.7:861
9418 #, no-wrap
9419 msgid ""
9420 "    fd = open(map_file, O_RDWR);\n"
9421 "    if (fd == -1) {\n"
9422 "        fprintf(stderr, \"ERROR: open %s: %s\\en\", map_file,\n"
9423 "                strerror(errno));\n"
9424 "        exit(EXIT_FAILURE);\n"
9425 "    }\n"
9426 msgstr ""
9427 "    fd = open(map_file, O_RDWR);\n"
9428 "    if (fd == -1) {\n"
9429 "        fprintf(stderr, \"ERROR: open %s: %s\\en\", map_file,\n"
9430 "                strerror(errno));\n"
9431 "        exit(EXIT_FAILURE);\n"
9432 "    }\n"
9433
9434 #. type: Plain text
9435 #: build/C/man7/user_namespaces.7:867
9436 #, no-wrap
9437 msgid ""
9438 "    if (write(fd, mapping, map_len) != map_len) {\n"
9439 "        fprintf(stderr, \"ERROR: write %s: %s\\en\", map_file,\n"
9440 "                strerror(errno));\n"
9441 "        exit(EXIT_FAILURE);\n"
9442 "    }\n"
9443 msgstr ""
9444 "    if (write(fd, mapping, map_len) != map_len) {\n"
9445 "        fprintf(stderr, \"ERROR: write %s: %s\\en\", map_file,\n"
9446 "                strerror(errno));\n"
9447 "        exit(EXIT_FAILURE);\n"
9448 "    }\n"
9449
9450 #. type: Plain text
9451 #: build/C/man7/user_namespaces.7:870
9452 #, no-wrap
9453 msgid ""
9454 "    close(fd);\n"
9455 "}\n"
9456 msgstr ""
9457 "    close(fd);\n"
9458 "}\n"
9459
9460 #. type: Plain text
9461 #: build/C/man7/user_namespaces.7:876
9462 #, no-wrap
9463 msgid ""
9464 "static int              /* Start function for cloned child */\n"
9465 "childFunc(void *arg)\n"
9466 "{\n"
9467 "    struct child_args *args = (struct child_args *) arg;\n"
9468 "    char ch;\n"
9469 msgstr ""
9470 "static int              /* クローンされた子プロセスの開始関数 */\n"
9471 "childFunc(void *arg)\n"
9472 "{\n"
9473 "    struct child_args *args = (struct child_args *) arg;\n"
9474 "    char ch;\n"
9475
9476 #. type: Plain text
9477 #: build/C/man7/user_namespaces.7:881
9478 #, no-wrap
9479 msgid ""
9480 "    /* Wait until the parent has updated the UID and GID mappings.\n"
9481 "       See the comment in main(). We wait for end of file on a\n"
9482 "       pipe that will be closed by the parent process once it has\n"
9483 "       updated the mappings. */\n"
9484 msgstr ""
9485 "    /* 親プロセスが UID と GID マッピングを更新するまで待つ。\n"
9486 "       main() のコメントを参照。 パイプの end of file を待つ。\n"
9487 "       親プロセスが一旦マッピングを更新すると、\n"
9488 "       パイプはクローズされる。 */\n"
9489
9490 #. type: Plain text
9491 #: build/C/man7/user_namespaces.7:890
9492 #, no-wrap
9493 msgid ""
9494 "    close(args-E<gt>pipe_fd[1]);    /* Close our descriptor for the write\n"
9495 "                                   end of the pipe so that we see EOF\n"
9496 "                                   when parent closes its descriptor */\n"
9497 "    if (read(args-E<gt>pipe_fd[0], &ch, 1) != 0) {\n"
9498 "        fprintf(stderr,\n"
9499 "                \"Failure in child: read from pipe returned != 0\\en\");\n"
9500 "        exit(EXIT_FAILURE);\n"
9501 "    }\n"
9502 msgstr ""
9503 "    close(args-E<gt>pipe_fd[1]);    /* パイプのこちら側の書き込み端のディスク\n"
9504 "                                       リプターをクローズする。これにより\n"
9505 "                                       親プロセスがディスクリプタをクローズ\n"
9506 "                                       すると EOF が見えるようになる。 */\n"
9507 "    if (read(args-E<gt>pipe_fd[0], &ch, 1) != 0) {\n"
9508 "        fprintf(stderr,\n"
9509 "                \"Failure in child: read from pipe returned != 0\\en\");\n"
9510 "        exit(EXIT_FAILURE);\n"
9511 "    }\n"
9512
9513 #. type: Plain text
9514 #: build/C/man7/user_namespaces.7:892
9515 #, no-wrap
9516 msgid "    /* Execute a shell command */\n"
9517 msgstr "    /* シェルコマンドを実行する */\n"
9518
9519 #. type: Plain text
9520 #: build/C/man7/user_namespaces.7:897
9521 #, no-wrap
9522 msgid ""
9523 "    printf(\"About to exec %s\\en\", args-E<gt>argv[0]);\n"
9524 "    execvp(args-E<gt>argv[0], args-E<gt>argv);\n"
9525 "    errExit(\"execvp\");\n"
9526 "}\n"
9527 msgstr ""
9528 "    printf(\"About to exec %s\\en\", args-E<gt>argv[0]);\n"
9529 "    execvp(args-E<gt>argv[0], args-E<gt>argv);\n"
9530 "    errExit(\"execvp\");\n"
9531 "}\n"
9532
9533 #. type: Plain text
9534 #: build/C/man7/user_namespaces.7:899
9535 #, no-wrap
9536 msgid "#define STACK_SIZE (1024 * 1024)\n"
9537 msgstr "#define STACK_SIZE (1024 * 1024)\n"
9538
9539 #. type: Plain text
9540 #: build/C/man7/user_namespaces.7:901
9541 #, no-wrap
9542 msgid "static char child_stack[STACK_SIZE];    /* Space for child\\(aqs stack */\n"
9543 msgstr "static char child_stack[STACK_SIZE];    /* 子プロセスのスタック空間 */\n"
9544
9545 #. type: Plain text
9546 #: build/C/man7/user_namespaces.7:912
9547 #, no-wrap
9548 msgid ""
9549 "int\n"
9550 "main(int argc, char *argv[])\n"
9551 "{\n"
9552 "    int flags, opt, map_zero;\n"
9553 "    pid_t child_pid;\n"
9554 "    struct child_args args;\n"
9555 "    char *uid_map, *gid_map;\n"
9556 "    const int MAP_BUF_SIZE = 100;\n"
9557 "    char map_buf[MAP_BUF_SIZE];\n"
9558 "    char map_path[PATH_MAX];\n"
9559 msgstr ""
9560 "int\n"
9561 "main(int argc, char *argv[])\n"
9562 "{\n"
9563 "    int flags, opt, map_zero;\n"
9564 "    pid_t child_pid;\n"
9565 "    struct child_args args;\n"
9566 "    char *uid_map, *gid_map;\n"
9567 "    const int MAP_BUF_SIZE = 100;\n"
9568 "    char map_buf[MAP_BUF_SIZE];\n"
9569 "    char map_path[PATH_MAX];\n"
9570
9571 #. type: Plain text
9572 #: build/C/man7/user_namespaces.7:919
9573 #, no-wrap
9574 msgid ""
9575 "    /* Parse command-line options. The initial \\(aq+\\(aq character in\n"
9576 "       the final getopt() argument prevents GNU-style permutation\n"
9577 "       of command-line options. That\\(aqs useful, since sometimes\n"
9578 "       the \\(aqcommand\\(aq to be executed by this program itself\n"
9579 "       has command-line options. We don\\(aqt want getopt() to treat\n"
9580 "       those as options to this program. */\n"
9581 msgstr ""
9582 "    /* コマンドラインオプションを解析する。\n"
9583 "       最後の getopt() 引き数の最初の \\(aq+\\(aq 文字は\n"
9584 "       GNU 風のコマンドラインオプションの並び換えを防止する。\n"
9585 "       このプログラム自身が実行する「コマンド」にコマンドライン\n"
9586 "       オプションが含まれる場合があるからである。\n"
9587 "       getopt() にこれらをこのプログラムのオプションとして\n"
9588 "       扱ってほしくはないのだ。 */\n"
9589
9590 #. type: Plain text
9591 #: build/C/man7/user_namespaces.7:940
9592 #, no-wrap
9593 msgid ""
9594 "    flags = 0;\n"
9595 "    verbose = 0;\n"
9596 "    gid_map = NULL;\n"
9597 "    uid_map = NULL;\n"
9598 "    map_zero = 0;\n"
9599 "    while ((opt = getopt(argc, argv, \"+imnpuUM:G:zv\")) != -1) {\n"
9600 "        switch (opt) {\n"
9601 "        case \\(aqi\\(aq: flags |= CLONE_NEWIPC;        break;\n"
9602 "        case \\(aqm\\(aq: flags |= CLONE_NEWNS;         break;\n"
9603 "        case \\(aqn\\(aq: flags |= CLONE_NEWNET;        break;\n"
9604 "        case \\(aqp\\(aq: flags |= CLONE_NEWPID;        break;\n"
9605 "        case \\(aqu\\(aq: flags |= CLONE_NEWUTS;        break;\n"
9606 "        case \\(aqv\\(aq: verbose = 1;                  break;\n"
9607 "        case \\(aqz\\(aq: map_zero = 1;                 break;\n"
9608 "        case \\(aqM\\(aq: uid_map = optarg;             break;\n"
9609 "        case \\(aqG\\(aq: gid_map = optarg;             break;\n"
9610 "        case \\(aqU\\(aq: flags |= CLONE_NEWUSER;       break;\n"
9611 "        default:  usage(argv[0]);\n"
9612 "        }\n"
9613 "    }\n"
9614 msgstr ""
9615 "    flags = 0;\n"
9616 "    verbose = 0;\n"
9617 "    gid_map = NULL;\n"
9618 "    uid_map = NULL;\n"
9619 "    map_zero = 0;\n"
9620 "    while ((opt = getopt(argc, argv, \"+imnpuUM:G:zv\")) != -1) {\n"
9621 "        switch (opt) {\n"
9622 "        case \\(aqi\\(aq: flags |= CLONE_NEWIPC;        break;\n"
9623 "        case \\(aqm\\(aq: flags |= CLONE_NEWNS;         break;\n"
9624 "        case \\(aqn\\(aq: flags |= CLONE_NEWNET;        break;\n"
9625 "        case \\(aqp\\(aq: flags |= CLONE_NEWPID;        break;\n"
9626 "        case \\(aqu\\(aq: flags |= CLONE_NEWUTS;        break;\n"
9627 "        case \\(aqv\\(aq: verbose = 1;                  break;\n"
9628 "        case \\(aqz\\(aq: map_zero = 1;                 break;\n"
9629 "        case \\(aqM\\(aq: uid_map = optarg;             break;\n"
9630 "        case \\(aqG\\(aq: gid_map = optarg;             break;\n"
9631 "        case \\(aqU\\(aq: flags |= CLONE_NEWUSER;       break;\n"
9632 "        default:  usage(argv[0]);\n"
9633 "        }\n"
9634 "    }\n"
9635
9636 #. type: Plain text
9637 #: build/C/man7/user_namespaces.7:942
9638 #, no-wrap
9639 msgid "    /* -M or -G without -U is nonsensical */\n"
9640 msgstr "    /* -U なしの -M や -G の指定は意味がない */\n"
9641
9642 #. type: Plain text
9643 #: build/C/man7/user_namespaces.7:947
9644 #, no-wrap
9645 msgid ""
9646 "    if (((uid_map != NULL || gid_map != NULL || map_zero) &&\n"
9647 "                !(flags & CLONE_NEWUSER)) ||\n"
9648 "            (map_zero && (uid_map != NULL || gid_map != NULL)))\n"
9649 "        usage(argv[0]);\n"
9650 msgstr ""
9651 "    if (((uid_map != NULL || gid_map != NULL || map_zero) &&\n"
9652 "                !(flags & CLONE_NEWUSER)) ||\n"
9653 "            (map_zero && (uid_map != NULL || gid_map != NULL)))\n"
9654 "        usage(argv[0]);\n"
9655
9656 #. type: Plain text
9657 #: build/C/man7/user_namespaces.7:949
9658 #, no-wrap
9659 msgid "    args.argv = &argv[optind];\n"
9660 msgstr "    args.argv = &argv[optind];\n"
9661
9662 #. type: Plain text
9663 #: build/C/man7/user_namespaces.7:959
9664 #, no-wrap
9665 msgid ""
9666 "    /* We use a pipe to synchronize the parent and child, in order to\n"
9667 "       ensure that the parent sets the UID and GID maps before the child\n"
9668 "       calls execve(). This ensures that the child maintains its\n"
9669 "       capabilities during the execve() in the common case where we\n"
9670 "       want to map the child\\(aqs effective user ID to 0 in the new user\n"
9671 "       namespace. Without this synchronization, the child would lose\n"
9672 "       its capabilities if it performed an execve() with nonzero\n"
9673 "       user IDs (see the capabilities(7) man page for details of the\n"
9674 "       transformation of a process\\(aqs capabilities during execve()). */\n"
9675 msgstr ""
9676 "    /* 親プログラムと子プロセスを同期するためにパイプを使っている。\n"
9677 "       これは、子プロセスが execve() を呼び出す前に、親プロセスにより\n"
9678 "       UID と GID マップが設定されることを保証するためである。\n"
9679 "       これにより、新しいユーザー名前空間において子プロセスの実効\n"
9680 "       ユーザー ID を 0 にマッピングしたいという通常の状況で、\n"
9681 "       子プロセスが execve() 実行中にそのケーパビリティを維持する\n"
9682 "       ことができる。 この同期を行わないと、 0 以外のユーザー ID で\n"
9683 "       execve() を実行した際に、子プロセスがそのケーパビリティを失う\n"
9684 "       ことになる (execve() 実行中のプロセスのケーパビリティの変化の\n"
9685 "       詳細については capabilities(7) マニュアルページを参照)。 */\n"
9686
9687 #. type: Plain text
9688 #: build/C/man7/user_namespaces.7:962
9689 #, no-wrap
9690 msgid ""
9691 "    if (pipe(args.pipe_fd) == -1)\n"
9692 "        errExit(\"pipe\");\n"
9693 msgstr ""
9694 "    if (pipe(args.pipe_fd) == -1)\n"
9695 "        errExit(\"pipe\");\n"
9696
9697 #. type: Plain text
9698 #: build/C/man7/user_namespaces.7:964
9699 #, no-wrap
9700 msgid "    /* Create the child in new namespace(s) */\n"
9701 msgstr "    /* 新しい名前空間で子プロセスを作成する */\n"
9702
9703 #. type: Plain text
9704 #: build/C/man7/user_namespaces.7:969
9705 #, no-wrap
9706 msgid ""
9707 "    child_pid = clone(childFunc, child_stack + STACK_SIZE,\n"
9708 "                      flags | SIGCHLD, &args);\n"
9709 "    if (child_pid == -1)\n"
9710 "        errExit(\"clone\");\n"
9711 msgstr ""
9712 "    child_pid = clone(childFunc, child_stack + STACK_SIZE,\n"
9713 "                      flags | SIGCHLD, &args);\n"
9714 "    if (child_pid == -1)\n"
9715 "        errExit(\"clone\");\n"
9716
9717 #. type: Plain text
9718 #: build/C/man7/user_namespaces.7:971
9719 #, no-wrap
9720 msgid "    /* Parent falls through to here */\n"
9721 msgstr "    /* 親プロセスはここを実行する */\n"
9722
9723 #. type: Plain text
9724 #: build/C/man7/user_namespaces.7:975
9725 #, no-wrap
9726 msgid ""
9727 "    if (verbose)\n"
9728 "        printf(\"%s: PID of child created by clone() is %ld\\en\",\n"
9729 "                argv[0], (long) child_pid);\n"
9730 msgstr ""
9731 "    if (verbose)\n"
9732 "        printf(\"%s: PID of child created by clone() is %ld\\en\",\n"
9733 "                argv[0], (long) child_pid);\n"
9734
9735 #. type: Plain text
9736 #: build/C/man7/user_namespaces.7:977
9737 #, no-wrap
9738 msgid "    /* Update the UID and GID maps in the child */\n"
9739 msgstr "    /* 子プロセスの UID と GID のマッピングを更新する */\n"
9740
9741 #. type: Plain text
9742 #: build/C/man7/user_namespaces.7:996
9743 #, no-wrap
9744 msgid ""
9745 "    if (uid_map != NULL || map_zero) {\n"
9746 "        snprintf(map_path, PATH_MAX, \"/proc/%ld/uid_map\",\n"
9747 "                (long) child_pid);\n"
9748 "        if (map_zero) {\n"
9749 "            snprintf(map_buf, MAP_BUF_SIZE, \"0 %ld 1\", (long) getuid());\n"
9750 "            uid_map = map_buf;\n"
9751 "        }\n"
9752 "        update_map(uid_map, map_path);\n"
9753 "    }\n"
9754 "    if (gid_map != NULL || map_zero) {\n"
9755 "        snprintf(map_path, PATH_MAX, \"/proc/%ld/gid_map\",\n"
9756 "                (long) child_pid);\n"
9757 "        if (map_zero) {\n"
9758 "            snprintf(map_buf, MAP_BUF_SIZE, \"0 %ld 1\", (long) getgid());\n"
9759 "            gid_map = map_buf;\n"
9760 "        }\n"
9761 "        update_map(gid_map, map_path);\n"
9762 "    }\n"
9763 msgstr ""
9764 "    if (uid_map != NULL || map_zero) {\n"
9765 "        snprintf(map_path, PATH_MAX, \"/proc/%ld/uid_map\",\n"
9766 "                (long) child_pid);\n"
9767 "        if (map_zero) {\n"
9768 "            snprintf(map_buf, MAP_BUF_SIZE, \"0 %ld 1\", (long) getuid());\n"
9769 "            uid_map = map_buf;\n"
9770 "        }\n"
9771 "        update_map(uid_map, map_path);\n"
9772 "    }\n"
9773 "    if (gid_map != NULL || map_zero) {\n"
9774 "        snprintf(map_path, PATH_MAX, \"/proc/%ld/gid_map\",\n"
9775 "                (long) child_pid);\n"
9776 "        if (map_zero) {\n"
9777 "            snprintf(map_buf, MAP_BUF_SIZE, \"0 %ld 1\", (long) getgid());\n"
9778 "            gid_map = map_buf;\n"
9779 "        }\n"
9780 "        update_map(gid_map, map_path);\n"
9781 "    }\n"
9782
9783 #. type: Plain text
9784 #: build/C/man7/user_namespaces.7:999
9785 #, no-wrap
9786 msgid ""
9787 "    /* Close the write end of the pipe, to signal to the child that we\n"
9788 "       have updated the UID and GID maps */\n"
9789 msgstr ""
9790 "    /* パイプの書き込み端をクローズし、子プロセスに UID と GID の\n"
9791 "       マッピングが更新されたことを知らせる */\n"
9792
9793 #. type: Plain text
9794 #: build/C/man7/user_namespaces.7:1001
9795 #, no-wrap
9796 msgid "    close(args.pipe_fd[1]);\n"
9797 msgstr "    close(args.pipe_fd[1]);\n"
9798
9799 #. type: Plain text
9800 #: build/C/man7/user_namespaces.7:1004
9801 #, no-wrap
9802 msgid ""
9803 "    if (waitpid(child_pid, NULL, 0) == -1)      /* Wait for child */\n"
9804 "        errExit(\"waitpid\");\n"
9805 msgstr ""
9806 "    if (waitpid(child_pid, NULL, 0) == -1)      /* 子プロセスを待つ */\n"
9807 "        errExit(\"waitpid\");\n"
9808
9809 #. type: Plain text
9810 #: build/C/man7/user_namespaces.7:1007
9811 #, no-wrap
9812 msgid ""
9813 "    if (verbose)\n"
9814 "        printf(\"%s: terminating\\en\", argv[0]);\n"
9815 msgstr ""
9816 "    if (verbose)\n"
9817 "        printf(\"%s: terminating\\en\", argv[0]);\n"
9818
9819 #. type: Plain text
9820 #: build/C/man7/user_namespaces.7:1010
9821 #, no-wrap
9822 msgid ""
9823 "    exit(EXIT_SUCCESS);\n"
9824 "}\n"
9825 msgstr ""
9826 "    exit(EXIT_SUCCESS);\n"
9827 "}\n"
9828
9829 #.  From the shadow package
9830 #.  From the shadow package
9831 #.  From the shadow package
9832 #.  From the shadow package
9833 #. type: Plain text
9834 #: build/C/man7/user_namespaces.7:1024
9835 msgid "B<newgidmap>(1), B<newuidmap>(1), B<clone>(2), B<setns>(2), B<unshare>(2), B<proc>(5), B<subgid>(5), B<subuid>(5), B<credentials>(7), B<capabilities>(7), B<namespaces>(7), B<pid_namespaces>(7)"
9836 msgstr "B<newgidmap>(1), B<newuidmap>(1), B<clone>(2), B<setns>(2), B<unshare>(2), B<proc>(5), B<subgid>(5), B<subuid>(5), B<credentials>(7), B<capabilities>(7), B<namespaces>(7), B<pid_namespaces>(7)"
9837
9838 #. type: Plain text
9839 #: build/C/man7/user_namespaces.7:1027
9840 msgid "The kernel source file I<Documentation/namespaces/resource-control.txt>."
9841 msgstr "カーネルのソースファイル I<Documentation/namespaces/resource-control.txt>"
9842
9843 #. type: TH
9844 #: build/C/man2/seccomp.2:27
9845 #, no-wrap
9846 msgid "SECCOMP"
9847 msgstr "SECCOMP"
9848
9849 #. type: Plain text
9850 #: build/C/man2/seccomp.2:30
9851 msgid "seccomp - operate on Secure Computing state of the process"
9852 msgstr ""
9853
9854 #.  Kees Cook noted: Anything that uses SECCOMP_RET_TRACE returns will
9855 #.                   need <sys/ptrace.h>
9856 #. type: Plain text
9857 #: build/C/man2/seccomp.2:39
9858 #, no-wrap
9859 msgid ""
9860 "B<#include E<lt>linux/seccomp.hE<gt>>\n"
9861 "B<#include E<lt>linux/filter.hE<gt>>\n"
9862 "B<#include E<lt>linux/audit.hE<gt>>\n"
9863 "B<#include E<lt>linux/signal.hE<gt>>\n"
9864 "B<#include E<lt>sys/ptrace.hE<gt>>\n"
9865 msgstr ""
9866 "B<#include E<lt>linux/seccomp.hE<gt>>\n"
9867 "B<#include E<lt>linux/filter.hE<gt>>\n"
9868 "B<#include E<lt>linux/audit.hE<gt>>\n"
9869 "B<#include E<lt>linux/signal.hE<gt>>\n"
9870 "B<#include E<lt>sys/ptrace.hE<gt>>\n"
9871
9872 #. type: Plain text
9873 #: build/C/man2/seccomp.2:42
9874 #, no-wrap
9875 msgid "B<int seccomp(unsigned int >I<operation>B<, unsigned int >I<flags>B<, void *>I<args>B<);>\n"
9876 msgstr "B<int seccomp(unsigned int >I<operation>B<, unsigned int >I<flags>B<, void *>I<args>B<);>\n"
9877
9878 #. type: Plain text
9879 #: build/C/man2/seccomp.2:48
9880 msgid "The B<seccomp>()  system call operates on the Secure Computing (seccomp) state of the calling process."
9881 msgstr ""
9882
9883 #. type: Plain text
9884 #: build/C/man2/seccomp.2:52
9885 msgid "Currently, Linux supports the following I<operation> values:"
9886 msgstr ""
9887
9888 #. type: TP
9889 #: build/C/man2/seccomp.2:52
9890 #, no-wrap
9891 msgid "B<SECCOMP_SET_MODE_STRICT>"
9892 msgstr "B<SECCOMP_SET_MODE_STRICT>"
9893
9894 #. type: Plain text
9895 #: build/C/man2/seccomp.2:66
9896 msgid "The only system calls that the calling thread is permitted to make are B<read>(2), B<write>(2), B<_exit>(2), and B<sigreturn>(2).  Other system calls result in the delivery of a B<SIGKILL> signal.  Strict secure computing mode is useful for number-crunching applications that may need to execute untrusted byte code, perhaps obtained by reading from a pipe or socket."
9897 msgstr ""
9898
9899 #. type: Plain text
9900 #: build/C/man2/seccomp.2:70
9901 msgid "This operation is available only if the kernel is configured with B<CONFIG_SECCOMP> enabled."
9902 msgstr ""
9903
9904 #. type: Plain text
9905 #: build/C/man2/seccomp.2:76
9906 msgid "The value of I<flags> must be 0, and I<args> must be NULL."
9907 msgstr ""
9908
9909 #. type: Plain text
9910 #: build/C/man2/seccomp.2:78
9911 msgid "This operation is functionally identical to the call:"
9912 msgstr ""
9913
9914 #. type: Plain text
9915 #: build/C/man2/seccomp.2:80
9916 #, no-wrap
9917 msgid "    prctl(PR_SET_SECCOMP, SECCOMP_MODE_STRICT);\n"
9918 msgstr "    prctl(PR_SET_SECCOMP, SECCOMP_MODE_STRICT);\n"
9919
9920 #. type: TP
9921 #: build/C/man2/seccomp.2:80
9922 #, no-wrap
9923 msgid "B<SECCOMP_SET_MODE_FILTER>"
9924 msgstr "B<SECCOMP_SET_MODE_FILTER>"
9925
9926 #. type: Plain text
9927 #: build/C/man2/seccomp.2:95
9928 msgid "The system calls allowed are defined by a pointer to a Berkeley Packet Filter (BPF) passed via I<args>.  This argument is a pointer to a I<struct\\ sock_fprog>; it can be designed to filter arbitrary system calls and system call arguments.  If the filter is invalid, B<seccomp>()  fails, returning B<EINVAL> in I<errno>."
9929 msgstr ""
9930
9931 #. type: Plain text
9932 #: build/C/man2/seccomp.2:107
9933 msgid "If B<fork>(2)  or B<clone>(2)  is allowed by the filter, any child processes will be constrained to the same system call filters as the parent.  If B<execve>(2)  is allowed, the existing filters will be preserved across a call to B<execve>(2)."
9934 msgstr ""
9935
9936 #. type: Plain text
9937 #: build/C/man2/seccomp.2:117
9938 msgid "In order to use the B<SECCOMP_SET_MODE_FILTER> operation, either the caller must have the B<CAP_SYS_ADMIN> capability, or the thread must already have the I<no_new_privs> bit set.  If that bit was not already set by an ancestor of this thread, the thread must make the following call:"
9939 msgstr ""
9940
9941 #. type: Plain text
9942 #: build/C/man2/seccomp.2:119
9943 #, no-wrap
9944 msgid "    prctl(PR_SET_NO_NEW_PRIVS, 1);\n"
9945 msgstr "    prctl(PR_SET_NO_NEW_PRIVS, 1);\n"
9946
9947 #. type: Plain text
9948 #: build/C/man2/seccomp.2:138
9949 msgid "Otherwise, the B<SECCOMP_SET_MODE_FILTER> operation will fail and return B<EACCES> in I<errno>.  This requirement ensures that an unprivileged process cannot apply a malicious filter and then invoke a set-user-ID or other privileged program using B<execve>(2), thus potentially compromising that program.  (Such a malicious filter might, for example, cause an attempt to use B<setuid>(2)  to set the caller's user IDs to non-zero values to instead return 0 without actually making the system call.  Thus, the program might be tricked into retaining superuser privileges in circumstances where it is possible to influence it to do dangerous things because it did not actually drop privileges.)"
9950 msgstr ""
9951
9952 #. type: Plain text
9953 #: build/C/man2/seccomp.2:146
9954 msgid "If B<prctl>(2)  or B<seccomp>(2)  is allowed by the attached filter, further filters may be added.  This will increase evaluation time, but allows for further reduction of the attack surface during execution of a thread."
9955 msgstr ""
9956
9957 #. type: Plain text
9958 #: build/C/man2/seccomp.2:152
9959 msgid "The B<SECCOMP_SET_MODE_FILTER> operation is available only if the kernel is configured with B<CONFIG_SECCOMP_FILTER> enabled."
9960 msgstr ""
9961
9962 #. type: Plain text
9963 #: build/C/man2/seccomp.2:156
9964 msgid "When I<flags> is 0, this operation is functionally identical to the call:"
9965 msgstr ""
9966
9967 #. type: Plain text
9968 #: build/C/man2/seccomp.2:158
9969 #, no-wrap
9970 msgid "    prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, args);\n"
9971 msgstr "    prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, args);\n"
9972
9973 #. type: Plain text
9974 #: build/C/man2/seccomp.2:162
9975 msgid "The recognized I<flags> are:"
9976 msgstr ""
9977
9978 #. type: TP
9979 #: build/C/man2/seccomp.2:163
9980 #, no-wrap
9981 msgid "B<SECCOMP_FILTER_FLAG_TSYNC>"
9982 msgstr "B<SECCOMP_FILTER_FLAG_TSYNC>"
9983
9984 #. type: Plain text
9985 #: build/C/man2/seccomp.2:171
9986 msgid "When adding a new filter, synchronize all other threads of the calling process to the same seccomp filter tree.  A \"filter tree\" is the ordered list of filters attached to a thread.  (Attaching identical filters in separate B<seccomp>()  calls results in different filters from this perspective.)"
9987 msgstr ""
9988
9989 #. type: Plain text
9990 #: build/C/man2/seccomp.2:179
9991 msgid "If any thread cannot synchronize to the same filter tree, the call will not attach the new seccomp filter, and will fail, returning the first thread ID found that cannot synchronize.  Synchronization will fail if another thread in the same process is in B<SECCOMP_MODE_STRICT> or if it has attached new seccomp filters to itself, diverging from the calling thread's filter tree."
9992 msgstr ""
9993
9994 #. type: SS
9995 #: build/C/man2/seccomp.2:180
9996 #, no-wrap
9997 msgid "Filters"
9998 msgstr ""
9999
10000 #. type: Plain text
10001 #: build/C/man2/seccomp.2:185
10002 msgid "When adding filters via B<SECCOMP_SET_MODE_FILTER>, I<args> points to a filter program:"
10003 msgstr ""
10004
10005 #. type: Plain text
10006 #: build/C/man2/seccomp.2:193
10007 #, no-wrap
10008 msgid ""
10009 "struct sock_fprog {\n"
10010 "    unsigned short      len;    /* Number of BPF instructions */\n"
10011 "    struct sock_filter *filter; /* Pointer to array of\n"
10012 "                                   BPF instructions */\n"
10013 "};\n"
10014 msgstr ""
10015 "struct sock_fprog {\n"
10016 "    unsigned short      len;    /* Number of BPF instructions */\n"
10017 "    struct sock_filter *filter; /* Pointer to array of\n"
10018 "                                   BPF instructions */\n"
10019 "};\n"
10020
10021 #. type: Plain text
10022 #: build/C/man2/seccomp.2:197
10023 msgid "Each program must contain one or more BPF instructions:"
10024 msgstr ""
10025
10026 #. type: Plain text
10027 #: build/C/man2/seccomp.2:206
10028 #, no-wrap
10029 msgid ""
10030 "struct sock_filter {            /* Filter block */\n"
10031 "    __u16 code;                 /* Actual filter code */\n"
10032 "    __u8  jt;                   /* Jump true */\n"
10033 "    __u8  jf;                   /* Jump false */\n"
10034 "    __u32 k;                    /* Generic multiuse field */\n"
10035 "};\n"
10036 msgstr ""
10037 "struct sock_filter {            /* Filter block */\n"
10038 "    __u16 code;                 /* Actual filter code */\n"
10039 "    __u8  jt;                   /* Jump true */\n"
10040 "    __u8  jf;                   /* Jump false */\n"
10041 "    __u32 k;                    /* Generic multiuse field */\n"
10042 "};\n"
10043
10044 #. type: Plain text
10045 #: build/C/man2/seccomp.2:213
10046 msgid "When executing the instructions, the BPF program operates on the system call information made available (i.e., use the B<BPF_ABS> addressing mode) as a buffer of the following form:"
10047 msgstr ""
10048
10049 #. type: Plain text
10050 #: build/C/man2/seccomp.2:223
10051 #, no-wrap
10052 msgid ""
10053 "struct seccomp_data {\n"
10054 "    int   nr;                   /* System call number */\n"
10055 "    __u32 arch;                 /* AUDIT_ARCH_* value\n"
10056 "                                   (see E<lt>linux/audit.hE<gt>) */\n"
10057 "    __u64 instruction_pointer;  /* CPU instruction pointer */\n"
10058 "    __u64 args[6];              /* Up to 6 system call arguments */\n"
10059 "};\n"
10060 msgstr ""
10061 "struct seccomp_data {\n"
10062 "    int   nr;                   /* System call number */\n"
10063 "    __u32 arch;                 /* AUDIT_ARCH_* value\n"
10064 "                                   (see E<lt>linux/audit.hE<gt>) */\n"
10065 "    __u64 instruction_pointer;  /* CPU instruction pointer */\n"
10066 "    __u64 args[6];              /* Up to 6 system call arguments */\n"
10067 "};\n"
10068
10069 #. type: Plain text
10070 #: build/C/man2/seccomp.2:234
10071 msgid "A seccomp filter returns a 32-bit value consisting of two parts: the most significant 16 bits (corresponding to the mask defined by the constant B<SECCOMP_RET_ACTION>)  contain one of the \"action\" values listed below; the least significant 16-bits (defined by the constant B<SECCOMP_RET_DATA>)  are \"data\" to be associated with this return value."
10072 msgstr ""
10073
10074 #. type: Plain text
10075 #: build/C/man2/seccomp.2:242
10076 msgid "If multiple filters exist, they are all executed, in reverse order of their addition to the filter tree (i.e., the most recently installed filter is executed first).  The return value for the evaluation of a given system call is the first-seen B<SECCOMP_RET_ACTION> value of highest precedence (along with its accompanying data)  returned by execution of all of the filters."
10077 msgstr ""
10078
10079 #. type: Plain text
10080 #: build/C/man2/seccomp.2:245
10081 msgid "In decreasing order of precedence, the values that may be returned by a seccomp filter are:"
10082 msgstr ""
10083
10084 #. type: TP
10085 #: build/C/man2/seccomp.2:245
10086 #, no-wrap
10087 msgid "B<SECCOMP_RET_KILL>"
10088 msgstr "B<SECCOMP_RET_KILL>"
10089
10090 #. type: Plain text
10091 #: build/C/man2/seccomp.2:254
10092 msgid "This value results in the process exiting immediately without executing the system call.  The process terminates as though killed by a B<SIGSYS> signal (I<not> B<SIGKILL>)."
10093 msgstr ""
10094
10095 #. type: TP
10096 #: build/C/man2/seccomp.2:254
10097 #, no-wrap
10098 msgid "B<SECCOMP_RET_TRAP>"
10099 msgstr "B<SECCOMP_RET_TRAP>"
10100
10101 #. type: Plain text
10102 #: build/C/man2/seccomp.2:264
10103 msgid "This value results in the kernel sending a B<SIGSYS> signal to the triggering process without executing the system call.  Various fields will be set in the I<siginfo_t> structure (see B<sigaction>(2))  associated with signal:"
10104 msgstr ""
10105
10106 #. type: Plain text
10107 #: build/C/man2/seccomp.2:269
10108 msgid "I<si_signo> will contain B<SIGSYS>."
10109 msgstr ""
10110
10111 #. type: Plain text
10112 #: build/C/man2/seccomp.2:272
10113 msgid "I<si_call_addr> will show the address of the system call instruction."
10114 msgstr ""
10115
10116 #. type: Plain text
10117 #: build/C/man2/seccomp.2:277
10118 msgid "I<si_syscall> and I<si_arch> will indicate which system call was attempted."
10119 msgstr ""
10120
10121 #. type: Plain text
10122 #: build/C/man2/seccomp.2:281
10123 msgid "I<si_code> will contain B<SYS_SECCOMP>."
10124 msgstr ""
10125
10126 #. type: Plain text
10127 #: build/C/man2/seccomp.2:286
10128 msgid "I<si_errno> will contain the B<SECCOMP_RET_DATA> portion of the filter return value."
10129 msgstr ""
10130
10131 #. type: Plain text
10132 #: build/C/man2/seccomp.2:295
10133 msgid "The program counter will be as though the system call happened (i.e., it will not point to the system call instruction).  The return value register will contain an architecture-dependent value; if resuming execution, set it to something appropriate for the system call.  (The architecture dependency is because replacing it with B<ENOSYS> could overwrite some useful information.)"
10134 msgstr ""
10135
10136 #. type: TP
10137 #: build/C/man2/seccomp.2:295
10138 #, no-wrap
10139 msgid "B<SECCOMP_RET_ERRNO>"
10140 msgstr "B<SECCOMP_RET_ERRNO>"
10141
10142 #. type: Plain text
10143 #: build/C/man2/seccomp.2:302
10144 msgid "This value results in the B<SECCOMP_RET_DATA> portion of the filter's return value being passed to user space as the I<errno> value without executing the system call."
10145 msgstr ""
10146
10147 #. type: TP
10148 #: build/C/man2/seccomp.2:302
10149 #, no-wrap
10150 msgid "B<SECCOMP_RET_TRACE>"
10151 msgstr "B<SECCOMP_RET_TRACE>"
10152
10153 #. type: Plain text
10154 #: build/C/man2/seccomp.2:312
10155 msgid "When returned, this value will cause the kernel to attempt to notify a B<ptrace>(2)-based tracer prior to executing the system call.  If there is no tracer present, the system call is not executed and returns a failure status with I<errno> set to B<ENOSYS>."
10156 msgstr ""
10157
10158 #. type: Plain text
10159 #: build/C/man2/seccomp.2:323
10160 msgid "A tracer will be notified if it requests B<PTRACE_O_TRACESECCOMP> using I<ptrace(PTRACE_SETOPTIONS)>.  The tracer will be notified of a B<PTRACE_EVENT_SECCOMP> and the B<SECCOMP_RET_DATA> portion of the filter's return value will be available to the tracer via B<PTRACE_GETEVENTMSG>."
10161 msgstr ""
10162
10163 #. type: Plain text
10164 #: build/C/man2/seccomp.2:330
10165 msgid "The tracer can skip the system call by changing the system call number to -1.  Alternatively, the tracer can change the system call requested by changing the system call to a valid system call number.  If the tracer asks to skip the system call, then the system call will appear to return the value that the tracer puts in the return value register."
10166 msgstr ""
10167
10168 #. type: Plain text
10169 #: build/C/man2/seccomp.2:339
10170 msgid "The seccomp check will not be run again after the tracer is notified.  (This means that seccomp-based sandboxes B<must not> allow use of B<ptrace>(2)\\(emeven of other sandboxed processes\\(emwithout extreme care; ptracers can use this mechanism to escape from the seccomp sandbox.)"
10171 msgstr ""
10172
10173 #. type: TP
10174 #: build/C/man2/seccomp.2:339
10175 #, no-wrap
10176 msgid "B<SECCOMP_RET_ALLOW>"
10177 msgstr "B<SECCOMP_RET_ALLOW>"
10178
10179 #. type: Plain text
10180 #: build/C/man2/seccomp.2:342
10181 msgid "This value results in the system call being executed."
10182 msgstr ""
10183
10184 #. type: Plain text
10185 #: build/C/man2/seccomp.2:358
10186 msgid "On success, B<seccomp>()  returns 0.  On error, if B<SECCOMP_FILTER_FLAG_TSYNC> was used, the return value is the ID of the thread that caused the synchronization failure.  (This ID is a kernel thread ID of the type returned by B<clone>(2)  and B<gettid>(2).)  On other errors, -1 is returned, and I<errno> is set to indicate the cause of the error."
10187 msgstr ""
10188
10189 #. type: Plain text
10190 #: build/C/man2/seccomp.2:361
10191 msgid "B<seccomp>()  can fail for the following reasons:"
10192 msgstr "B<seccomp>()  は以下のエラーで失敗する。"
10193
10194 #. type: TP
10195 #: build/C/man2/seccomp.2:361
10196 #, no-wrap
10197 msgid "B<EACCESS>"
10198 msgstr "B<EACCESS>"
10199
10200 #. type: Plain text
10201 #: build/C/man2/seccomp.2:369
10202 msgid "The caller did not have the B<CAP_SYS_ADMIN> capability, or had not set I<no_new_privs> before using B<SECCOMP_SET_MODE_FILTER>."
10203 msgstr ""
10204
10205 #. type: Plain text
10206 #: build/C/man2/seccomp.2:373
10207 msgid "I<args> was not a valid address."
10208 msgstr ""
10209
10210 #. type: Plain text
10211 #: build/C/man2/seccomp.2:380
10212 msgid "I<operation> is unknown; or I<flags> are invalid for the given I<operation>."
10213 msgstr ""
10214
10215 #. type: Plain text
10216 #: build/C/man2/seccomp.2:387
10217 msgid "I<operation> included B<BPF_ABS>, but the specified offset was not aligned to a 32-bit boundary or exceeded I<sizeof(struct\\ seccomp_data)>."
10218 msgstr ""
10219
10220 #.  See kernel/seccomp.c::seccomp_may_assign_mode() in 3.18 sources
10221 #. type: Plain text
10222 #: build/C/man2/seccomp.2:393
10223 msgid "A secure computing mode has already been set, and I<operation> differs from the existing setting."
10224 msgstr ""
10225
10226 #.  See stub kernel/seccomp.c::seccomp_set_mode_filter() in 3.18 sources
10227 #. type: Plain text
10228 #: build/C/man2/seccomp.2:402
10229 msgid "I<operation> specified B<SECCOMP_SET_MODE_FILTER>, but the kernel was not built with B<CONFIG_SECCOMP_FILTER> enabled."
10230 msgstr ""
10231
10232 #. type: Plain text
10233 #: build/C/man2/seccomp.2:413
10234 msgid "I<operation> specified B<SECCOMP_SET_MODE_FILTER>, but the filter program pointed to by I<args> was not valid or the length of the filter program was zero or exceeded B<BPF_MAXINSNS> (4096) instructions.  B<EINVAL>"
10235 msgstr ""
10236
10237 #.  ENOMEM in kernel/seccomp.c::seccomp_attach_filter() in 3.18 sources
10238 #. type: Plain text
10239 #: build/C/man2/seccomp.2:426
10240 msgid "The total length of all filter programs attached to the calling thread would exceed B<MAX_INSNS_PER_PATH> (32768) instructions.  Note that for the purposes of calculating this limit, each already existing filter program incurs an overhead penalty of 4 instructions."
10241 msgstr ""
10242
10243 #. type: Plain text
10244 #: build/C/man2/seccomp.2:430
10245 msgid "Another thread caused a failure during thread sync, but its ID could not be determined."
10246 msgstr ""
10247
10248 #.  FIXME . Add glibc version
10249 #. type: Plain text
10250 #: build/C/man2/seccomp.2:435
10251 msgid "The B<seccomp>()  system call first appeared in Linux 3.17."
10252 msgstr "B<seccomp>() システムコールは Linux 3.17 で初めて登場した。"
10253
10254 #. type: Plain text
10255 #: build/C/man2/seccomp.2:439
10256 msgid "The B<seccomp>()  system call is a nonstandard Linux extension."
10257 msgstr "B<seccomp>() システムコールは非標準の Linux 拡張である。"
10258
10259 #. type: Plain text
10260 #: build/C/man2/seccomp.2:446
10261 msgid "The I<Seccomp> field of the I</proc/[pid]/status> file provides a method of viewing the seccomp mode of a process; see B<proc>(5)."
10262 msgstr ""
10263
10264 #. type: Plain text
10265 #: build/C/man2/seccomp.2:453
10266 msgid "B<seccomp>()  provides a superset of the functionality provided by the B<prctl>(2)  B<PR_SET_SECCOMP> operation (which does not support I<flags>)."
10267 msgstr ""
10268
10269 #. type: SS
10270 #: build/C/man2/seccomp.2:453
10271 #, no-wrap
10272 msgid "Seccomp-specific BPF details"
10273 msgstr ""
10274
10275 #. type: Plain text
10276 #: build/C/man2/seccomp.2:455
10277 msgid "Note the following BPF details specific to seccomp filters:"
10278 msgstr ""
10279
10280 #. type: Plain text
10281 #: build/C/man2/seccomp.2:463
10282 msgid "The B<BPF_H> and B<BPF_B> size modifiers are not supported: all operations must load and store (4-byte) words (B<BPF_W>)."
10283 msgstr ""
10284
10285 #. type: Plain text
10286 #: build/C/man2/seccomp.2:469
10287 msgid "To access the contents of the I<seccomp_data> buffer, use the B<BPF_ABS> addressing mode modifier."
10288 msgstr ""
10289
10290 #. type: Plain text
10291 #: build/C/man2/seccomp.2:476
10292 msgid "The B<BPF_LEN> addressing mode modifier yields an immediate mode operand whose value is the size of the I<seccomp_data> buffer."
10293 msgstr ""
10294
10295 #. type: Plain text
10296 #: build/C/man2/seccomp.2:482
10297 msgid "The program below accepts four or more arguments.  The first three arguments are a system call number, a numeric architecture identifier, and an error number.  The program uses these values to construct a BPF filter that is used at run time to perform the following checks:"
10298 msgstr ""
10299
10300 #. type: IP
10301 #: build/C/man2/seccomp.2:482
10302 #, no-wrap
10303 msgid "[1]"
10304 msgstr "[1]"
10305
10306 #. type: Plain text
10307 #: build/C/man2/seccomp.2:486
10308 msgid "If the program is not running on the specified architecture, the BPF filter causes system calls to fail with the error B<ENOSYS>."
10309 msgstr ""
10310
10311 #. type: IP
10312 #: build/C/man2/seccomp.2:486
10313 #, no-wrap
10314 msgid "[2]"
10315 msgstr "[2]"
10316
10317 #. type: Plain text
10318 #: build/C/man2/seccomp.2:491
10319 msgid "If the program attempts to execute the system call with the specified number, the BPF filter causes the system call to fail, with I<errno> being set to the specified error number."
10320 msgstr ""
10321
10322 #. type: Plain text
10323 #: build/C/man2/seccomp.2:500
10324 msgid "The remaining command-line arguments specify the pathname and additional arguments of a program that the example program should attempt to execute using B<execve>(3)  (a library function that employs the B<execve>(2)  system call).  Some example runs of the program are shown below."
10325 msgstr ""
10326
10327 #. type: Plain text
10328 #: build/C/man2/seccomp.2:504
10329 msgid "First, we display the architecture that we are running on (x86-64)  and then construct a shell function that looks up system call numbers on this architecture:"
10330 msgstr ""
10331
10332 #. type: Plain text
10333 #: build/C/man2/seccomp.2:513
10334 #, no-wrap
10335 msgid ""
10336 "$ B<uname -m>\n"
10337 "x86_64\n"
10338 "$ B<syscall_nr() {\n"
10339 "    cat /usr/src/linux/arch/x86/syscalls/syscall_64.tbl | \\e\n"
10340 "    awk '$2 != \"x32\" && $3 == \"'$1'\" { print $1 }'\n"
10341 "}>\n"
10342 msgstr ""
10343 "$ B<uname -m>\n"
10344 "x86_64\n"
10345 "$ B<syscall_nr() {\n"
10346 "    cat /usr/src/linux/arch/x86/syscalls/syscall_64.tbl | \\e\n"
10347 "    awk '$2 != \"x32\" && $3 == \"'$1'\" { print $1 }'\n"
10348 "}>\n"
10349
10350 #. type: Plain text
10351 #: build/C/man2/seccomp.2:520
10352 msgid "When the BPF filter rejects a system call (case [2] above), it causes the system call to fail with the error number specified on the command line.  In the experiments shown here, we'll use error number 99:"
10353 msgstr ""
10354
10355 #. type: Plain text
10356 #: build/C/man2/seccomp.2:525
10357 #, no-wrap
10358 msgid ""
10359 "$ B<errno 99>\n"
10360 "EADDRNOTAVAIL 99 Cannot assign requested address\n"
10361 msgstr ""
10362 "$ B<errno 99>\n"
10363 "EADDRNOTAVAIL 99 Cannot assign requested address\n"
10364
10365 #. type: Plain text
10366 #: build/C/man2/seccomp.2:533
10367 msgid "In the following example, we attempt to run the command B<whoami>(1), but the BPF filter rejects the B<execve>(2)  system call, so that the command is not even executed:"
10368 msgstr ""
10369
10370 #. type: Plain text
10371 #: build/C/man2/seccomp.2:544
10372 #, no-wrap
10373 msgid ""
10374 "$ B<syscall_nr execve>\n"
10375 "59\n"
10376 "$ B<./a.out>\n"
10377 "Usage: ./a.out E<lt>syscall_nrE<gt> E<lt>archE<gt> E<lt>errnoE<gt> E<lt>progE<gt> [E<lt>argsE<gt>]\n"
10378 "Hint for E<lt>archE<gt>: AUDIT_ARCH_I386: 0x40000003\n"
10379 "                 AUDIT_ARCH_X86_64: 0xC000003E\n"
10380 "$ B<./a.out 59 0xC000003E 99 /bin/whoami>\n"
10381 "execv: Cannot assign requested address\n"
10382 msgstr ""
10383 "$ B<syscall_nr execve>\n"
10384 "59\n"
10385 "$ B<./a.out>\n"
10386 "Usage: ./a.out E<lt>syscall_nrE<gt> E<lt>archE<gt> E<lt>errnoE<gt> E<lt>progE<gt> [E<lt>argsE<gt>]\n"
10387 "Hint for E<lt>archE<gt>: AUDIT_ARCH_I386: 0x40000003\n"
10388 "                 AUDIT_ARCH_X86_64: 0xC000003E\n"
10389 "$ B<./a.out 59 0xC000003E 99 /bin/whoami>\n"
10390 "execv: Cannot assign requested address\n"
10391
10392 #. type: Plain text
10393 #: build/C/man2/seccomp.2:552
10394 msgid "In the next example, the BPF filter rejects the B<write>(2)  system call, so that, although it is successfully started, the B<whoami>(1)  command is not able to write output:"
10395 msgstr ""
10396
10397 #. type: Plain text
10398 #: build/C/man2/seccomp.2:558
10399 #, no-wrap
10400 msgid ""
10401 "$ B<syscall_nr write>\n"
10402 "1\n"
10403 "$ B<./a.out 1 0xC000003E 99 /bin/whoami>\n"
10404 msgstr ""
10405 "$ B<syscall_nr write>\n"
10406 "1\n"
10407 "$ B<./a.out 1 0xC000003E 99 /bin/whoami>\n"
10408
10409 #. type: Plain text
10410 #: build/C/man2/seccomp.2:565
10411 msgid "In the final example, the BPF filter rejects a system call that is not used by the B<whoami>(1)  command, so it is able to successfully execute and produce output:"
10412 msgstr ""
10413
10414 #. type: Plain text
10415 #: build/C/man2/seccomp.2:572
10416 #, no-wrap
10417 msgid ""
10418 "$ B<syscall_nr preadv>\n"
10419 "295\n"
10420 "$ B<./a.out 295 0xC000003E 99 /bin/whoami>\n"
10421 "cecilia\n"
10422 msgstr ""
10423 "$ B<syscall_nr preadv>\n"
10424 "295\n"
10425 "$ B<./a.out 295 0xC000003E 99 /bin/whoami>\n"
10426 "cecilia\n"
10427
10428 #. type: Plain text
10429 #: build/C/man2/seccomp.2:586
10430 #, no-wrap
10431 msgid ""
10432 "#include E<lt>errno.hE<gt>\n"
10433 "#include E<lt>stddef.hE<gt>\n"
10434 "#include E<lt>stdio.hE<gt>\n"
10435 "#include E<lt>stdlib.hE<gt>\n"
10436 "#include E<lt>unistd.hE<gt>\n"
10437 "#include E<lt>linux/audit.hE<gt>\n"
10438 "#include E<lt>linux/filter.hE<gt>\n"
10439 "#include E<lt>linux/seccomp.hE<gt>\n"
10440 "#include E<lt>sys/prctl.hE<gt>\n"
10441 msgstr ""
10442 "#include E<lt>errno.hE<gt>\n"
10443 "#include E<lt>stddef.hE<gt>\n"
10444 "#include E<lt>stdio.hE<gt>\n"
10445 "#include E<lt>stdlib.hE<gt>\n"
10446 "#include E<lt>unistd.hE<gt>\n"
10447 "#include E<lt>linux/audit.hE<gt>\n"
10448 "#include E<lt>linux/filter.hE<gt>\n"
10449 "#include E<lt>linux/seccomp.hE<gt>\n"
10450 "#include E<lt>sys/prctl.hE<gt>\n"
10451
10452 #. type: Plain text
10453 #: build/C/man2/seccomp.2:595
10454 #, no-wrap
10455 msgid ""
10456 "static int\n"
10457 "install_filter(int syscall_nr, int t_arch, int f_errno)\n"
10458 "{\n"
10459 "    struct sock_filter filter[] = {\n"
10460 "        /* [0] Load architecture from 'seccomp_data' buffer into\n"
10461 "               accumulator */\n"
10462 "        BPF_STMT(BPF_LD | BPF_W | BPF_ABS,\n"
10463 "                 (offsetof(struct seccomp_data, arch))),\n"
10464 msgstr ""
10465 "static int\n"
10466 "install_filter(int syscall_nr, int t_arch, int f_errno)\n"
10467 "{\n"
10468 "    struct sock_filter filter[] = {\n"
10469 "        /* [0] Load architecture from 'seccomp_data' buffer into\n"
10470 "               accumulator */\n"
10471 "        BPF_STMT(BPF_LD | BPF_W | BPF_ABS,\n"
10472 "                 (offsetof(struct seccomp_data, arch))),\n"
10473
10474 #. type: Plain text
10475 #: build/C/man2/seccomp.2:599
10476 #, no-wrap
10477 msgid ""
10478 "        /* [1] Jump forward 4 instructions if architecture does not\n"
10479 "               match 't_arch' */\n"
10480 "        BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, t_arch, 0, 4),\n"
10481 msgstr ""
10482 "        /* [1] Jump forward 4 instructions if architecture does not\n"
10483 "               match 't_arch' */\n"
10484 "        BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, t_arch, 0, 4),\n"
10485
10486 #. type: Plain text
10487 #: build/C/man2/seccomp.2:604
10488 #, no-wrap
10489 msgid ""
10490 "        /* [2] Load system call number from 'seccomp_data' buffer into\n"
10491 "               accumulator */\n"
10492 "        BPF_STMT(BPF_LD | BPF_W | BPF_ABS,\n"
10493 "                 (offsetof(struct seccomp_data, nr))),\n"
10494 msgstr ""
10495 "        /* [2] Load system call number from 'seccomp_data' buffer into\n"
10496 "               accumulator */\n"
10497 "        BPF_STMT(BPF_LD | BPF_W | BPF_ABS,\n"
10498 "                 (offsetof(struct seccomp_data, nr))),\n"
10499
10500 #. type: Plain text
10501 #: build/C/man2/seccomp.2:608
10502 #, no-wrap
10503 msgid ""
10504 "        /* [3] Jump forward 1 instruction if system call number\n"
10505 "               does not match 'syscall_nr' */\n"
10506 "        BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, syscall_nr, 0, 1),\n"
10507 msgstr ""
10508 "        /* [3] Jump forward 1 instruction if system call number\n"
10509 "               does not match 'syscall_nr' */\n"
10510 "        BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, syscall_nr, 0, 1),\n"
10511
10512 #. type: Plain text
10513 #: build/C/man2/seccomp.2:613
10514 #, no-wrap
10515 msgid ""
10516 "        /* [4] Matching architecture and system call: don't execute\n"
10517 "\t       the system call, and return 'f_errno' in 'errno' */\n"
10518 "        BPF_STMT(BPF_RET | BPF_K,\n"
10519 "                 SECCOMP_RET_ERRNO | (f_errno & SECCOMP_RET_DATA)),\n"
10520 msgstr ""
10521 "        /* [4] Matching architecture and system call: don't execute\n"
10522 "\t       the system call, and return 'f_errno' in 'errno' */\n"
10523 "        BPF_STMT(BPF_RET | BPF_K,\n"
10524 "                 SECCOMP_RET_ERRNO | (f_errno & SECCOMP_RET_DATA)),\n"
10525
10526 #. type: Plain text
10527 #: build/C/man2/seccomp.2:617
10528 #, no-wrap
10529 msgid ""
10530 "        /* [5] Destination of system call number mismatch: allow other\n"
10531 "               system calls */\n"
10532 "        BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ALLOW),\n"
10533 msgstr ""
10534 "        /* [5] Destination of system call number mismatch: allow other\n"
10535 "               system calls */\n"
10536 "        BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ALLOW),\n"
10537
10538 #. type: Plain text
10539 #: build/C/man2/seccomp.2:621
10540 #, no-wrap
10541 msgid ""
10542 "        /* [6] Destination of architecture mismatch: kill process */\n"
10543 "        BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_KILL),\n"
10544 "    };\n"
10545 msgstr ""
10546 "        /* [6] Destination of architecture mismatch: kill process */\n"
10547 "        BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_KILL),\n"
10548 "    };\n"
10549
10550 #. type: Plain text
10551 #: build/C/man2/seccomp.2:626
10552 #, no-wrap
10553 msgid ""
10554 "    struct sock_fprog prog = {\n"
10555 "        .len = (unsigned short) (sizeof(filter) / sizeof(filter[0])),\n"
10556 "        .filter = filter,\n"
10557 "    };\n"
10558 msgstr ""
10559 "    struct sock_fprog prog = {\n"
10560 "        .len = (unsigned short) (sizeof(filter) / sizeof(filter[0])),\n"
10561 "        .filter = filter,\n"
10562 "    };\n"
10563
10564 #. type: Plain text
10565 #: build/C/man2/seccomp.2:631
10566 #, no-wrap
10567 msgid ""
10568 "    if (seccomp(SECCOMP_SET_MODE_FILTER, 0, &prog)) {\n"
10569 "        perror(\"seccomp\");\n"
10570 "        return 1;\n"
10571 "    }\n"
10572 msgstr ""
10573 "    if (seccomp(SECCOMP_SET_MODE_FILTER, 0, &prog)) {\n"
10574 "        perror(\"seccomp\");\n"
10575 "        return 1;\n"
10576 "    }\n"
10577
10578 #. type: Plain text
10579 #: build/C/man2/seccomp.2:634
10580 #, no-wrap
10581 msgid ""
10582 "    return 0;\n"
10583 "}\n"
10584 msgstr ""
10585 "    return 0;\n"
10586 "}\n"
10587
10588 #. type: Plain text
10589 #: build/C/man2/seccomp.2:646
10590 #, no-wrap
10591 msgid ""
10592 "int\n"
10593 "main(int argc, char **argv)\n"
10594 "{\n"
10595 "    if (argc E<lt> 5) {\n"
10596 "        fprintf(stderr, \"Usage: \"\n"
10597 "                \"%s E<lt>syscall_nrE<gt> E<lt>archE<gt> E<lt>errnoE<gt> E<lt>progE<gt> [E<lt>argsE<gt>]\\en\"\n"
10598 "                \"Hint for E<lt>archE<gt>: AUDIT_ARCH_I386: 0x%X\\en\"\n"
10599 "                \"                 AUDIT_ARCH_X86_64: 0x%X\\en\"\n"
10600 "                \"\\en\", argv[0], AUDIT_ARCH_I386, AUDIT_ARCH_X86_64);\n"
10601 "        exit(EXIT_FAILURE);\n"
10602 "    }\n"
10603 msgstr ""
10604 "int\n"
10605 "main(int argc, char **argv)\n"
10606 "{\n"
10607 "    if (argc E<lt> 5) {\n"
10608 "        fprintf(stderr, \"Usage: \"\n"
10609 "                \"%s E<lt>syscall_nrE<gt> E<lt>archE<gt> E<lt>errnoE<gt> E<lt>progE<gt> [E<lt>argsE<gt>]\\en\"\n"
10610 "                \"Hint for E<lt>archE<gt>: AUDIT_ARCH_I386: 0x%X\\en\"\n"
10611 "                \"                 AUDIT_ARCH_X86_64: 0x%X\\en\"\n"
10612 "                \"\\en\", argv[0], AUDIT_ARCH_I386, AUDIT_ARCH_X86_64);\n"
10613 "        exit(EXIT_FAILURE);\n"
10614 "    }\n"
10615
10616 #. type: Plain text
10617 #: build/C/man2/seccomp.2:651
10618 #, no-wrap
10619 msgid ""
10620 "    if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)) {\n"
10621 "        perror(\"prctl\");\n"
10622 "        exit(EXIT_FAILURE);\n"
10623 "    }\n"
10624 msgstr ""
10625 "    if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)) {\n"
10626 "        perror(\"prctl\");\n"
10627 "        exit(EXIT_FAILURE);\n"
10628 "    }\n"
10629
10630 #. type: Plain text
10631 #: build/C/man2/seccomp.2:656
10632 #, no-wrap
10633 msgid ""
10634 "    if (install_filter(strtol(argv[1], NULL, 0),\n"
10635 "                       strtol(argv[2], NULL, 0),\n"
10636 "                       strtol(argv[3], NULL, 0)))\n"
10637 "        exit(EXIT_FAILURE);\n"
10638 msgstr ""
10639 "    if (install_filter(strtol(argv[1], NULL, 0),\n"
10640 "                       strtol(argv[2], NULL, 0),\n"
10641 "                       strtol(argv[3], NULL, 0)))\n"
10642 "        exit(EXIT_FAILURE);\n"
10643
10644 #. type: Plain text
10645 #: build/C/man2/seccomp.2:661
10646 #, no-wrap
10647 msgid ""
10648 "    execv(argv[4], &argv[4]);\n"
10649 "    perror(\"execv\");\n"
10650 "    exit(EXIT_FAILURE);\n"
10651 "}\n"
10652 msgstr ""
10653 "    execv(argv[4], &argv[4]);\n"
10654 "    perror(\"execv\");\n"
10655 "    exit(EXIT_FAILURE);\n"
10656 "}\n"
10657
10658 #. type: Plain text
10659 #: build/C/man2/seccomp.2:668
10660 msgid "B<prctl>(2), B<ptrace>(2), B<sigaction>(2), B<signal>(7), B<socket>(7)"
10661 msgstr "B<prctl>(2), B<ptrace>(2), B<sigaction>(2), B<signal>(7), B<socket>(7)"
10662
10663 #. type: Plain text
10664 #: build/C/man2/seccomp.2:673
10665 msgid "The kernel source files I<Documentation/networking/filter.txt> and I<Documentation/prctl/seccomp_filter.txt>."
10666 msgstr "カーネルのソースファイル I<Documentation/networking/filter.txt> と I<Documentation/prctl/seccomp_filter.txt>"
10667
10668 #. type: Plain text
10669 #: build/C/man2/seccomp.2:679
10670 msgid "McCanne, S. and Jacobson, V. (1992)  I<The BSD Packet Filter: A New Architecture for User-level Packet Capture>, Proceedings of the USENIX Winter 1993 Conference E<.UR http://www.tcpdump.org/papers/bpf-usenix93.pdf> E<.UE>"
10671 msgstr ""