.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) .\" .\" %%%LICENSE_START(VERBATIM) .\" 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. .\" %%%LICENSE_END .\" .\" 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 .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" 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 2017\-09\-15 GNU "Linux Programmer's Manual" .SH 名前 initgroups \- 追加のグループアクセスリストの初期化 .SH 書式 .nf \fB#include \fP \fB#include \fP .PP \fBint initgroups(const char *\fP\fIuser\fP\fB, gid_t \fP\fIgroup\fP\fB);\fP .fi .PP .RS -4 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照): .RE .PP \fBinitgroups\fP(): glibc 2.19 以降: _DEFAULT_SOURCE glibc 2.19 以前: _BSD_SOURCE .SH 説明 \fBinitgroups\fP() 関数はグループデータベース \fI/etc/group\fP を読み 込んで、\fIuser\fP が所属している全てのグループを使って、グループアク セスリストを初期化する。さらに、\fIgroup\fP に示されるグループもグルー プアクセスリストに追加される。 .PP \fIuser\fP 引数は NULL であってはならない。 .SH 返り値 \fBinitgroups\fP() 関数は、成功すると 0 を返す。 エラーの場合は \-1 を返し、 \fIerrno\fP を適切に設定する。 .SH エラー .TP \fBENOMEM\fP グループ情報構造体を配置するためのメモリーが不足している。 .TP \fBEPERM\fP 呼出しプロセスが十分な特権を持っていない。 この関数の裏で実行されるシステムコール \fBsetgroups\fP(2) も参照のこと。 .SH ファイル .TP \fI/etc/group\fP グループデータベースファイル .SH 属性 この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。 .TS allbox; lb lb lb l l l. インターフェース 属性 値 T{ \fBinitgroups\fP() T} Thread safety MT\-Safe locale .TE .sp 1 .SH 準拠 SVr4, 4.3BSD. .SH 関連項目 \fBgetgroups\fP(2), \fBsetgroups\fP(2), \fBcredentials\fP(7) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は \%https://www.kernel.org/doc/man\-pages/ に書かれている。