File: credentials.7

package info (click to toggle)
manpages-ja 0.5.0.0.20100315-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 21,156 kB
  • ctags: 1
  • sloc: sh: 13,935; perl: 157; makefile: 114
file content (297 lines) | stat: -rw-r--r-- 9,426 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
.\" Copyright (c) 2007 by Michael Kerrisk <mtk.manpages@gmail.com>
.\"
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Permission is granted to copy and distribute modified versions of this
.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one.
.\"
.\" Since the Linux kernel and libraries are constantly changing, this
.\" manual page may be incorrect or out-of-date.  The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" the use of the information contained herein.  The author(s) may not
.\" have taken the same level of care in the production of this manual,
.\" which is licensed free of charge, as they might when working
.\" professionally.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
.\" 2007-06-13 Creation
.\"
.\" Japanese Version Copyright (c) 2007 Akihiro MOTOKI all rights reserved.
.\" Translated 2007-10-25, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.66
.\" Updated 2008-08-04, Akihiro MOTOKI, LDP v3.05
.\"
.TH CREDENTIALS 7 2008-06-03 "Linux" "Linux Programmer's Manual"
.SH ̾
credentials \- ǧڤѤץμ̻
.SH 
.SS ץID (PID)
ƥץϡǤʤΰդʼ̻Ҥġ
μ̻Ҥ
.BR fork (2)
Ȥäƥץݤ˳Ƥ롣
ץ
.BR getpid (2)
ȤäƼʬ PID Ǥ롣
PID 
.I pid_t
ɽ
.RI ( pid_t

.I <sys/types.h>
Ƥ)

PID ϳƼΥƥॳǤΥƥॳ뤬Ѥץ
ꤹ뤿˻Ѥ롣ʲ󤲤:
.BR kill (2),
.BR ptrace (2),
.BR setpriority (2),
.\" .BR sched_rr_get_interval (2),
.\" .BR sched_getaffinity (2),
.\" .BR sched_setaffinity (2),
.\" .BR sched_getparam (2),
.\" .BR sched_setparam (2),
.\" .BR sched_setscheduler (2),
.\" .BR sched_getscheduler (2),
.BR setpgid (2),
.\" .BR getsid (2),
.BR setsid (2),
.BR sigqueue (2),
.BR waitpid (2).
.\" .BR waitid (2),
.\" .BR wait4 (2),

ץ PID 
.BR execve (2)
ѤǤ롣
.SS ƥץ ID (PPID)
ץοƥץ ID ϡ
.BR fork (2)
ȤäƤΥץץ򼨤
ץ
.BR getppid (2)
ȤäƼʬ PPID Ǥ롣
PPID 
.I pid_t
ɽ롣

ץ PPID 
.BR execve (2)
ѤǤ롣
.SS ץ롼 ID ȥå ID
ƥץϥå ID ȥץ롼 ID ġ
 ID Ϥɤ
.I pid_t
ɽ롣
ץϡ줾
.BR getsid (2),
.BR getpgrp (2)
ȤäƼʬΥå IDץ롼 ID Ǥ롣

.BR fork (2)
줿ҥץϿƥץΥå ID ȥץ롼 ID
Ѿ롣ץΥå ID ȥץ롼 ID 
.BR execve (2)
ѤǤ롣

åȥץ롼פγǰϡΥԤ
ͰƤ줿ΤǤ롣
ץ롼 (ˤϡ֥֡פȸƤФ뤳Ȥ⤢) ϡ
Ʊץ롼 ID ͭץνޤǤ롣
ϡĤΥޥɤ⤷ϥѥץ饤μ¹Ԥ˻Ȥץ
ФưĤΥץ롼פ
(㤨Сޥ "ls\ |\ wc" ¹Ԥ뤿ĤΥץ
Ʊץ롼פ֤)
°ץ롼פ
.BR setpgid (2)
ȤäǤ롣
ȤΥץ ID ץ롼 ID Ʊץϡ
Υ롼פΡ֥ץ롼ס꡼פǤ롣

åϡƱå ID ͭץνޤǤ롣
ĤΥץ롼פСƱå ID 
(ĤޤꡢĤΥץ롼פΥСƱå˽°
ˤꡢåȥץ롼פؤΥץؤǤ)
ʥåϥץ
.BR setsid (2)
ƤӽФȤǹԤ
.BR setsid (2)
ϡ
.BR setsid (2)
ƤӽФץ PID ƱͤΥå ID 
ʥå롣
åԤϡ֥å󡦥꡼פȸƤФ롣
.SS 桼 ID ȥ롼 ID
ƥץϡΥ桼 ID ȥ롼 ID ġ
桼 ID롼 ID ǡ줾
.IR uid_t ,
.I gid_t
ɽ (
.I <sys/types.h>
Ƥ)

Linux ǤϡƥץϰʲΤ褦ʼΥ桼 ID ȥ롼 ID ġ
.IP * 3
¥桼 ID ȼ¥롼 ID
 ID ˤץνͭԤꤵ롣
ץʬμ¥桼 ID¥롼 ID ˤϡ줾
.BR getuid (2),
.BR getgid (2)
Ѥ롣
.IP *
¸桼 ID ȼ¸롼 ID
 ID ϡå塼ͭꡢޥեʤɤ
ͭ꥽˥褦ȤݤˤΥץĤ
äƤ뤫򥫡ͥ뤬ȽꤹΤ˻Ѥ롣
ۤȤɤ Unix ƥǤϡ ID ϥեؤΥ
ĤȽˤѤ롣
ʤ顢Linux ǤϥեؤΥĤȽˤ
ҤΥե륷ƥ ID Ѥ롣
ץʬμ¸桼 ID¸롼 ID ˤϡ줾
.BR geteuid (2),
.BR getegid (2)
Ѥ롣
.IP *
¸ (saved) set-user-ID ¸ set-group-ID
 ID ϡset-user-ID  set-group-ID 줿ץˤơ
