OSDN Git Service

(split) LDP: Translation snapshots for ja.po.
[linuxjm/LDP_man-pages.git] / draft / man2 / setfsgid.2
1 .\" Copyright (C) 1995, Thomas K. Dyas <tdyas@eden.rutgers.edu>
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" Created   1995-08-06 Thomas K. Dyas <tdyas@eden.rutgers.edu>
24 .\" Modified  2000-07-01 aeb
25 .\" Modified  2002-07-23 aeb
26 .\" Modified, 27 May 2004, Michael Kerrisk <mtk.manpages@gmail.com>
27 .\"     Added notes on capability requirements
28 .\"
29 .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
30 .\"         all rights reserved.
31 .\" Translated Sat Mar  1 00:54:23 JST 1997
32 .\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
33 .\" Modified Mon Sep 23 21:21:54 JST 2000
34 .\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
35 .\" Modified 2002-09-24 by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
36 .\" Modified 2005-02-24, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
37 .\"
38 .\"WORD:        identity                ID
39 .\"WORD:        kernel                  カーネル
40 .\"WORD:        file system             ファイル・システム
41 .\"WORD:        effective group ID      実効グループID
42 .\"WORD:        real group ID           実グループID
43 .\"WORD:        signal                  シグナル
44 .\"WORD:        security hole           セキュリティ・ホール
45 .\"WORD:        saved set-group-ID      保存セットグループID
46 .\"
47 .TH SETFSGID 2 2008-12-05 "Linux" "Linux Programmer's Manual"
48 .\"O .SH NAME
49 .\"O setfsgid \- set group identity used for file system checks
50 .SH 名前
51 setfsgid \- ファイル・システムのチェックに用いられるグループ ID を設定する
52 .\"O .SH SYNOPSIS
53 .SH 書式
54 .B #include <unistd.h>
55 /* glibc では <sys/fsuid.h> */
56 .sp
57 .BI "int setfsgid(uid_t " fsgid );
58 .\"O .SH DESCRIPTION
59 .SH 説明
60 .\"O The system call
61 .\"O .BR setfsgid ()
62 .\"O sets the group ID that the Linux kernel uses to check for all accesses
63 .\"O to the file system.
64 .\"O Normally, the value of
65 .\"O .I fsgid
66 .\"O will shadow the value of the effective group ID.
67 .\"O In fact, whenever the
68 .\"O effective group ID is changed,
69 .\"O .I fsgid
70 .\"O will also be changed to the new value of the effective group ID.
71 システムコール
72 .BR setfsgid ()
73 は Linux カーネルがファイル・システムに対する
74 全てのアクセスのチェックに使用するグループ IDを設定する。通常は
75 .I fsgid
76 の値は実効 (effective) グループID と同じになる。実際、
77 実効グループ ID が変更される度に
78 .I fsgid
79 もまた新しい実効グループID の値に変更される。
80
81 .\"O Explicit calls to
82 .\"O .BR setfsuid (2)
83 .\"O and
84 .\"O .BR setfsgid ()
85 .\"O are usually only used by programs such as the Linux NFS server that
86 .\"O need to change what user and group ID is used for file access without a
87 .\"O corresponding change in the real and effective user and group IDs.
88 .\"O A change in the normal user IDs for a program such as the NFS server
89 .\"O is a security hole that can expose it to unwanted signals.
90 .\"O (But see below.)
91 通常、
92 .BR setfsuid ()
93
94 .BR setfsgid ()
95 が明示的に呼び出されるのは、Linux NFS サーバー のように、
96 ファイル・アクセスに用いるユーザID / グループID を変更しなければならないが、
97 対応する実(real)/実効(effective) ユーザID / グループID は変更したくないような
98 プログラムに限られる。
99 NFS サーバーのようなプログラムで、通常のユーザID を変更すると、
100 プロセスを望まないシグナルにさらす可能性があり、
101 セキュリティ・ホールになる。(下記参照)
102
103 .\"O .BR setfsgid ()
104 .\"O will only succeed if the caller is the superuser or if
105 .\"O .I fsgid
106 .\"O matches either the real group ID, effective group ID,
107 .\"O saved set-group-ID, or the current value of
108 .\"O .IR fsgid .
109 .BR setfsgid ()
110 は、スーパー・ユーザによって呼び出された場合か、
111 .I fsgid
112 が実グループID、実効グループID、
113 保存セットグループID (saved set-group-ID)、現在の
114 .I fsgid
115 の値のいずれかに一致する場合にのみ成功する。
116 .\"O .SH "RETURN VALUE"
117 .SH 返り値
118 .\"O On success, the previous value of
119 .\"O .I fsgid
120 .\"O is returned.
121 .\"O On error, the current value of
122 .\"O .I fsgid
123 .\"O is returned.
124 成功した場合、
125 .I fsgid
126 の以前の値を返す。エラーの場合は
127 .I fsgid
128 の現在の値を返す。
129 .\"O .SH VERSIONS
130 .SH バージョン
131 .\"O This system call is present in Linux since version 1.2.
132 このシステムコールはバージョン 1.2 以降の Linux に存在する。
133 .\" This system call is present since Linux 1.1.44
134 .\" and in libc since libc 4.7.6.
135 .\"O .SH "CONFORMING TO"
136 .SH 準拠
137 .\"O .BR setfsgid ()
138 .\"O is Linux-specific and should not be used in programs intended
139 .\"O to be portable.
140 .BR setfsgid ()
141 は Linux 特有であり、移植を想定したプログラムで使用してはいけない。
142 .\"O .SH NOTES
143 .SH 注意
144 .\"O When glibc determines that the argument is not a valid group ID,
145 .\"O it will return \-1 and set \fIerrno\fP to
146 .\"O .B EINVAL
147 .\"O without attempting
148 .\"O the system call.
149 glibc が引き数がグループID として不正だと判断した場合は、
150 システム・コールを行わず \fIerrno\fP に
151 .B EINVAL
152 を設定して \-1 が返される。
153 .LP
154 .\"O Note that at the time this system call was introduced, a process
155 .\"O could send a signal to a process with the same effective user ID.
156 .\"O Today signal permission handling is slightly different.
157 このシステムコールが導入された当時、プロセスは
158 同じ実効ユーザIDのプロセスへシグナルを送ることができた。
159 今日では、シグナル送信権限の扱いはかなり違うものになっている。
160 .\"O .SH BUGS
161 .SH バグ
162 .\"O No error messages of any kind are returned to the caller.
163 .\"O At the very
164 .\"O least,
165 .\"O .B EPERM
166 .\"O should be returned when the call fails (because the caller lacks the
167 .\"O .B CAP_SETGID
168 .\"O capability).
169 いかなる種類のエラー・メッセージも返さない。
170 失敗した場合は (呼び出し元には
171 .B CAP_SETGID
172 ケーパビリティがなかったのだから) 最低でも
173 .B EPERM
174 くらいは返すべきである。
175 .\"O .SH "SEE ALSO"
176 .SH 関連項目
177 .BR kill (2),
178 .BR setfsuid (2),
179 .BR capabilities (7),
180 .BR credentials (7)