OSDN Git Service

(split) LDP v3.30, v3.31 の定型的な変更内容を反映。
[linuxjm/LDP_man-pages.git] / release / man3 / getgrent.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 Sat Jul 24 19:29:54 1993 by Rik Faith (faith@cs.unc.edu)
28 .\"
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>
34 .\"
35 .TH GETGRENT 3  2010-10-21 "" "Linux Programmer's Manual"
36 .SH Ì¾Á°
37 getgrent, setgrent, endgrent \- ¥°¥ë¡¼¥×¥Õ¥¡¥¤¥ë¥¨¥ó¥È¥ê¤Î¼èÆÀ
38 .SH ½ñ¼°
39 .nf
40 .B #include <sys/types.h>
41 .B #include <grp.h>
42 .sp
43 .B struct group *getgrent(void);
44 .sp
45 .B void setgrent(void);
46 .sp
47 .B void endgrent(void);
48 .fi
49 .sp
50 .in -4n
51 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
52 .RB ( feature_test_macros (7)
53 »²¾È):
54 .in
55 .sp
56 .PD 0
57 .ad l
58 .BR setgrent ():
59 .RS 4
60 _SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 ||
61 _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED ||
62 .br
63 /* Since glibc 2.12: */ _POSIX_C_SOURCE\ >=\ 200809L
64 .RE
65 .sp
66 .BR getgrent (),
67 .BR endgrent ():
68 .RS 4
69 _SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 ||
70 _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
71 .RE
72 .PD
73 .ad b
74 .SH ÀâÌÀ
75 .BR getgrent ()
76 ´Ø¿ô¤Ï¡¢¥°¥ë¡¼¥×¡¦¥Ç¡¼¥¿¥Ù¡¼¥¹¤«¤é¼èÆÀ¤·¤¿¥¨¥ó¥È¥ê¤ò
77 Í×ÁÇËè¤Ëʬ²ò¤·¡¢³ÆÍ×ÁǤò³ÊǼ¤·¤¿¹½Â¤ÂΤؤΥݥ¤¥ó¥¿¤òÊÖ¤¹
78 (¥°¥ë¡¼¥×¡¦¥Ç¡¼¥¿¥Ù¡¼¥¹¤ÎÎã:
79 ¥í¡¼¥«¥ë¤Î¥°¥ë¡¼¥×¥Õ¥¡¥¤¥ë
80 .IR /etc/group ,
81 NIS, LDAP)¡£
82 .BR getgrent ()
83 ¤Ï¡¢ºÇ½é¤Ë¸Æ¤Ó½Ð¤µ¤ì¤¿»þ¤ÏºÇ½é¤Î¥¨¥ó¥È¥ê¤òÊÖ¤·¡¢
84 ¤½¤ì°Ê¹ß¤Ï¸Æ¤Ó½Ð¤µ¤ì¤ëËè¤Ë¼¡¤Î¥¨¥ó¥È¥ê¤òÊÖ¤¹¡£
85 .PP
86 .BR setgrent ()
87 ´Ø¿ô¤ò»È¤¦¤È¡¢¤â¤¦°ìÅÙÆɤ߹þ¤á¤ë¤è¤¦¤Ë¡¢
88 ¥°¥ë¡¼¥×¡¦¥Ç¡¼¥¿¥Ù¡¼¥¹¤ÎÀèƬ¤ËÌá¤ë¡£
89 .PP
90 .BR endgrent ()
91 ´Ø¿ô¤Ï¡¢Á´¤Æ¤Î½èÍý¤¬½ª¤ï¤Ã¤¿¸å¤Ë¥°¥ë¡¼¥×¡¦
92 ¥Ç¡¼¥¿¥Ù¡¼¥¹¤ò¥¯¥í¡¼¥º¤¹¤ë¡£
93 .PP
94 \fIgroup\fP ¹½Â¤ÂΤϡ¢\fI<grp.h>\fP ¤Ç°Ê²¼¤Î¤è¤¦¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤ë:
95 .sp
96 .in +4n
97 .nf
98 struct group {
99     char   *gr_name;       /* ¥°¥ë¡¼¥×̾ */
100     char   *gr_passwd;     /* ¥°¥ë¡¼¥×¤Î¥Ñ¥¹¥ï¡¼¥É */
101     gid_t   gr_gid;        /* ¥°¥ë¡¼¥× ID */
102     char  **gr_mem;        /* ¥°¥ë¡¼¥×¤Î¥á¥ó¥Ð */
103 };
104 .fi
105 .in
106 .PP
107 ¤³¤Î¹½Â¤ÂΤΥե£¡¼¥ë¥É¤Î¾ÜºÙ¤Ï
108 .BR group (5)
109 ¤ò»²¾È¤Î¤³¤È¡£
110 .SH ÊÖ¤êÃÍ
111 .BR getgrent ()
112 ´Ø¿ô¤Ï
113 .I group
114 ¹½Â¤ÂΤؤΥݥ¤¥ó¥¿¤òÊÖ¤¹¡£
115 ¤³¤ì°Ê¾å¥¨¥ó¥È¥ê¤¬Ìµ¤¤¤«¡¢¥¨¥é¡¼¤¬È¯À¸¤·¤¿¾ì¹ç¤Ï NULL ¤òÊÖ¤¹¡£
116 .LP
117 ¥¨¥é¡¼¤¬È¯À¸¤¹¤ë¤È¡¢
118 .I errno
119 ¤¬Å¬ÀÚ¤ËÀßÄꤵ¤ì¤ë¡£
120 ¤³¤Î´Ø¿ô¤Î¸Æ¤Ó½Ð¤·¸å¤Ë
121 .I errno
122 ¤ò¥Á¥§¥Ã¥¯¤·¤¿¤¤¾ì¹ç¤Ï¡¢¸Æ¤Ó½Ð¤·Á°¤Ë
123 .I errno
124 ¤ò 0 ¤ËÀßÄꤷ¤Æ¤ª¤«¤Ê¤¤¤È¤¤¤±¤Ê¤¤¡£
125
126 ÊÖ¤êÃͤÏÀÅŪ¤ÊÎΰè¤ò»Ø¤·¤Æ¤ª¤ê¡¢¤½¤Î¸å¤Î
127 .BR getgrent (),
128 .BR getgrgid (3),
129 .BR getgrnam (3)
130 ¤Î¸Æ¤Ó½Ð¤·¤Ç¾å½ñ¤­¤µ¤ì¤ë¤«¤â¤·¤ì¤Ê¤¤¡£
131 (ÊÖ¤µ¤ì¤¿¥Ý¥¤¥ó¥¿¤ò
132 .BR free (3)
133 ¤ËÅϤµ¤Ê¤¤¤³¤È¡£)
134 .SH ¥¨¥é¡¼
135 .TP
136 .B EINTR
137 ¥·¥°¥Ê¥ë¤¬¥­¥ã¥Ã¥Á¤µ¤ì¤¿¡£
138 .TP
139 .B EIO
140 I/O ¥¨¥é¡¼¡£
141 .TP
142 .B EMFILE
143 ¸Æ¤Ó½Ð¤·¤¿¥×¥í¥»¥¹¤¬´û¤Ë¥Õ¥¡¥¤¥ë¤ò¥ª¡¼¥×¥ó¤·²á¤®¤Æ¤¤¤ë¡£
144 .TP
145 .B ENFILE
146 ¥·¥¹¥Æ¥à¾å¤Ë¥ª¡¼¥×¥ó¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¤¬Â¿²á¤®¤ë¡£
147 .TP
148 .B ENOMEM
149 .\" POSIX ¤Ë¤Ï¤Ê¤¤¡£
150 .I group
151 ¹½Â¤ÂΤò³ä¤êÅö¤Æ¤ë¤¿¤á¤Î¥á¥â¥ê¤¬ÉÔ½½Ê¬¡£
152 .TP
153 .B ERANGE
154 ½½Ê¬¤Ê¥Ð¥Ã¥Õ¥¡¶õ´Ö¤¬¤Ê¤¤¡£
155 .SH ¥Õ¥¡¥¤¥ë
156 .TP
157 .I /etc/group
158 ¥í¡¼¥«¥ë¤Î¥°¥ë¡¼¥×¡¦¥Ç¡¼¥¿¥Ù¡¼¥¹¥Õ¥¡¥¤¥ë
159 .SH ½àµò
160 SVr4, 4.3BSD, POSIX.1-2001.
161 .SH ´ØÏ¢¹àÌÜ
162 .BR fgetgrent (3),
163 .BR getgrent_r (3),
164 .BR getgrgid (3),
165 .BR getgrnam (3)
166 .BR getgrouplist (3),
167 .BR putgrent (3),
168 .BR group (5)