OSDN Git Service

(split) LDP: Translation snapshots for ja.po.
[linuxjm/LDP_man-pages.git] / draft / man2 / setgid.2
1 .\" Copyright (C), 1994, Graeme W. Wilford. (Wilf.)
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 .\" Fri Jul 29th 12:56:44 BST 1994  Wilf. <G.Wilford@ee.surrey.ac.uk>
24 .\" Modified 1997-01-31 by Eric S. Raymond <esr@thyrsus.com>
25 .\" Modified 2002-03-09 by aeb
26 .\"
27 .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
28 .\"         all rights reserved.
29 .\" Translated Sat Mar  1 16:31:56 JST 1997
30 .\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
31 .\" Updated Fri Feb  7 JST 2003 by Kentaro Shirakata <argrath@ub32.org>
32 .\"
33 .\"WORD:        identity                識別
34 .\"WORD:        effective group ID      実効グループID
35 .\"WORD:        real group ID           実グループID
36 .\"WORD:        saved set-group-ID      保存セットグループID
37 .\"WORD:        implement               実装
38 .\"WORD:        superuser               スーパー・ユーザー
39 .\"
40 .TH SETGID 2 2009-10-17 "Linux" "Linux Programmer's Manual"
41 .\"O .SH NAME
42 .SH 名前
43 .\"O setgid \- set group identity
44 setgid \- グループ識別(identity)を設定する
45 .\"O .SH SYNOPSIS
46 .SH 書式
47 .B #include <sys/types.h>
48 .br
49 .B #include <unistd.h>
50 .sp
51 .BI "int setgid(gid_t " gid );
52 .\"O .SH DESCRIPTION
53 .SH 説明
54 .\"O .BR setgid ()
55 .\"O sets the effective group ID of the calling process.
56 .\"O If the caller is the
57 .\"O superuser, the real GID and saved set-group-ID are also set.
58 .BR setgid ()
59 は呼び出し元のプロセスの実効 (effective) グループID を設定する。
60 もしスーパー・ユーザーによって呼び出された場合は、
61 実 (real) グループID と保存 (saved) set-group-ID も設定される。
62
63 .\"O Under Linux,
64 .\"O .BR setgid ()
65 .\"O is implemented like the POSIX version with the
66 .\"O .B _POSIX_SAVED_IDS
67 .\"O feature.
68 .\"O This allows a set-group-ID program that is not set-user-ID-root
69 .\"O to drop all of its group
70 .\"O privileges, do some un-privileged work, and then reengage the original
71 .\"O effective group ID in a secure manner.
72 Linux において、
73 .BR setgid ()
74
75 .B _POSIX_SAVED_IDS
76 をもった POSIX 版のように実装されている。
77 これは set-user-ID-root でない set-group-ID プログラムにそのグループの
78 特権の全て落とし、特権の必要ない仕事をし、本来の実効グループID に
79 安全な方法で再び戻すことを許す。
80 .\"O .SH "RETURN VALUE"
81 .SH 返り値
82 .\"O On success, zero is returned.
83 .\"O On error, \-1 is returned, and
84 .\"O .I errno
85 .\"O is set appropriately.
86 成功した場合はゼロが返される。エラーの場合は \-1 が返され、
87 .I errno
88 が適切に設定される。
89 .\"O .SH ERRORS
90 .SH エラー
91 .TP
92 .B EPERM
93 .\"O The calling process is not privileged (does not have the
94 .\"O \fBCAP_SETGID\fP capability), and
95 .\"O .I gid
96 .\"O does not match the real group ID or saved set-group-ID of
97 .\"O the calling process.
98 呼び出し元のプロセスに権限がなく (\fBCAP_SETGID\fP ケーパビリティがなく)、かつ
99 .I gid
100 が呼び出し元のプロセスの実グループID と保存セットグループID
101 のどちらとも一致しない。
102 .\"O .SH "CONFORMING TO"
103 .SH 準拠
104 SVr4, POSIX.1-2001.
105 .\"O .SH "SEE ALSO"
106 .SH 関連項目
107 .BR getgid (2),
108 .BR setegid (2),
109 .BR setregid (2),
110 .BR capabilities (7),
111 .BR credentials (7)