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>
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
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 ¤ÈƱ¤¸¤Ë¤Ê¤ë¡£¼ÂºÝ¡¢
62 ¼Â¸ú¥°¥ë¡¼¥× ID ¤¬Êѹ¹¤µ¤ì¤ëÅÙ¤Ë
64 ¤â¤Þ¤¿¿·¤·¤¤¼Â¸ú¥°¥ë¡¼¥×ID ¤ÎÃͤËÊѹ¹¤µ¤ì¤ë¡£
70 ¤¬ÌÀ¼¨Åª¤Ë¸Æ¤Ó½Ð¤µ¤ì¤ë¤Î¤Ï¡¢Linux NFS ¥µ¡¼¥Ð¡¼ ¤Î¤è¤¦¤Ë¡¢
71 ¥Õ¥¡¥¤¥ë¡¦¥¢¥¯¥»¥¹¤ËÍѤ¤¤ë¥æ¡¼¥¶ID / ¥°¥ë¡¼¥×ID ¤òÊѹ¹¤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¤¬¡¢
72 Âбþ¤¹¤ë¼Â(real)/¼Â¸ú(effective) ¥æ¡¼¥¶ID / ¥°¥ë¡¼¥×ID ¤ÏÊѹ¹¤·¤¿¤¯¤Ê¤¤¤è¤¦¤Ê
73 ¥×¥í¥°¥é¥à¤Ë¸Â¤é¤ì¤ë¡£
74 NFS ¥µ¡¼¥Ð¡¼¤Î¤è¤¦¤Ê¥×¥í¥°¥é¥à¤Ç¡¢Ä̾ï¤Î¥æ¡¼¥¶ID ¤òÊѹ¹¤¹¤ë¤È¡¢
75 ¥×¥í¥»¥¹¤ò˾¤Þ¤Ê¤¤¥·¥°¥Ê¥ë¤Ë¤µ¤é¤¹²ÄǽÀ¤¬¤¢¤ê¡¢
76 ¥»¥¥å¥ê¥Æ¥£¡¦¥Û¡¼¥ë¤Ë¤Ê¤ë¡£(²¼µ»²¾È)
79 ¤Ï¡¢¥¹¡¼¥Ñ¡¼¡¦¥æ¡¼¥¶¤Ë¤è¤Ã¤Æ¸Æ¤Ó½Ð¤µ¤ì¤¿¾ì¹ç¤«¡¢
81 ¤¬¼Â¥°¥ë¡¼¥×ID¡¢¼Â¸ú¥°¥ë¡¼¥×ID¡¢
82 Êݸ¥»¥Ã¥È¥°¥ë¡¼¥×ID (saved set-group-ID)¡¢¸½ºß¤Î
84 ¤ÎÃͤΤ¤¤º¤ì¤«¤Ë°ìÃפ¹¤ë¾ì¹ç¤Ë¤Î¤ßÀ®¸ù¤¹¤ë¡£
88 ¤Î°ÊÁ°¤ÎÃͤòÊÖ¤¹¡£¥¨¥é¡¼¤Î¾ì¹ç¤Ï
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 ¤Ë
102 ¤òÀßÄꤷ¤Æ \-1 ¤¬ÊÖ¤µ¤ì¤ë¡£
104 ¤³¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤¬Æ³Æþ¤µ¤ì¤¿Åö»þ¡¢¥×¥í¥»¥¹¤Ï
105 Ʊ¤¸¼Â¸ú¥æ¡¼¥¶ID¤Î¥×¥í¥»¥¹¤Ø¥·¥°¥Ê¥ë¤òÁ÷¤ë¤³¤È¤¬¤Ç¤¤¿¡£
106 º£Æü¤Ç¤Ï¡¢¥·¥°¥Ê¥ëÁ÷¿®¸¢¸Â¤Î°·¤¤¤Ï¤«¤Ê¤ê°ã¤¦¤â¤Î¤Ë¤Ê¤Ã¤Æ¤¤¤ë¡£
108 ¤¤¤«¤Ê¤ë¼ïÎà¤Î¥¨¥é¡¼¡¦¥á¥Ã¥»¡¼¥¸¤âÊÖ¤µ¤Ê¤¤¡£
109 ¼ºÇÔ¤·¤¿¾ì¹ç¤Ï (¸Æ¤Ó½Ð¤·¸µ¤Ë¤Ï
111 ¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£¤¬¤Ê¤«¤Ã¤¿¤Î¤À¤«¤é) ºÇÄã¤Ç¤â
113 ¤¯¤é¤¤¤ÏÊÖ¤¹¤Ù¤¤Ç¤¢¤ë¡£
117 .BR capabilities (7),