1 .\" Copyright (C) 1995, Thomas K. Dyas <tdyas@eden.rutgers.edu>
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.
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.
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
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
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
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>
40 .\"WORD: file system ファイル・システム
41 .\"WORD: effective group ID 実効グループID
42 .\"WORD: real group ID 実グループID
44 .\"WORD: security hole セキュリティ・ホール
45 .\"WORD: saved set-group-ID 保存セットグループID
47 .TH SETFSGID 2 2008-12-05 "Linux" "Linux Programmer's Manual"
49 setfsgid \- ファイル・システムのチェックに用いられるグループ ID を設定する
51 .B #include <unistd.h>
52 /* glibc では <sys/fsuid.h> */
54 .BI "int setfsgid(uid_t " fsgid );
58 は Linux カーネルがファイル・システムに対する
59 全てのアクセスのチェックに使用するグループ IDを設定する。通常は
61 の値は実効 (effective) グループID と同じになる。実際、
64 もまた新しい実効グループID の値に変更される。
70 が明示的に呼び出されるのは、Linux NFS サーバー のように、
71 ファイル・アクセスに用いるユーザID / グループID を変更しなければならないが、
72 対応する実(real)/実効(effective) ユーザID / グループID は変更したくないような
74 NFS サーバーのようなプログラムで、通常のユーザID を変更すると、
75 プロセスを望まないシグナルにさらす可能性があり、
79 は、スーパー・ユーザによって呼び出された場合か、
82 保存セットグループID (saved set-group-ID)、現在の
84 の値のいずれかに一致する場合にのみ成功する。
92 このシステムコールはバージョン 1.2 以降の Linux に存在する。
93 .\" This system call is present since Linux 1.1.44
94 .\" and in libc since libc 4.7.6.
97 は Linux 特有であり、移植を想定したプログラムで使用してはいけない。
99 glibc が引き数がグループID として不正だと判断した場合は、
100 システム・コールを行わず \fIerrno\fP に
104 このシステムコールが導入された当時、プロセスは
105 同じ実効ユーザIDのプロセスへシグナルを送ることができた。
106 今日では、シグナル送信権限の扱いはかなり違うものになっている。
108 いかなる種類のエラー・メッセージも返さない。
111 ケーパビリティがなかったのだから) 最低でも
117 .BR capabilities (7),