.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) .\" .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" .\" References consulted: .\" Linux libc source code .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified 1993-07-24 by Rik Faith .\" Modified 2004-10-10 by aeb .\" .\" Japanese Version Copyright (c) 1998 .\" ISHIKAWA Mutsumi, all rights reserved. .\" Translated 1998-05-23, ISHIKAWA Mutsumi .\" Updated 2002-01-09, Kentaro Shirakata .\" Updated 2005-02-26, Akihiro MOTOKI .\" .TH INITGROUPS 3 2007-07-26 "GNU" "Linux Programmer's Manual" .\"O .SH NAME .SH 名前 .\"O initgroups \- initialize the supplementary group access list initgroups \- 追加のグループアクセスリストの初期化 .\"O .SH SYNOPSIS .SH 書式 .nf .B #include .B #include .sp .BI "int initgroups(const char *" user ", gid_t " group ); .fi .sp .in -4n .\"O Feature Test Macro Requirements for glibc (see .\"O .BR feature_test_macros (7)): glibc 向けの機能検査マクロの要件 .RB ( feature_test_macros (7) 参照): .in .sp .BR initgroups (): _BSD_SOURCE .\"O .SH DESCRIPTION .SH 説明 .\"O The .\"O .BR initgroups () .\"O function initializes the group access list by .\"O reading the group database \fI/etc/group\fP and using all groups of .\"O which \fIuser\fP is a member. .\"O The additional group \fIgroup\fP is .\"O also added to the list. .BR initgroups () 関数はグループデータベース \fI/etc/group\fP を読み 込んで、\fIuser\fP が所属している全てのグループを使って、グループアク セスリストを初期化する。さらに、\fIgroup\fP に示されるグループもグルー プアクセスリストに追加される。 .\"O The .\"O .I user .\"O argument must be non-NULL. .I user 引数は NULL であってはならない。 .\"O .SH "RETURN VALUE" .SH 返り値 .\"O The .\"O .BR initgroups () .\"O function returns 0 on success. .\"O On error, \-1 is returned, and .\"O .I errno .\"O is set appropriately. .BR initgroups () 関数は、成功すると 0 を返す。 エラーの場合は \-1 を返し、 .I errno を適切に設定する。 .\"O .SH ERRORS .SH エラー .TP .B ENOMEM .\"O Insufficient memory to allocate group information structure. グループ情報構造体を配置するためのメモリが不足している。 .TP .B EPERM .\"O The calling process has insufficient privilege. .\"O See the underlying system call .\"O .BR setgroups (2). 呼出しプロセスが十分な特権を持っていない。 この関数の裏で実行されるシステムコール .BR setgroups (2) も参照のこと。 .\"O .SH FILES .SH ファイル .nf .\"O \fI/etc/group\fP group database file \fI/etc/group\fP グループデータベースファイル .fi .\"O .SH "CONFORMING TO" .SH 準拠 SVr4, 4.3BSD. .\"O .SH "SEE ALSO" .SH 関連項目 .BR getgroups (2), .BR setgroups (2), .BR credentials (7)