initgroupsのヘルプ・マニュアル
日本語 英語
initgroups --help
man initgroups
INITGROUPS(3) Linux Programmer’s Manual INITGROUPS(3)
名前
initgroups - 追加のグループアクセスリストの初期化
書式
#include
#include
int initgroups(const char *user, gid_t group);
glibc 向けの機能検査マクロの要件 (feature_test_macros(7) 参照):
initgroups(): _BSD_SOURCE
説明
initgroups() 関数はグループデータベース /etc/group を読み込んで、user
が所属している全てのグループを使って、グループアクセスリストを初期化 す
る 。さらに、group に示されるグループもグループアクセスリストに追加され
る。
user 引数は NULL であってはならない。
返り値
initgroups() 関数は、成功すると 0 を返す。エラーの場合は -1 を 返 し 、
errno を適切に設定する。
エラー
ENOMEM グループ情報構造体を配置するためのメモリが不足している。
EPERM 呼出しプロセスが十分な特権を持っていない。この関数の裏で実行され
るシステムコール setgroups(2) も参照のこと。
ファイル
/etc/group グループデータベースファイル
準拠
SVr4, 4.3BSD.
関連項目
getgroups(2), setgroups(2), credentials(7)
GNU 2007-07-26 INITGROUPS(3)
INITGROUPS(3) Linux Programmer’s Manual INITGROUPS(3)
NAME
initgroups - initialize the supplementary group access list
SYNOPSIS
#include
#include
int initgroups(const char *user, gid_t group);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
initgroups(): _BSD_SOURCE
DESCRIPTION
The initgroups() function initializes the group access list by reading
the group database /etc/group and using all groups of which user is a
member. The additional group group is also added to the list.
The user argument must be non-NULL.
RETURN VALUE
The initgroups() function returns 0 on success. On error, -1 is
returned, and errno is set appropriately.
ERRORS
ENOMEM Insufficient memory to allocate group information structure.
EPERM The calling process has insufficient privilege. See the under-
lying system call setgroups(2).
FILES
/etc/group group database file
CONFORMING TO
SVr4, 4.3BSD.
SEE ALSO
getgroups(2), setgroups(2), credentials(7)
COLOPHON
This page is part of release 3.22 of the Linux man-pages project. A
description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
GNU 2007-07-26 INITGROUPS(3)