OSDN Git Service

55a1c21af80abc328ce2e14d0a474356a791f2f0
[linuxjm/LDP_man-pages.git] / draft / man3 / initgroups.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
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 .\" References consulted:
24 .\"     Linux libc source code
25 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
26 .\"     386BSD man pages
27 .\" Modified 1993-07-24 by Rik Faith <faith@cs.unc.edu>
28 .\" Modified 2004-10-10 by aeb
29 .\"
30 .\" Japanese Version Copyright (c) 1998
31 .\"             ISHIKAWA Mutsumi, all rights reserved.
32 .\" Translated 1998-05-23, ISHIKAWA Mutsumi <ishikawa@linux.or.jp>
33 .\" Updated 2002-01-09, Kentaro Shirakata <argrath@ub32.org>
34 .\" Updated 2005-02-26, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
35 .\"
36 .TH INITGROUPS 3  2007-07-26 "GNU" "Linux Programmer's Manual"
37 .\"O .SH NAME
38 .SH 名前
39 .\"O initgroups \- initialize the supplementary group access list
40 initgroups \- 追加のグループアクセスリストの初期化
41 .\"O .SH SYNOPSIS
42 .SH 書式
43 .nf
44 .B #include <sys/types.h>
45 .B #include <grp.h>
46 .sp
47 .BI "int initgroups(const char *" user ", gid_t " group );
48 .fi
49 .sp
50 .in -4n
51 .\"O Feature Test Macro Requirements for glibc (see
52 .\"O .BR feature_test_macros (7)):
53 glibc 向けの機能検査マクロの要件
54 .RB ( feature_test_macros (7)
55 参照):
56 .in
57 .sp
58 .BR initgroups ():
59 _BSD_SOURCE
60 .\"O .SH DESCRIPTION
61 .SH 説明
62 .\"O The
63 .\"O .BR initgroups ()
64 .\"O function initializes the group access list by
65 .\"O reading the group database \fI/etc/group\fP and using all groups of
66 .\"O which \fIuser\fP is a member.
67 .\"O The additional group \fIgroup\fP is
68 .\"O also added to the list.
69 .BR initgroups ()
70 関数はグループデータベース \fI/etc/group\fP を読み
71 込んで、\fIuser\fP が所属している全てのグループを使って、グループアク
72 セスリストを初期化する。さらに、\fIgroup\fP に示されるグループもグルー
73 プアクセスリストに追加される。
74
75 .\"O The
76 .\"O .I user
77 .\"O argument must be non-NULL.
78 .I user
79 引数は NULL であってはならない。
80 .\"O .SH "RETURN VALUE"
81 .SH 返り値
82 .\"O The
83 .\"O .BR initgroups ()
84 .\"O function returns 0 on success.
85 .\"O On error, \-1 is returned, and
86 .\"O .I errno
87 .\"O is set appropriately.
88 .BR initgroups ()
89 関数は、成功すると 0 を返す。
90 エラーの場合は \-1 を返し、
91 .I errno
92 を適切に設定する。
93 .\"O .SH ERRORS
94 .SH エラー
95 .TP
96 .B ENOMEM
97 .\"O Insufficient memory to allocate group information structure.
98 グループ情報構造体を配置するためのメモリが不足している。
99 .TP
100 .B EPERM
101 .\"O The calling process has insufficient privilege.
102 .\"O See the underlying system call
103 .\"O .BR setgroups (2).
104 呼出しプロセスが十分な特権を持っていない。
105 この関数の裏で実行されるシステムコール
106 .BR setgroups (2)
107 も参照のこと。
108 .\"O .SH FILES
109 .SH ファイル
110 .nf
111 .\"O \fI/etc/group\fP           group database file
112 \fI/etc/group\fP                グループデータベースファイル
113 .fi
114 .\"O .SH "CONFORMING TO"
115 .SH 準拠
116 SVr4, 4.3BSD.
117 .\"O .SH "SEE ALSO"
118 .SH 関連項目
119 .BR getgroups (2),
120 .BR setgroups (2),
121 .BR credentials (7)