ץμ¹Իꤵ줿¸ ID Υԡ¸뤿
Ѥ
.RB ( execve (2)
)
set-user-ID ץϡ¸桼 ID ¥桼ID ¸ set-user-ID
δ֤ǹԤä褿ڤؤ뤳ȤǡøȤǤ롣
ڤؤ
.BR seteuid (2),
.BR setreuid (2),
.BR setresuid (2)
ƤӽФȤǼ¹ԤǤ롣
set-group-ID ץϡ
.BR setegid (2),
.BR setregid (2),
.BR setresgid (2)
ȤäƱͤΤȤǤ롣
ץʬ¸ set-user-ID¸ set-group-ID ˤϡ
.BR getresuid(2),
.BR getresgids (2)
򤽤줾Ѥ롣
.IP *
ե륷ƥࡦ桼 ID ȥե륷ƥࡦ롼 ID (Linux ͭ)
 ID ϡҤ롼 ID Ȥ߹碌ƻѤ졢
եؤΥηѤ롣ܺ٤
.BR path_resolution (7)
򻲾ȡ
ץμ¸ ID (桼 ID  롼 ID) ѹ뤿Ӥˡ
ͥϼưŪбե륷ƥ ID Ʊͤѹ롣
η̡ե륷ƥ ID ̾б¸ ID ƱͤȤʤꡢ
եΥΥåˡ Linux ¾ Unix ƥƱǤ롣
ե륷ƥ ID ϼ¸ ID Ȥϰۤʤͤˤ뤳ȤǤ
ѹ
.BR setfsuid (2)

.BR setfsgid (2)
ƤӽФƹԤ
.IP *
롼 ID
 ID ϡե¾ζͭ꥽ؤΥ˥Ĥ
å˻Ѥ롢ɲäΥ롼 ID νǤ롣
ͥ 2.6.4  Linux ǤϡĤΥץ
롼פΥСϺ 32 Ǥ롣
ͥ 2.6.4 ʹߤǤϡĤΥץ
롼פΥСϺ 65536 Ǥ롣
.I sysconf(_SC_NGROUPS_MAX)
ƤӽФȤǡץСȤʤ뤳ȤǤǽΤ
롼׿Τ뤳ȤǤ롣
.\" Since kernel 2.6.4, the limit is visible via the read-only file
.\" /proc/sys/kernel/ngroups_max.
.\" As at 2.6.22-rc2, this file is still read-only.
ץϡʬ롼 ID ν
.BR getgroups (2)
ǼǤ
.BR setgroups (2)
ǽѹǤ롣
.PP
.BR fork (2)
줿ҥץϿƥץΥ桼 ID ȥ롼 ID Ѿ롣
.BR execve (2)
δ֡ץμ¥桼/롼 ID 롼 ID ѤǤ롣
¸ ID ¸å ID ѹǽ
.RB ( execve (2)
Ƥ)

嵭Ūʳˤ⡢ץΥ桼 ID ¾͡ʾ̤Ѥ롣
.IP * 3
ʥĤȽ \(em
.BR kill (2)
ȡ
.IP *
ץΥ塼󥰴ϢΥѥ᡼ (nice ͡
ꥢ륿ࡦ塼󥰥ݥꥷͥ١CPU affinity
ͥ) ĤȽ
塼󥰴ϢΥѥ᡼ˤ
.BR setpriority (2),
.BR sched_setaffinity (2),
.BR sched_setscheduler (2),
.BR sched_setparam (2),
.BR ioprio_set (2)
Ѥ롣
.IP *
꥽¤Υå
.BR getrlimit (2)
ȡ
.IP *
ץǤ inotify 󥹥󥹿ξ¤Υå
.BR inotify (7)
ȡ
.SH 
ץ IDƥץ IDץ롼 IDå ID 
POSIX.1-2001 ǵꤵƤ롣
 ID¸ ID¸å ID Υ桼 ID / 롼 ID 
롼 ID  POSIX.1-2001 ǵꤵƤ롣
ե륷ƥࡦ桼 ID / 롼 ID  Linux ˤĥǤ롣
.SH 
POSIX ΥåɻͤǤϡμ̻Ҥץåɤ
ͭ뤳ȤƤ롣
ʤ顢ͥΥ٥ǤϡLinux ϥå̡
桼ȥ롼פ˴ؤ뼱̻ҤƤ롣
NPTL åɼ(㤨
.BR setuid (2),
.BR setresuid (2)
ʤɤθƤӽФˤ) 桼䥰롼פ˴ؤ뼱̻ҤФѹ
ץƤ POSIX åɤФȿǤ뤳Ȥݾڤ
νԤäƤ롣
.SH Ϣ
.BR bash (1),
.BR csh (1),
.BR ps (1),
.BR access (2),
.BR execve (2),
.BR faccessat (2),
.BR fork (2),
.BR getpgrp (2),
.BR getpid (2),
.BR getppid (2),
.BR getsid (2),
.BR kill (2),
.BR killpg (2),
.BR setegid (2),
.BR seteuid (2),
.BR setfsgid (2),
.BR setfsuid (2),
.BR setgid (2),
.BR setgroups (2),
.BR setresgid (2),
.BR setresuid (2),
.BR setuid (2),
.BR waitpid (2),
.BR euidaccess (3),
.BR initgroups (3),
.BR tcgetpgrp (3),
.BR tcsetpgrp (3),
.BR capabilities (7),
.BR path_resolution (7),
.BR unix (7)