1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
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.
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.
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
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" References consulted:
24 .\" Linux libc source code
25 .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
27 .\" Modified Sat Jul 24 19:29:54 1993 by Rik Faith (faith@cs.unc.edu)
29 .\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka
30 .\" all rights reserved.
31 .\" Translated 1997-12-19, HIROFUMI Nishizuka <nishi@rpts.cl.nec.co.jp>
32 .\" Updated & Modified 2004-05-30, Yuichi SATO <ysato444@yahoo.co.jp>
33 .\" Updated & Modified 2005-09-06, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
35 .TH GETGRENT 3 2010-10-21 "" "Linux Programmer's Manual"
37 getgrent, setgrent, endgrent \- グループファイルエントリの取得
40 .B #include <sys/types.h>
43 .B struct group *getgrent(void);
45 .B void setgrent(void);
47 .B void endgrent(void);
52 .RB ( feature_test_macros (7)
60 _SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 ||
61 _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED ||
63 /* Since glibc 2.12: */ _POSIX_C_SOURCE\ >=\ 200809L
69 _SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 ||
70 _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
76 関数は、グループ・データベースから取得したエントリを
77 要素毎に分解し、各要素を格納した構造体へのポインタを返す
83 は、最初に呼び出された時は最初のエントリを返し、
84 それ以降は呼び出される毎に次のエントリを返す。
94 \fIgroup\fP 構造体は、\fI<grp.h>\fP で以下のように定義されている:
99 char *gr_name; /* グループ名 */
100 char *gr_passwd; /* グループのパスワード */
101 gid_t gr_gid; /* グループ ID */
102 char **gr_mem; /* グループのメンバ */
115 これ以上エントリが無いか、エラーが発生した場合は NULL を返す。
143 呼び出したプロセスが既にファイルをオープンし過ぎている。
146 システム上にオープンされたファイルが多過ぎる。
160 SVr4, 4.3BSD, POSIX.1-2001.
166 .BR getgrouplist (3),