OSDN Git Service

ceb1a7f1baa4e3dbd09d3b47bee3c0343bc43129
[linuxjm/LDP_man-pages.git] / po4a / pwdgrp / po / pwdgrp.pot
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 #, fuzzy
7 msgid ""
8 msgstr ""
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2013-03-22 01:06+0900\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <LL@li.org>\n"
14 "Language: \n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=CHARSET\n"
17 "Content-Transfer-Encoding: 8bit\n"
18
19 #. type: TH
20 #: build/C/man3/fgetgrent.3:30
21 #, no-wrap
22 msgid "FGETGRENT"
23 msgstr ""
24
25 #. type: TH
26 #: build/C/man3/fgetgrent.3:30 build/C/man3/fgetpwent.3:33
27 #, no-wrap
28 msgid "2008-07-10"
29 msgstr ""
30
31 #. type: TH
32 #: build/C/man3/fgetgrent.3:30 build/C/man3/fgetpwent.3:33 build/C/man3/getgrent_r.3:24 build/C/man3/getgrouplist.3:29 build/C/man3/getpw.3:32 build/C/man3/getpwent.3:33 build/C/man3/getpwent_r.3:24 build/C/man3/getpwnam.3:37 build/C/man3/getspnam.3:8 build/C/man3/initgroups.3:32 build/C/man3/putgrent.3:7 build/C/man3/putpwent.3:30 build/C/man3/setaliasent.3:9
33 #, no-wrap
34 msgid "GNU"
35 msgstr ""
36
37 #. type: TH
38 #: build/C/man3/fgetgrent.3:30 build/C/man3/fgetpwent.3:33 build/C/man5/ftpusers.5:19 build/C/man3/getgrent.3:30 build/C/man3/getgrent_r.3:24 build/C/man3/getgrnam.3:33 build/C/man3/getgrouplist.3:29 build/C/man3/getpw.3:32 build/C/man3/getpwent.3:33 build/C/man3/getpwent_r.3:24 build/C/man3/getpwnam.3:37 build/C/man3/getspnam.3:8 build/C/man5/group.5:26 build/C/man3/initgroups.3:32 build/C/man5/passwd.5:30 build/C/man3/putgrent.3:7 build/C/man3/putpwent.3:30 build/C/man3/setaliasent.3:9
39 #, no-wrap
40 msgid "Linux Programmer's Manual"
41 msgstr ""
42
43 #. type: SH
44 #: build/C/man3/fgetgrent.3:31 build/C/man3/fgetpwent.3:34 build/C/man5/ftpusers.5:20 build/C/man3/getgrent.3:31 build/C/man3/getgrent_r.3:25 build/C/man3/getgrnam.3:34 build/C/man3/getgrouplist.3:30 build/C/man3/getpw.3:33 build/C/man3/getpwent.3:34 build/C/man3/getpwent_r.3:25 build/C/man3/getpwnam.3:38 build/C/man3/getspnam.3:9 build/C/man5/group.5:27 build/C/man3/initgroups.3:33 build/C/man5/passwd.5:31 build/C/man3/putgrent.3:8 build/C/man3/putpwent.3:31 build/C/man3/setaliasent.3:10
45 #, no-wrap
46 msgid "NAME"
47 msgstr ""
48
49 #. type: Plain text
50 #: build/C/man3/fgetgrent.3:33
51 msgid "fgetgrent - get group file entry"
52 msgstr ""
53
54 #. type: SH
55 #: build/C/man3/fgetgrent.3:33 build/C/man3/fgetpwent.3:36 build/C/man3/getgrent.3:33 build/C/man3/getgrent_r.3:27 build/C/man3/getgrnam.3:36 build/C/man3/getgrouplist.3:32 build/C/man3/getpw.3:35 build/C/man3/getpwent.3:36 build/C/man3/getpwent_r.3:27 build/C/man3/getpwnam.3:40 build/C/man3/getspnam.3:13 build/C/man3/initgroups.3:35 build/C/man3/putgrent.3:10 build/C/man3/putpwent.3:33 build/C/man3/setaliasent.3:13
56 #, no-wrap
57 msgid "SYNOPSIS"
58 msgstr ""
59
60 #. type: Plain text
61 #: build/C/man3/fgetgrent.3:38
62 #, no-wrap
63 msgid ""
64 "B<#include E<lt>stdio.hE<gt>>\n"
65 "B<#include E<lt>sys/types.hE<gt>>\n"
66 "B<#include E<lt>grp.hE<gt>>\n"
67 msgstr ""
68
69 #. type: Plain text
70 #: build/C/man3/fgetgrent.3:40
71 #, no-wrap
72 msgid "B<struct group *fgetgrent(FILE *>I<stream>B<);>\n"
73 msgstr ""
74
75 #. type: Plain text
76 #: build/C/man3/fgetgrent.3:45 build/C/man3/fgetpwent.3:48 build/C/man3/getgrent.3:48 build/C/man3/getgrent_r.3:43 build/C/man3/getgrnam.3:57 build/C/man3/getgrouplist.3:42 build/C/man3/getpwent.3:51 build/C/man3/getpwent_r.3:43 build/C/man3/getpwnam.3:61 build/C/man3/getspnam.3:61 build/C/man3/initgroups.3:46 build/C/man3/putpwent.3:45
77 msgid "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
78 msgstr ""
79
80 #. type: Plain text
81 #: build/C/man3/fgetgrent.3:49
82 msgid "B<fgetgrent>(): _SVID_SOURCE"
83 msgstr ""
84
85 #. type: SH
86 #: build/C/man3/fgetgrent.3:49 build/C/man3/fgetpwent.3:52 build/C/man5/ftpusers.5:22 build/C/man3/getgrent.3:68 build/C/man3/getgrent_r.3:51 build/C/man3/getgrnam.3:67 build/C/man3/getgrouplist.3:46 build/C/man3/getpw.3:43 build/C/man3/getpwent.3:62 build/C/man3/getpwent_r.3:50 build/C/man3/getpwnam.3:71 build/C/man3/getspnam.3:72 build/C/man5/group.5:29 build/C/man3/initgroups.3:50 build/C/man5/passwd.5:33 build/C/man3/putgrent.3:16 build/C/man3/putpwent.3:49 build/C/man3/setaliasent.3:31
87 #, no-wrap
88 msgid "DESCRIPTION"
89 msgstr ""
90
91 #. type: Plain text
92 #: build/C/man3/fgetgrent.3:63
93 msgid ""
94 "The B<fgetgrent>()  function returns a pointer to a structure containing the "
95 "group information from the file referred to by I<stream>.  The first time it "
96 "is called it returns the first entry; thereafter, it returns successive "
97 "entries.  The file referred to by I<stream> must have the same format as "
98 "I</etc/group> (see B<group>(5))."
99 msgstr ""
100
101 #. type: Plain text
102 #: build/C/man3/fgetgrent.3:65 build/C/man3/getgrent.3:92 build/C/man3/getgrent_r.3:68 build/C/man3/getgrnam.3:86
103 msgid "The I<group> structure is defined in I<E<lt>grp.hE<gt>> as follows:"
104 msgstr ""
105
106 #. type: Plain text
107 #: build/C/man3/fgetgrent.3:74
108 #, no-wrap
109 msgid ""
110 "struct group {\n"
111 "    char   *gr_name;        /* group name */\n"
112 "    char   *gr_passwd;      /* group password */\n"
113 "    gid_t   gr_gid;         /* group ID */\n"
114 "    char  **gr_mem;         /* group members */\n"
115 "};\n"
116 msgstr ""
117
118 #. type: SH
119 #: build/C/man3/fgetgrent.3:76 build/C/man3/fgetpwent.3:81 build/C/man3/getgrent.3:106 build/C/man3/getgrent_r.3:101 build/C/man3/getgrnam.3:136 build/C/man3/getgrouplist.3:78 build/C/man3/getpw.3:72 build/C/man3/getpwent.3:103 build/C/man3/getpwent_r.3:103 build/C/man3/getpwnam.3:143 build/C/man3/getspnam.3:216 build/C/man3/initgroups.3:62 build/C/man3/putgrent.3:38 build/C/man3/putpwent.3:70 build/C/man3/setaliasent.3:88
120 #, no-wrap
121 msgid "RETURN VALUE"
122 msgstr ""
123
124 #. type: Plain text
125 #: build/C/man3/fgetgrent.3:83
126 msgid ""
127 "The B<fgetgrent>()  function returns a pointer to a I<group> structure, or "
128 "NULL if there are no more entries or an error occurs."
129 msgstr ""
130
131 #. type: SH
132 #: build/C/man3/fgetgrent.3:83 build/C/man3/fgetpwent.3:88 build/C/man3/getgrent.3:129 build/C/man3/getgrent_r.3:108 build/C/man3/getgrnam.3:174 build/C/man3/getpw.3:78 build/C/man3/getpwent.3:125 build/C/man3/getpwent_r.3:110 build/C/man3/getpwnam.3:181 build/C/man3/getspnam.3:227 build/C/man3/initgroups.3:69 build/C/man3/putpwent.3:75
133 #, no-wrap
134 msgid "ERRORS"
135 msgstr ""
136
137 #. type: TP
138 #: build/C/man3/fgetgrent.3:84 build/C/man3/fgetpwent.3:89 build/C/man3/getgrent.3:142 build/C/man3/getgrnam.3:196 build/C/man3/getpw.3:87 build/C/man3/getpwent.3:140 build/C/man3/getpwnam.3:203 build/C/man3/initgroups.3:70
139 #, no-wrap
140 msgid "B<ENOMEM>"
141 msgstr ""
142
143 #.  not in POSIX
144 #.  to allocate the group structure, or to allocate buffers
145 #. type: Plain text
146 #: build/C/man3/fgetgrent.3:89 build/C/man3/getgrent.3:148 build/C/man3/getgrnam.3:203
147 msgid "Insufficient memory to allocate I<group> structure."
148 msgstr ""
149
150 #. type: SH
151 #: build/C/man3/fgetgrent.3:89 build/C/man3/fgetpwent.3:98 build/C/man3/getgrent.3:155 build/C/man3/getgrent_r.3:116 build/C/man3/getgrnam.3:210 build/C/man3/getgrouplist.3:98 build/C/man3/getpw.3:96 build/C/man3/getpwent.3:154 build/C/man3/getpwent_r.3:118 build/C/man3/getpwnam.3:217 build/C/man3/getspnam.3:247 build/C/man3/initgroups.3:82 build/C/man3/putgrent.3:40 build/C/man3/putpwent.3:79 build/C/man3/setaliasent.3:100
152 #, no-wrap
153 msgid "CONFORMING TO"
154 msgstr ""
155
156 #. type: Plain text
157 #: build/C/man3/fgetgrent.3:91 build/C/man3/fgetpwent.3:100 build/C/man3/putpwent.3:81
158 msgid "SVr4."
159 msgstr ""
160
161 #. type: SH
162 #: build/C/man3/fgetgrent.3:91 build/C/man3/fgetpwent.3:100 build/C/man5/ftpusers.5:49 build/C/man3/getgrent.3:157 build/C/man3/getgrent_r.3:183 build/C/man3/getgrnam.3:233 build/C/man3/getgrouplist.3:189 build/C/man3/getpw.3:105 build/C/man3/getpwent.3:159 build/C/man3/getpwent_r.3:180 build/C/man3/getpwnam.3:313 build/C/man3/getspnam.3:251 build/C/man5/group.5:61 build/C/man3/initgroups.3:84 build/C/man5/passwd.5:162 build/C/man3/putgrent.3:42 build/C/man3/putpwent.3:81 build/C/man3/setaliasent.3:144
163 #, no-wrap
164 msgid "SEE ALSO"
165 msgstr ""
166
167 #. type: Plain text
168 #: build/C/man3/fgetgrent.3:101
169 msgid ""
170 "B<endgrent>(3), B<fgetgrent_r>(3), B<fopen>(3), B<getgrent>(3), "
171 "B<getgrgid>(3), B<getgrnam>(3), B<putgrent>(3), B<setgrent>(3), B<group>(5)"
172 msgstr ""
173
174 #. type: SH
175 #: build/C/man3/fgetgrent.3:101 build/C/man3/fgetpwent.3:111 build/C/man5/ftpusers.5:53 build/C/man3/getgrent.3:165 build/C/man3/getgrent_r.3:190 build/C/man3/getgrnam.3:240 build/C/man3/getgrouplist.3:195 build/C/man3/getpw.3:114 build/C/man3/getpwent.3:167 build/C/man3/getpwent_r.3:188 build/C/man3/getpwnam.3:323 build/C/man3/getspnam.3:256 build/C/man5/group.5:67 build/C/man3/initgroups.3:88 build/C/man5/passwd.5:171 build/C/man3/putgrent.3:46 build/C/man3/putpwent.3:89 build/C/man3/setaliasent.3:153
176 #, no-wrap
177 msgid "COLOPHON"
178 msgstr ""
179
180 #. type: Plain text
181 #: build/C/man3/fgetgrent.3:108 build/C/man3/fgetpwent.3:118 build/C/man5/ftpusers.5:60 build/C/man3/getgrent.3:172 build/C/man3/getgrent_r.3:197 build/C/man3/getgrnam.3:247 build/C/man3/getgrouplist.3:202 build/C/man3/getpw.3:121 build/C/man3/getpwent.3:174 build/C/man3/getpwent_r.3:195 build/C/man3/getpwnam.3:330 build/C/man3/getspnam.3:263 build/C/man5/group.5:74 build/C/man3/initgroups.3:95 build/C/man5/passwd.5:178 build/C/man3/putgrent.3:53 build/C/man3/putpwent.3:96 build/C/man3/setaliasent.3:160
182 msgid ""
183 "This page is part of release 3.50 of the Linux I<man-pages> project.  A "
184 "description of the project, and information about reporting bugs, can be "
185 "found at http://www.kernel.org/doc/man-pages/."
186 msgstr ""
187
188 #. type: TH
189 #: build/C/man3/fgetpwent.3:33
190 #, no-wrap
191 msgid "FGETPWENT"
192 msgstr ""
193
194 #. type: Plain text
195 #: build/C/man3/fgetpwent.3:36
196 msgid "fgetpwent - get password file entry"
197 msgstr ""
198
199 #. type: Plain text
200 #: build/C/man3/fgetpwent.3:41 build/C/man3/putpwent.3:38
201 #, no-wrap
202 msgid ""
203 "B<#include E<lt>stdio.hE<gt>>\n"
204 "B<#include E<lt>sys/types.hE<gt>>\n"
205 "B<#include E<lt>pwd.hE<gt>>\n"
206 msgstr ""
207
208 #. type: Plain text
209 #: build/C/man3/fgetpwent.3:43
210 #, no-wrap
211 msgid "B<struct passwd *fgetpwent(FILE *>I<stream>B<);>\n"
212 msgstr ""
213
214 #. type: Plain text
215 #: build/C/man3/fgetpwent.3:52
216 msgid "B<fgetpwent>(): _SVID_SOURCE"
217 msgstr ""
218
219 #. type: Plain text
220 #: build/C/man3/fgetpwent.3:65
221 msgid ""
222 "The B<fgetpwent>()  function returns a pointer to a structure containing the "
223 "broken out fields of a line in the file I<stream>.  The first time it is "
224 "called it returns the first entry; thereafter, it returns successive "
225 "entries.  The file referred to by I<stream> must have the same format as "
226 "I</etc/passwd> (see B<passwd>(5))."
227 msgstr ""
228
229 #. type: Plain text
230 #: build/C/man3/fgetpwent.3:67 build/C/man3/getpw.3:55 build/C/man3/getpwent.3:86 build/C/man3/getpwent_r.3:67 build/C/man3/getpwnam.3:90 build/C/man3/putpwent.3:56
231 msgid "The I<passwd> structure is defined in I<E<lt>pwd.hE<gt>> as follows:"
232 msgstr ""
233
234 #. type: Plain text
235 #: build/C/man3/fgetpwent.3:79
236 #, no-wrap
237 msgid ""
238 "struct passwd {\n"
239 "    char   *pw_name;       /* username */\n"
240 "    char   *pw_passwd;     /* user password */\n"
241 "    uid_t   pw_uid;        /* user ID */\n"
242 "    gid_t   pw_gid;        /* group ID */\n"
243 "    char   *pw_gecos;      /* real name */\n"
244 "    char   *pw_dir;        /* home directory */\n"
245 "    char   *pw_shell;      /* shell program */\n"
246 "};\n"
247 msgstr ""
248
249 #. type: Plain text
250 #: build/C/man3/fgetpwent.3:88
251 msgid ""
252 "The B<fgetpwent>()  function returns a pointer to a I<passwd> structure, or "
253 "NULL if there are no more entries or an error occurs."
254 msgstr ""
255
256 #.  not in POSIX
257 #.  This structure is static, allocated 0 or 1 times. No memory leak. (libc45)
258 #. type: Plain text
259 #: build/C/man3/fgetpwent.3:94 build/C/man3/getpw.3:92 build/C/man3/getpwent.3:147 build/C/man3/getpwnam.3:210
260 msgid "Insufficient memory to allocate I<passwd> structure."
261 msgstr ""
262
263 #. type: SH
264 #: build/C/man3/fgetpwent.3:94 build/C/man5/ftpusers.5:47 build/C/man3/getgrent.3:151 build/C/man3/getgrnam.3:206 build/C/man3/getpw.3:92 build/C/man3/getpwent.3:150 build/C/man3/getpwnam.3:213 build/C/man3/getspnam.3:234 build/C/man5/group.5:53 build/C/man3/initgroups.3:78 build/C/man5/passwd.5:142 build/C/man3/setaliasent.3:94
265 #, no-wrap
266 msgid "FILES"
267 msgstr ""
268
269 #. type: Plain text
270 #: build/C/man3/fgetpwent.3:95 build/C/man3/getpw.3:93 build/C/man3/getpwent.3:151 build/C/man3/getpwnam.3:214 build/C/man5/passwd.5:144
271 #, no-wrap
272 msgid "I</etc/passwd>"
273 msgstr ""
274
275 #. type: Plain text
276 #: build/C/man3/fgetpwent.3:98 build/C/man3/getpw.3:96
277 msgid "password database file"
278 msgstr ""
279
280 #. type: Plain text
281 #: build/C/man3/fgetpwent.3:111
282 msgid ""
283 "B<endpwent>(3), B<fgetpwent_r>(3), B<fopen>(3), B<getpw>(3), B<getpwent>(3), "
284 "B<getpwnam>(3), B<getpwuid>(3), B<putpwent>(3), B<setpwent>(3), B<passwd>(5)"
285 msgstr ""
286
287 #. type: TH
288 #: build/C/man5/ftpusers.5:19
289 #, no-wrap
290 msgid "FTPUSERS"
291 msgstr ""
292
293 #. type: TH
294 #: build/C/man5/ftpusers.5:19
295 #, no-wrap
296 msgid "2000-08-27"
297 msgstr ""
298
299 #. type: TH
300 #: build/C/man5/ftpusers.5:19 build/C/man5/group.5:26 build/C/man5/passwd.5:30
301 #, no-wrap
302 msgid "Linux"
303 msgstr ""
304
305 #. type: Plain text
306 #: build/C/man5/ftpusers.5:22
307 msgid "ftpusers - list of users that may not log in via the FTP daemon"
308 msgstr ""
309
310 #. type: Plain text
311 #: build/C/man5/ftpusers.5:41
312 msgid ""
313 "The text file B<ftpusers> contains a list of users that may not log in using "
314 "the File Transfer Protocol (FTP) server daemon.  This file is used not "
315 "merely for system administration purposes but for improving security within "
316 "a TCP/IP networked environment.  It will typically contain a list of the "
317 "users that either have no business using ftp or have too many privileges to "
318 "be allowed to log in through the FTP server daemon.  Such users usually "
319 "include root, daemon, bin, uucp, and news.  If your FTP server daemon "
320 "doesn't use B<ftpusers> then it is suggested that you read its documentation "
321 "to find out how to block access for certain users.  Washington University "
322 "FTP server Daemon (wuftpd) and Professional FTP Daemon (proftpd) are known "
323 "to make use of B<ftpusers>."
324 msgstr ""
325
326 #. type: SS
327 #: build/C/man5/ftpusers.5:41
328 #, no-wrap
329 msgid "Format"
330 msgstr ""
331
332 #. type: Plain text
333 #: build/C/man5/ftpusers.5:47
334 msgid ""
335 "The format of B<ftpusers> is very simple.  There is one account name (or "
336 "username) per line.  Lines starting with a # are ignored."
337 msgstr ""
338
339 #. type: Plain text
340 #: build/C/man5/ftpusers.5:49
341 msgid "I</etc/ftpusers>"
342 msgstr ""
343
344 #. type: Plain text
345 #: build/C/man5/ftpusers.5:53
346 msgid "B<passwd>(5), B<proftpd>(8), B<wuftpd>(8)"
347 msgstr ""
348
349 #. type: TH
350 #: build/C/man3/getgrent.3:30
351 #, no-wrap
352 msgid "GETGRENT"
353 msgstr ""
354
355 #. type: TH
356 #: build/C/man3/getgrent.3:30 build/C/man3/getgrent_r.3:24 build/C/man3/getpw.3:32 build/C/man3/getpwent.3:33 build/C/man3/getpwent_r.3:24 build/C/man5/group.5:26
357 #, no-wrap
358 msgid "2010-10-21"
359 msgstr ""
360
361 #. type: Plain text
362 #: build/C/man3/getgrent.3:33
363 msgid "getgrent, setgrent, endgrent - get group file entry"
364 msgstr ""
365
366 #. type: Plain text
367 #: build/C/man3/getgrent.3:37 build/C/man3/getgrnam.3:40 build/C/man3/initgroups.3:39
368 #, no-wrap
369 msgid ""
370 "B<#include E<lt>sys/types.hE<gt>>\n"
371 "B<#include E<lt>grp.hE<gt>>\n"
372 msgstr ""
373
374 #. type: Plain text
375 #: build/C/man3/getgrent.3:39
376 #, no-wrap
377 msgid "B<struct group *getgrent(void);>\n"
378 msgstr ""
379
380 #. type: Plain text
381 #: build/C/man3/getgrent.3:41
382 #, no-wrap
383 msgid "B<void setgrent(void);>\n"
384 msgstr ""
385
386 #. type: Plain text
387 #: build/C/man3/getgrent.3:43
388 #, no-wrap
389 msgid "B<void endgrent(void);>\n"
390 msgstr ""
391
392 #. type: Plain text
393 #: build/C/man3/getgrent.3:53
394 msgid "B<setgrent>():"
395 msgstr ""
396
397 #. type: Plain text
398 #: build/C/man3/getgrent.3:56
399 msgid ""
400 "_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || "
401 "_XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED ||"
402 msgstr ""
403
404 #. type: Plain text
405 #: build/C/man3/getgrent.3:58
406 msgid "/* Since glibc 2.12: */ _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
407 msgstr ""
408
409 #. type: Plain text
410 #: build/C/man3/getgrent.3:62
411 msgid "B<getgrent>(), B<endgrent>():"
412 msgstr ""
413
414 #. type: Plain text
415 #: build/C/man3/getgrent.3:65
416 msgid ""
417 "_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || "
418 "_XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED"
419 msgstr ""
420
421 #. type: Plain text
422 #: build/C/man3/getgrent.3:80
423 msgid ""
424 "The B<getgrent>()  function returns a pointer to a structure containing the "
425 "broken-out fields of a record in the group database (e.g., the local group "
426 "file I</etc/group>, NIS, and LDAP).  The first time B<getgrent>()  is "
427 "called, it returns the first entry; thereafter, it returns successive "
428 "entries."
429 msgstr ""
430
431 #. type: Plain text
432 #: build/C/man3/getgrent.3:85
433 msgid ""
434 "The B<setgrent>()  function rewinds to the beginning of the group database, "
435 "to allow repeated scans."
436 msgstr ""
437
438 #. type: Plain text
439 #: build/C/man3/getgrent.3:90
440 msgid ""
441 "The B<endgrent>()  function is used to close the group database after all "
442 "processing has been performed."
443 msgstr ""
444
445 #. type: Plain text
446 #: build/C/man3/getgrent.3:101 build/C/man3/getgrnam.3:95
447 #, no-wrap
448 msgid ""
449 "struct group {\n"
450 "    char   *gr_name;       /* group name */\n"
451 "    char   *gr_passwd;     /* group password */\n"
452 "    gid_t   gr_gid;        /* group ID */\n"
453 "    char  **gr_mem;        /* group members */\n"
454 "};\n"
455 msgstr ""
456
457 #. type: Plain text
458 #: build/C/man3/getgrent.3:106 build/C/man3/getgrent_r.3:82 build/C/man3/getgrnam.3:100
459 msgid "For more information about the fields of this structure, see B<group>(5)."
460 msgstr ""
461
462 #. type: Plain text
463 #: build/C/man3/getgrent.3:113
464 msgid ""
465 "The B<getgrent>()  function returns a pointer to a I<group> structure, or "
466 "NULL if there are no more entries or an error occurs."
467 msgstr ""
468
469 #. type: Plain text
470 #: build/C/man3/getgrent.3:120
471 msgid ""
472 "Upon error, I<errno> may be set.  If one wants to check I<errno> after the "
473 "call, it should be set to zero before the call."
474 msgstr ""
475
476 #. type: Plain text
477 #: build/C/man3/getgrent.3:129
478 msgid ""
479 "The return value may point to a static area, and may be overwritten by "
480 "subsequent calls to B<getgrent>(), B<getgrgid>(3), or B<getgrnam>(3).  (Do "
481 "not pass the returned pointer to B<free>(3).)"
482 msgstr ""
483
484 #. type: TP
485 #: build/C/man3/getgrent.3:130 build/C/man3/getgrnam.3:182 build/C/man3/getpwent.3:126 build/C/man3/getpwnam.3:189
486 #, no-wrap
487 msgid "B<EINTR>"
488 msgstr ""
489
490 #. type: Plain text
491 #: build/C/man3/getgrent.3:133 build/C/man3/getgrnam.3:185 build/C/man3/getpwent.3:129 build/C/man3/getpwnam.3:192
492 msgid "A signal was caught."
493 msgstr ""
494
495 #. type: TP
496 #: build/C/man3/getgrent.3:133 build/C/man3/getgrnam.3:185 build/C/man3/getpwent.3:129 build/C/man3/getpwnam.3:192
497 #, no-wrap
498 msgid "B<EIO>"
499 msgstr ""
500
501 #. type: Plain text
502 #: build/C/man3/getgrent.3:136 build/C/man3/getgrnam.3:188 build/C/man3/getpwent.3:132 build/C/man3/getpwnam.3:195
503 msgid "I/O error."
504 msgstr ""
505
506 #. type: TP
507 #: build/C/man3/getgrent.3:136 build/C/man3/getgrnam.3:188 build/C/man3/getpwent.3:132 build/C/man3/getpwnam.3:195
508 #, no-wrap
509 msgid "B<EMFILE>"
510 msgstr ""
511
512 #. type: Plain text
513 #: build/C/man3/getgrent.3:139
514 msgid "The calling process already has too many open files."
515 msgstr ""
516
517 #. type: TP
518 #: build/C/man3/getgrent.3:139 build/C/man3/getgrnam.3:193 build/C/man3/getpwent.3:137 build/C/man3/getpwnam.3:200
519 #, no-wrap
520 msgid "B<ENFILE>"
521 msgstr ""
522
523 #. type: Plain text
524 #: build/C/man3/getgrent.3:142
525 msgid "Too many open files in the system."
526 msgstr ""
527
528 #. type: TP
529 #: build/C/man3/getgrent.3:148 build/C/man3/getgrent_r.3:112 build/C/man3/getgrnam.3:203 build/C/man3/getpwent.3:147 build/C/man3/getpwent_r.3:114 build/C/man3/getpwnam.3:210 build/C/man3/getspnam.3:231
530 #, no-wrap
531 msgid "B<ERANGE>"
532 msgstr ""
533
534 #. type: Plain text
535 #: build/C/man3/getgrent.3:151 build/C/man3/getgrnam.3:206 build/C/man3/getpwent.3:150 build/C/man3/getpwnam.3:213
536 msgid "Insufficient buffer space supplied."
537 msgstr ""
538
539 #. type: TP
540 #: build/C/man3/getgrent.3:152 build/C/man3/getgrnam.3:207
541 #, no-wrap
542 msgid "I</etc/group>"
543 msgstr ""
544
545 #. type: Plain text
546 #: build/C/man3/getgrent.3:155 build/C/man3/getgrnam.3:210
547 msgid "local group database file"
548 msgstr ""
549
550 #. type: Plain text
551 #: build/C/man3/getgrent.3:157 build/C/man3/getgrnam.3:212
552 msgid "SVr4, 4.3BSD, POSIX.1-2001."
553 msgstr ""
554
555 #. type: Plain text
556 #: build/C/man3/getgrent.3:165
557 msgid ""
558 "B<fgetgrent>(3), B<getgrent_r>(3), B<getgrgid>(3), B<getgrnam>(3), "
559 "B<getgrouplist>(3), B<putgrent>(3), B<group>(5)"
560 msgstr ""
561
562 #. type: TH
563 #: build/C/man3/getgrent_r.3:24
564 #, no-wrap
565 msgid "GETGRENT_R"
566 msgstr ""
567
568 #. type: Plain text
569 #: build/C/man3/getgrent_r.3:27
570 msgid "getgrent_r, fgetgrent_r - get group file entry reentrantly"
571 msgstr ""
572
573 #. type: Plain text
574 #: build/C/man3/getgrent_r.3:30
575 #, no-wrap
576 msgid "B<#include E<lt>grp.hE<gt>>\n"
577 msgstr ""
578
579 #. type: Plain text
580 #: build/C/man3/getgrent_r.3:32
581 #, no-wrap
582 msgid "B<int getgrent_r(struct group *>I<gbuf>B<, char *>I<buf>B<,>\n"
583 msgstr ""
584
585 #. type: Plain text
586 #: build/C/man3/getgrent_r.3:34
587 #, no-wrap
588 msgid "B<               size_t >I<buflen>B<, struct group **>I<gbufp>B<);>\n"
589 msgstr ""
590
591 #. type: Plain text
592 #: build/C/man3/getgrent_r.3:36
593 #, no-wrap
594 msgid ""
595 "B<int fgetgrent_r(FILE *>I<fp>B<, struct group *>I<gbuf>B<, char "
596 "*>I<buf>B<,>\n"
597 msgstr ""
598
599 #. type: Plain text
600 #: build/C/man3/getgrent_r.3:38
601 #, no-wrap
602 msgid "B<                size_t >I<buflen>B<, struct group **>I<gbufp>B<);>\n"
603 msgstr ""
604
605 #.  FIXME . The FTM requirements seem inconsistent here.  File a glibc bug?
606 #. type: Plain text
607 #: build/C/man3/getgrent_r.3:48
608 msgid "B<getgrent_r>(): _GNU_SOURCE"
609 msgstr ""
610
611 #. type: Plain text
612 #: build/C/man3/getgrent_r.3:51
613 msgid "B<fgetgrent_r>(): _SVID_SOURCE"
614 msgstr ""
615
616 #. type: Plain text
617 #: build/C/man3/getgrent_r.3:64
618 msgid ""
619 "The functions B<getgrent_r>()  and B<fgetgrent_r>()  are the reentrant "
620 "versions of B<getgrent>(3)  and B<fgetgrent>(3).  The former reads the next "
621 "group entry from the stream initialized by B<setgrent>(3).  The latter reads "
622 "the next group entry from the stream I<fp>."
623 msgstr ""
624
625 #. type: Plain text
626 #: build/C/man3/getgrent_r.3:77
627 #, no-wrap
628 msgid ""
629 "struct group {\n"
630 "    char    *gr_name;     /* group name */\n"
631 "    char    *gr_passwd;   /* group password */\n"
632 "    gid_t    gr_gid;      /* group ID */\n"
633 "    char   **gr_mem;      /* group members */\n"
634 "};\n"
635 msgstr ""
636
637 #. type: Plain text
638 #: build/C/man3/getgrent_r.3:101
639 msgid ""
640 "The nonreentrant functions return a pointer to static storage, where this "
641 "static storage contains further pointers to group name, password and "
642 "members.  The reentrant functions described here return all of that in "
643 "caller-provided buffers.  First of all there is the buffer I<gbuf> that can "
644 "hold a I<struct group>.  And next the buffer I<buf> of size I<buflen> that "
645 "can hold additional strings.  The result of these functions, the I<struct "
646 "group> read from the stream, is stored in the provided buffer I<*gbuf>, and "
647 "a pointer to this I<struct group> is returned in I<*gbufp>."
648 msgstr ""
649
650 #. type: Plain text
651 #: build/C/man3/getgrent_r.3:108
652 msgid ""
653 "On success, these functions return 0 and I<*gbufp> is a pointer to the "
654 "I<struct group>.  On error, these functions return an error value and "
655 "I<*gbufp> is NULL."
656 msgstr ""
657
658 #. type: TP
659 #: build/C/man3/getgrent_r.3:109 build/C/man3/getpw.3:83 build/C/man3/getpwent_r.3:111
660 #, no-wrap
661 msgid "B<ENOENT>"
662 msgstr ""
663
664 #. type: Plain text
665 #: build/C/man3/getgrent_r.3:112 build/C/man3/getpwent_r.3:114
666 msgid "No more entries."
667 msgstr ""
668
669 #. type: Plain text
670 #: build/C/man3/getgrent_r.3:116 build/C/man3/getpwent_r.3:118
671 msgid "Insufficient buffer space supplied.  Try again with larger buffer."
672 msgstr ""
673
674 #. type: Plain text
675 #: build/C/man3/getgrent_r.3:121 build/C/man3/getpwent_r.3:123
676 msgid ""
677 "These functions are GNU extensions, done in a style resembling the POSIX "
678 "version of functions like B<getpwnam_r>(3).  Other systems use prototype"
679 msgstr ""
680
681 #. type: Plain text
682 #: build/C/man3/getgrent_r.3:126
683 #, no-wrap
684 msgid ""
685 "struct group *getgrent_r(struct group *grp, char *buf,\n"
686 "                         int buflen);\n"
687 msgstr ""
688
689 #. type: Plain text
690 #: build/C/man3/getgrent_r.3:130 build/C/man3/getpwent_r.3:132
691 msgid "or, better,"
692 msgstr ""
693
694 #. type: Plain text
695 #: build/C/man3/getgrent_r.3:135
696 #, no-wrap
697 msgid ""
698 "int getgrent_r(struct group *grp, char *buf, int buflen,\n"
699 "               FILE **gr_fp);\n"
700 msgstr ""
701
702 #. type: SH
703 #: build/C/man3/getgrent_r.3:137 build/C/man3/getgrnam.3:212 build/C/man3/getpwent_r.3:140 build/C/man3/getpwnam.3:222 build/C/man5/passwd.5:144
704 #, no-wrap
705 msgid "NOTES"
706 msgstr ""
707
708 #. type: Plain text
709 #: build/C/man3/getgrent_r.3:142
710 msgid ""
711 "The function B<getgrent_r>()  is not really reentrant since it shares the "
712 "reading position in the stream with all other threads."
713 msgstr ""
714
715 #. type: SH
716 #: build/C/man3/getgrent_r.3:142 build/C/man3/getgrouplist.3:109 build/C/man3/getpwent_r.3:145 build/C/man3/getpwnam.3:261 build/C/man3/setaliasent.3:114
717 #, no-wrap
718 msgid "EXAMPLE"
719 msgstr ""
720
721 #. type: Plain text
722 #: build/C/man3/getgrent_r.3:149
723 #, no-wrap
724 msgid ""
725 "#define _GNU_SOURCE\n"
726 "#include E<lt>grp.hE<gt>\n"
727 "#include E<lt>stdio.hE<gt>\n"
728 "#include E<lt>stdlib.hE<gt>\n"
729 "#define BUFLEN 4096\n"
730 msgstr ""
731
732 #. type: Plain text
733 #: build/C/man3/getgrent_r.3:156
734 #, no-wrap
735 msgid ""
736 "int\n"
737 "main(void)\n"
738 "{\n"
739 "    struct group grp, *grpp;\n"
740 "    char buf[BUFLEN];\n"
741 "    int i;\n"
742 msgstr ""
743
744 #. type: Plain text
745 #: build/C/man3/getgrent_r.3:173
746 #, no-wrap
747 msgid ""
748 "    setgrent();\n"
749 "    while (1) {\n"
750 "        i = getgrent_r(&grp, buf, BUFLEN, &grpp);\n"
751 "        if (i)\n"
752 "            break;\n"
753 "        printf(\"%s (%d):\", grpp-E<gt>gr_name, grpp-E<gt>gr_gid);\n"
754 "        for (i = 0; ; i++) {\n"
755 "            if (grpp-E<gt>gr_mem[i] == NULL)\n"
756 "                break;\n"
757 "            printf(\" %s\", grpp-E<gt>gr_mem[i]);\n"
758 "        }\n"
759 "        printf(\"\\en\");\n"
760 "    }\n"
761 "    endgrent();\n"
762 "    exit(EXIT_SUCCESS);\n"
763 "}\n"
764 msgstr ""
765
766 #. type: Plain text
767 #: build/C/man3/getgrent_r.3:190
768 msgid ""
769 "B<fgetgrent>(3), B<getgrent>(3), B<getgrgid>(3), B<getgrnam>(3), "
770 "B<putgrent>(3), B<group>(5)"
771 msgstr ""
772
773 #. type: TH
774 #: build/C/man3/getgrnam.3:33
775 #, no-wrap
776 msgid "GETGRNAM"
777 msgstr ""
778
779 #. type: TH
780 #: build/C/man3/getgrnam.3:33 build/C/man3/getpwnam.3:37
781 #, no-wrap
782 msgid "2012-04-23"
783 msgstr ""
784
785 #. type: Plain text
786 #: build/C/man3/getgrnam.3:36
787 msgid "getgrnam, getgrnam_r, getgrgid, getgrgid_r - get group file entry"
788 msgstr ""
789
790 #. type: Plain text
791 #: build/C/man3/getgrnam.3:42
792 #, no-wrap
793 msgid "B<struct group *getgrnam(const char *>I<name>B<);>\n"
794 msgstr ""
795
796 #. type: Plain text
797 #: build/C/man3/getgrnam.3:44
798 #, no-wrap
799 msgid "B<struct group *getgrgid(gid_t >I<gid>B<);>\n"
800 msgstr ""
801
802 #. type: Plain text
803 #: build/C/man3/getgrnam.3:46
804 #, no-wrap
805 msgid "B<int getgrnam_r(const char *>I<name>B<, struct group *>I<grp>B<,>\n"
806 msgstr ""
807
808 #. type: Plain text
809 #: build/C/man3/getgrnam.3:48 build/C/man3/getgrnam.3:52
810 #, no-wrap
811 msgid ""
812 "B<          char *>I<buf>B<, size_t >I<buflen>B<, struct group "
813 "**>I<result>B<);>\n"
814 msgstr ""
815
816 #. type: Plain text
817 #: build/C/man3/getgrnam.3:50
818 #, no-wrap
819 msgid "B<int getgrgid_r(gid_t >I<gid>B<, struct group *>I<grp>B<,>\n"
820 msgstr ""
821
822 #. type: Plain text
823 #: build/C/man3/getgrnam.3:62
824 msgid "B<getgrnam_r>(), B<getgrgid_r>():"
825 msgstr ""
826
827 #. type: Plain text
828 #: build/C/man3/getgrnam.3:65 build/C/man3/getpwnam.3:69
829 msgid ""
830 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE "
831 "|| _POSIX_SOURCE"
832 msgstr ""
833
834 #. type: Plain text
835 #: build/C/man3/getgrnam.3:77
836 msgid ""
837 "The B<getgrnam>()  function returns a pointer to a structure containing the "
838 "broken-out fields of the record in the group database (e.g., the local group "
839 "file I</etc/group>, NIS, and LDAP)  that matches the group name I<name>."
840 msgstr ""
841
842 #. type: Plain text
843 #: build/C/man3/getgrnam.3:84
844 msgid ""
845 "The B<getgrgid>()  function returns a pointer to a structure containing the "
846 "broken-out fields of the record in the group database that matches the group "
847 "ID I<gid>."
848 msgstr ""
849
850 #. type: Plain text
851 #: build/C/man3/getgrnam.3:123
852 msgid ""
853 "The B<getgrnam_r>()  and B<getgrgid_r>()  functions obtain the same "
854 "information as B<getgrnam>()  and B<getgrgid>(), but store the retrieved "
855 "I<group> structure in the space pointed to by I<grp>.  The string fields "
856 "pointed to by the members of the I<group> structure are stored in the buffer "
857 "I<buf> of size I<buflen>.  A pointer to the result (in case of success) or "
858 "NULL (in case no entry was found or an error occurred) is stored in "
859 "I<*result>."
860 msgstr ""
861
862 #. type: Plain text
863 #: build/C/man3/getgrnam.3:125 build/C/man3/getpwnam.3:132
864 msgid "The call"
865 msgstr ""
866
867 #. type: Plain text
868 #: build/C/man3/getgrnam.3:127
869 #, no-wrap
870 msgid "    sysconf(_SC_GETGR_R_SIZE_MAX)\n"
871 msgstr ""
872
873 #. type: Plain text
874 #: build/C/man3/getgrnam.3:136 build/C/man3/getpwnam.3:143
875 msgid ""
876 "returns either -1, without changing I<errno>, or an initial suggested size "
877 "for I<buf>.  (If this size is too small, the call fails with B<ERANGE>, in "
878 "which case the caller can retry with a larger buffer.)"
879 msgstr ""
880
881 #. type: Plain text
882 #: build/C/man3/getgrnam.3:151
883 msgid ""
884 "The B<getgrnam>()  and B<getgrgid>()  functions return a pointer to a "
885 "I<group> structure, or NULL if the matching entry is not found or an error "
886 "occurs.  If an error occurs, I<errno> is set appropriately.  If one wants to "
887 "check I<errno> after the call, it should be set to zero before the call."
888 msgstr ""
889
890 #. type: Plain text
891 #: build/C/man3/getgrnam.3:160
892 msgid ""
893 "The return value may point to a static area, and may be overwritten by "
894 "subsequent calls to B<getgrent>(3), B<getgrgid>(), or B<getgrnam>().  (Do "
895 "not pass the returned pointer to B<free>(3).)"
896 msgstr ""
897
898 #. type: Plain text
899 #: build/C/man3/getgrnam.3:174
900 msgid ""
901 "On success, B<getgrnam_r>()  and B<getgrgid_r>()  return zero, and set "
902 "I<*result> to I<grp>.  If no matching group record was found, these "
903 "functions return 0 and store NULL in I<*result>.  In case of error, an error "
904 "number is returned, and NULL is stored in I<*result>."
905 msgstr ""
906
907 #. type: TP
908 #: build/C/man3/getgrnam.3:175 build/C/man3/getpwnam.3:182
909 #, no-wrap
910 msgid "B<0> or B<ENOENT> or B<ESRCH> or B<EBADF> or B<EPERM> or ... "
911 msgstr ""
912
913 #. type: Plain text
914 #: build/C/man3/getgrnam.3:182
915 msgid "The given I<name> or I<gid> was not found."
916 msgstr ""
917
918 #. type: Plain text
919 #: build/C/man3/getgrnam.3:193 build/C/man3/getpwent.3:137 build/C/man3/getpwnam.3:200
920 msgid ""
921 "The maximum number (B<OPEN_MAX>)  of files was open already in the calling "
922 "process."
923 msgstr ""
924
925 #. type: Plain text
926 #: build/C/man3/getgrnam.3:196 build/C/man3/getpwent.3:140 build/C/man3/getpwnam.3:203
927 msgid "The maximum number of files was open already in the system."
928 msgstr ""
929
930 #.  more precisely:
931 #.  AIX 5.1 - gives ESRCH
932 #.  OSF1 4.0g - gives EWOULDBLOCK
933 #.  libc, glibc up to version 2.6, Irix 6.5 - give ENOENT
934 #.  glibc since version 2.7 - give 0
935 #.  FreeBSD 4.8, OpenBSD 3.2, NetBSD 1.6 - give EPERM
936 #.  SunOS 5.8 - gives EBADF
937 #.  Tru64 5.1b, HP-UX-11i, SunOS 5.7 - give 0
938 #. type: Plain text
939 #: build/C/man3/getgrnam.3:233
940 msgid ""
941 "The formulation given above under \"RETURN VALUE\" is from POSIX.1-2001.  It "
942 "does not call \"not found\" an error, hence does not specify what value "
943 "I<errno> might have in this situation.  But that makes it impossible to "
944 "recognize errors.  One might argue that according to POSIX I<errno> should "
945 "be left unchanged if an entry is not found.  Experiments on various "
946 "UNIX-like systems shows that lots of different values occur in this "
947 "situation: 0, ENOENT, EBADF, ESRCH, EWOULDBLOCK, EPERM and probably others."
948 msgstr ""
949
950 #. type: Plain text
951 #: build/C/man3/getgrnam.3:240
952 msgid ""
953 "B<endgrent>(3), B<fgetgrent>(3), B<getgrent>(3), B<getpwnam>(3), "
954 "B<setgrent>(3), B<group>(5)"
955 msgstr ""
956
957 #. type: TH
958 #: build/C/man3/getgrouplist.3:29
959 #, no-wrap
960 msgid "GETGROUPLIST"
961 msgstr ""
962
963 #. type: TH
964 #: build/C/man3/getgrouplist.3:29
965 #, no-wrap
966 msgid "2008-07-03"
967 msgstr ""
968
969 #. type: Plain text
970 #: build/C/man3/getgrouplist.3:32
971 msgid "getgrouplist - get list of groups to which a user belongs"
972 msgstr ""
973
974 #. type: Plain text
975 #: build/C/man3/getgrouplist.3:34 build/C/man3/putgrent.3:14
976 msgid "B<#include E<lt>grp.hE<gt>>"
977 msgstr ""
978
979 #. type: Plain text
980 #: build/C/man3/getgrouplist.3:36
981 msgid "B<int getgrouplist(const char *>I<user>B<, gid_t >I<group>B<,>"
982 msgstr ""
983
984 #. type: Plain text
985 #: build/C/man3/getgrouplist.3:38
986 msgid "B< gid_t *>I<groups>B<, int *>I<ngroups>B<);>"
987 msgstr ""
988
989 #. type: Plain text
990 #: build/C/man3/getgrouplist.3:46
991 msgid "B<getgrouplist>(): _BSD_SOURCE"
992 msgstr ""
993
994 #. type: Plain text
995 #: build/C/man3/getgrouplist.3:58
996 msgid ""
997 "The B<getgrouplist>()  function scans the group database (see B<group>(5))  "
998 "to obtain the list of groups that I<user> belongs to.  Up to I<*ngroups> of "
999 "these groups are returned in the array I<groups>."
1000 msgstr ""
1001
1002 #. type: Plain text
1003 #: build/C/man3/getgrouplist.3:68
1004 msgid ""
1005 "If it was not among the groups defined for I<user> in the group database, "
1006 "then I<group> is included in the list of groups returned by "
1007 "B<getgrouplist>(); typically this argument is specified as the group ID from "
1008 "the password record for I<user>."
1009 msgstr ""
1010
1011 #. type: Plain text
1012 #: build/C/man3/getgrouplist.3:78
1013 msgid ""
1014 "The I<ngroups> argument is a value-result argument: on return it always "
1015 "contains the number of groups found for I<user>, including I<group>; this "
1016 "value may be greater than the number of groups stored in I<groups>."
1017 msgstr ""
1018
1019 #. type: Plain text
1020 #: build/C/man3/getgrouplist.3:86
1021 msgid ""
1022 "If the number of groups of which I<user> is a member is less than or equal "
1023 "to I<*ngroups>, then the value I<*ngroups> is returned."
1024 msgstr ""
1025
1026 #. type: Plain text
1027 #: build/C/man3/getgrouplist.3:96
1028 msgid ""
1029 "If the user is a member of more than I<*ngroups> groups, then "
1030 "B<getgrouplist>()  returns -1.  In this case the value returned in "
1031 "I<*ngroups> can be used to resize the buffer passed to a further call "
1032 "B<getgrouplist>()."
1033 msgstr ""
1034
1035 #. type: SH
1036 #: build/C/man3/getgrouplist.3:96
1037 #, no-wrap
1038 msgid "VERSIONS"
1039 msgstr ""
1040
1041 #. type: Plain text
1042 #: build/C/man3/getgrouplist.3:98
1043 msgid "This function is present since glibc 2.2.4."
1044 msgstr ""
1045
1046 #. type: Plain text
1047 #: build/C/man3/getgrouplist.3:100
1048 msgid "This function is nonstandard; it appears on most BSDs."
1049 msgstr ""
1050
1051 #. type: SH
1052 #: build/C/man3/getgrouplist.3:100 build/C/man3/getpw.3:98 build/C/man5/group.5:55
1053 #, no-wrap
1054 msgid "BUGS"
1055 msgstr ""
1056
1057 #. type: Plain text
1058 #: build/C/man3/getgrouplist.3:109
1059 msgid ""
1060 "In glibc versions before 2.3.3, the implementation of this function contains "
1061 "a buffer-overrun bug: it returns the complete list of groups for I<user> in "
1062 "the array I<groups>, even when the number of groups exceeds I<*ngroups>."
1063 msgstr ""
1064
1065 #. type: Plain text
1066 #: build/C/man3/getgrouplist.3:118
1067 msgid ""
1068 "The program below displays the group list for the user named in its first "
1069 "command-line argument.  The second command-line argument specifies the "
1070 "I<ngroups> value to be supplied to B<getgrouplist>().  The following shell "
1071 "session shows examples of the use of this program:"
1072 msgstr ""
1073
1074 #. type: Plain text
1075 #: build/C/man3/getgrouplist.3:128
1076 #, no-wrap
1077 msgid ""
1078 "$B< ./a.out cecilia 0>\n"
1079 "getgrouplist() returned -1; ngroups = 3\n"
1080 "$B< ./a.out cecilia 3>\n"
1081 "ngroups = 3\n"
1082 "16 (dialout)\n"
1083 "33 (video)\n"
1084 "100 (users)\n"
1085 msgstr ""
1086
1087 #. type: SS
1088 #: build/C/man3/getgrouplist.3:130
1089 #, no-wrap
1090 msgid "Program source"
1091 msgstr ""
1092
1093 #. type: Plain text
1094 #: build/C/man3/getgrouplist.3:137
1095 #, no-wrap
1096 msgid ""
1097 "#include E<lt>stdio.hE<gt>\n"
1098 "#include E<lt>stdlib.hE<gt>\n"
1099 "#include E<lt>grp.hE<gt>\n"
1100 "#include E<lt>pwd.hE<gt>\n"
1101 msgstr ""
1102
1103 #. type: Plain text
1104 #: build/C/man3/getgrouplist.3:145
1105 #, no-wrap
1106 msgid ""
1107 "int\n"
1108 "main(int argc, char *argv[])\n"
1109 "{\n"
1110 "    int j, ngroups;\n"
1111 "    gid_t *groups;\n"
1112 "    struct passwd *pw;\n"
1113 "    struct group *gr;\n"
1114 msgstr ""
1115
1116 #. type: Plain text
1117 #: build/C/man3/getgrouplist.3:150
1118 #, no-wrap
1119 msgid ""
1120 "    if (argc != 3) {\n"
1121 "        fprintf(stderr, \"Usage: %s E<lt>userE<gt> E<lt>ngroupsE<gt>\\en\", "
1122 "argv[0]);\n"
1123 "        exit(EXIT_FAILURE);\n"
1124 "    }\n"
1125 msgstr ""
1126
1127 #. type: Plain text
1128 #: build/C/man3/getgrouplist.3:152
1129 #, no-wrap
1130 msgid "    ngroups = atoi(argv[2]);\n"
1131 msgstr ""
1132
1133 #. type: Plain text
1134 #: build/C/man3/getgrouplist.3:158
1135 #, no-wrap
1136 msgid ""
1137 "    groups = malloc(ngroups * sizeof (gid_t));\n"
1138 "    if (groups == NULL) {\n"
1139 "        perror(\"malloc\");\n"
1140 "        exit(EXIT_FAILURE);\n"
1141 "    }\n"
1142 msgstr ""
1143
1144 #. type: Plain text
1145 #: build/C/man3/getgrouplist.3:160
1146 #, no-wrap
1147 msgid "    /* Fetch passwd structure (contains first group ID for user) */\n"
1148 msgstr ""
1149
1150 #. type: Plain text
1151 #: build/C/man3/getgrouplist.3:166
1152 #, no-wrap
1153 msgid ""
1154 "    pw = getpwnam(argv[1]);\n"
1155 "    if (pw == NULL) {\n"
1156 "        perror(\"getpwnam\");\n"
1157 "        exit(EXIT_SUCCESS);\n"
1158 "    }\n"
1159 msgstr ""
1160
1161 #. type: Plain text
1162 #: build/C/man3/getgrouplist.3:168
1163 #, no-wrap
1164 msgid "    /* Retrieve group list */\n"
1165 msgstr ""
1166
1167 #. type: Plain text
1168 #: build/C/man3/getgrouplist.3:174
1169 #, no-wrap
1170 msgid ""
1171 "    if (getgrouplist(argv[1], pw-E<gt>pw_gid, groups, &ngroups) == -1) {\n"
1172 "        fprintf(stderr, \"getgrouplist() returned -1; ngroups = %d\\en\",\n"
1173 "                ngroups);\n"
1174 "\texit(EXIT_FAILURE);\n"
1175 "    }\n"
1176 msgstr ""
1177
1178 #. type: Plain text
1179 #: build/C/man3/getgrouplist.3:176
1180 #, no-wrap
1181 msgid "    /* Display list of retrieved groups, along with group names */\n"
1182 msgstr ""
1183
1184 #. type: Plain text
1185 #: build/C/man3/getgrouplist.3:185
1186 #, no-wrap
1187 msgid ""
1188 "    fprintf(stderr, \"ngroups = %d\\en\", ngroups);\n"
1189 "    for (j = 0; j E<lt> ngroups; j++) {\n"
1190 "        printf(\"%d\", groups[j]);\n"
1191 "        gr = getgrgid(groups[j]);\n"
1192 "        if (gr != NULL)\n"
1193 "            printf(\" (%s)\", gr-E<gt>gr_name);\n"
1194 "        printf(\"\\en\");\n"
1195 "    }\n"
1196 msgstr ""
1197
1198 #. type: Plain text
1199 #: build/C/man3/getgrouplist.3:188
1200 #, no-wrap
1201 msgid ""
1202 "    exit(EXIT_SUCCESS);\n"
1203 "}\n"
1204 msgstr ""
1205
1206 #. type: Plain text
1207 #: build/C/man3/getgrouplist.3:195
1208 msgid "B<getgroups>(2), B<setgroups>(2), B<getgrent>(3), B<group>(5), B<passwd>(5)"
1209 msgstr ""
1210
1211 #. type: TH
1212 #: build/C/man3/getpw.3:32
1213 #, no-wrap
1214 msgid "GETPW"
1215 msgstr ""
1216
1217 #. type: Plain text
1218 #: build/C/man3/getpw.3:35
1219 msgid "getpw - reconstruct password line entry"
1220 msgstr ""
1221
1222 #. type: Plain text
1223 #: build/C/man3/getpw.3:40
1224 #, no-wrap
1225 msgid ""
1226 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
1227 "B<#include E<lt>sys/types.hE<gt>>\n"
1228 "B<#include E<lt>pwd.hE<gt>>\n"
1229 msgstr ""
1230
1231 #. type: Plain text
1232 #: build/C/man3/getpw.3:42
1233 #, no-wrap
1234 msgid "B<int getpw(uid_t >I<uid>B<, char *>I<buf>B<);>\n"
1235 msgstr ""
1236
1237 #. type: Plain text
1238 #: build/C/man3/getpw.3:49
1239 msgid ""
1240 "The B<getpw>()  function reconstructs the password line entry for the given "
1241 "user ID I<uid> in the buffer I<buf>.  The returned buffer contains a line of "
1242 "format"
1243 msgstr ""
1244
1245 #. type: Plain text
1246 #: build/C/man3/getpw.3:52
1247 msgid "B<name:passwd:uid:gid:gecos:dir:shell>"
1248 msgstr ""
1249
1250 #. type: Plain text
1251 #: build/C/man3/getpw.3:67 build/C/man3/getpwent.3:98 build/C/man3/getpwnam.3:102
1252 #, no-wrap
1253 msgid ""
1254 "struct passwd {\n"
1255 "    char   *pw_name;       /* username */\n"
1256 "    char   *pw_passwd;     /* user password */\n"
1257 "    uid_t   pw_uid;        /* user ID */\n"
1258 "    gid_t   pw_gid;        /* group ID */\n"
1259 "    char   *pw_gecos;      /* user information */\n"
1260 "    char   *pw_dir;        /* home directory */\n"
1261 "    char   *pw_shell;      /* shell program */\n"
1262 "};\n"
1263 msgstr ""
1264
1265 #. type: Plain text
1266 #: build/C/man3/getpw.3:72 build/C/man3/getpwent.3:103 build/C/man3/getpwent_r.3:84
1267 msgid "For more information about the fields of this structure, see B<passwd>(5)."
1268 msgstr ""
1269
1270 #. type: Plain text
1271 #: build/C/man3/getpw.3:78
1272 msgid ""
1273 "The B<getpw>()  function returns 0 on success; on error, it returns -1, and "
1274 "I<errno> is set to indicate the error."
1275 msgstr ""
1276
1277 #. type: TP
1278 #: build/C/man3/getpw.3:79 build/C/man3/putpwent.3:76
1279 #, no-wrap
1280 msgid "B<EINVAL>"
1281 msgstr ""
1282
1283 #. type: Plain text
1284 #: build/C/man3/getpw.3:83
1285 msgid "I<buf> is NULL."
1286 msgstr ""
1287
1288 #. type: Plain text
1289 #: build/C/man3/getpw.3:87
1290 msgid "No user corresponding to I<uid>."
1291 msgstr ""
1292
1293 #. type: Plain text
1294 #: build/C/man3/getpw.3:98
1295 msgid "SVr2."
1296 msgstr ""
1297
1298 #. type: Plain text
1299 #: build/C/man3/getpw.3:105
1300 msgid ""
1301 "The B<getpw>()  function is dangerous as it may overflow the provided buffer "
1302 "I<buf>.  It is obsoleted by B<getpwuid>(3)."
1303 msgstr ""
1304
1305 #. type: Plain text
1306 #: build/C/man3/getpw.3:114
1307 msgid ""
1308 "B<endpwent>(3), B<fgetpwent>(3), B<getpwent>(3), B<getpwnam>(3), "
1309 "B<getpwuid>(3), B<putpwent>(3), B<setpwent>(3), B<passwd>(5)"
1310 msgstr ""
1311
1312 #. type: TH
1313 #: build/C/man3/getpwent.3:33
1314 #, no-wrap
1315 msgid "GETPWENT"
1316 msgstr ""
1317
1318 #. type: Plain text
1319 #: build/C/man3/getpwent.3:36
1320 msgid "getpwent, setpwent, endpwent - get password file entry"
1321 msgstr ""
1322
1323 #. type: Plain text
1324 #: build/C/man3/getpwent.3:40 build/C/man3/getpwnam.3:44
1325 #, no-wrap
1326 msgid ""
1327 "B<#include E<lt>sys/types.hE<gt>>\n"
1328 "B<#include E<lt>pwd.hE<gt>>\n"
1329 msgstr ""
1330
1331 #. type: Plain text
1332 #: build/C/man3/getpwent.3:42
1333 #, no-wrap
1334 msgid "B<struct passwd *getpwent(void);>\n"
1335 msgstr ""
1336
1337 #. type: Plain text
1338 #: build/C/man3/getpwent.3:44
1339 #, no-wrap
1340 msgid "B<void setpwent(void);>\n"
1341 msgstr ""
1342
1343 #. type: Plain text
1344 #: build/C/man3/getpwent.3:46
1345 #, no-wrap
1346 msgid "B<void endpwent(void);>\n"
1347 msgstr ""
1348
1349 #. type: Plain text
1350 #: build/C/man3/getpwent.3:57
1351 msgid "B<getpwent>(), B<setpwent>(), B<endpwent>():"
1352 msgstr ""
1353
1354 #. type: Plain text
1355 #: build/C/man3/getpwent.3:60
1356 msgid ""
1357 "_BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || "
1358 "_XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED"
1359 msgstr ""
1360
1361 #. type: Plain text
1362 #: build/C/man3/getpwent.3:74
1363 msgid ""
1364 "The B<getpwent>()  function returns a pointer to a structure containing the "
1365 "broken-out fields of a record from the password database (e.g., the local "
1366 "password file I</etc/passwd>, NIS, and LDAP).  The first time B<getpwent>()  "
1367 "is called, it returns the first entry; thereafter, it returns successive "
1368 "entries."
1369 msgstr ""
1370
1371 #. type: Plain text
1372 #: build/C/man3/getpwent.3:79
1373 msgid ""
1374 "The B<setpwent>()  function rewinds to the beginning of the password "
1375 "database."
1376 msgstr ""
1377
1378 #. type: Plain text
1379 #: build/C/man3/getpwent.3:84
1380 msgid ""
1381 "The B<endpwent>()  function is used to close the password database after all "
1382 "processing has been performed."
1383 msgstr ""
1384
1385 #. type: Plain text
1386 #: build/C/man3/getpwent.3:116
1387 msgid ""
1388 "The B<getpwent>()  function returns a pointer to a I<passwd> structure, or "
1389 "NULL if there are no more entries or an error occurs.  If an error occurs, "
1390 "I<errno> is set appropriately.  If one wants to check I<errno> after the "
1391 "call, it should be set to zero before the call."
1392 msgstr ""
1393
1394 #. type: Plain text
1395 #: build/C/man3/getpwent.3:125
1396 msgid ""
1397 "The return value may point to a static area, and may be overwritten by "
1398 "subsequent calls to B<getpwent>(), B<getpwnam>(3), or B<getpwuid>(3).  (Do "
1399 "not pass the returned pointer to B<free>(3).)"
1400 msgstr ""
1401
1402 #. type: Plain text
1403 #: build/C/man3/getpwent.3:154 build/C/man3/getpwnam.3:217
1404 msgid "local password database file"
1405 msgstr ""
1406
1407 #. type: Plain text
1408 #: build/C/man3/getpwent.3:159 build/C/man3/getpwnam.3:222
1409 msgid ""
1410 "SVr4, 4.3BSD, POSIX.1-2001.  The I<pw_gecos> field is not specified in "
1411 "POSIX, but is present on most implementations."
1412 msgstr ""
1413
1414 #. type: Plain text
1415 #: build/C/man3/getpwent.3:167
1416 msgid ""
1417 "B<fgetpwent>(3), B<getpw>(3), B<getpwent_r>(3), B<getpwnam>(3), "
1418 "B<getpwuid>(3), B<putpwent>(3), B<passwd>(5)"
1419 msgstr ""
1420
1421 #. type: TH
1422 #: build/C/man3/getpwent_r.3:24
1423 #, no-wrap
1424 msgid "GETPWENT_R"
1425 msgstr ""
1426
1427 #. type: Plain text
1428 #: build/C/man3/getpwent_r.3:27
1429 msgid "getpwent_r, fgetpwent_r - get passwd file entry reentrantly"
1430 msgstr ""
1431
1432 #. type: Plain text
1433 #: build/C/man3/getpwent_r.3:30
1434 #, no-wrap
1435 msgid "B<#include E<lt>pwd.hE<gt>>\n"
1436 msgstr ""
1437
1438 #. type: Plain text
1439 #: build/C/man3/getpwent_r.3:32
1440 #, no-wrap
1441 msgid "B<int getpwent_r(struct passwd *>I<pwbuf>B<, char *>I<buf>B<,>\n"
1442 msgstr ""
1443
1444 #. type: Plain text
1445 #: build/C/man3/getpwent_r.3:34
1446 #, no-wrap
1447 msgid "B<               size_t >I<buflen>B<, struct passwd **>I<pwbufp>B<);>\n"
1448 msgstr ""
1449
1450 #. type: Plain text
1451 #: build/C/man3/getpwent_r.3:36
1452 #, no-wrap
1453 msgid ""
1454 "B<int fgetpwent_r(FILE *>I<fp>B<, struct passwd *>I<pwbuf>B<, char "
1455 "*>I<buf>B<,>\n"
1456 msgstr ""
1457
1458 #. type: Plain text
1459 #: build/C/man3/getpwent_r.3:38
1460 #, no-wrap
1461 msgid "B<                size_t >I<buflen>B<, struct passwd **>I<pwbufp>B<);>\n"
1462 msgstr ""
1463
1464 #. type: Plain text
1465 #: build/C/man3/getpwent_r.3:47
1466 msgid "B<getpwent_r>(), _BSD_SOURCE || _SVID_SOURCE"
1467 msgstr ""
1468
1469 #. type: Plain text
1470 #: build/C/man3/getpwent_r.3:50
1471 msgid "B<fgetpwent_r>(): _SVID_SOURCE"
1472 msgstr ""
1473
1474 #. type: Plain text
1475 #: build/C/man3/getpwent_r.3:63
1476 msgid ""
1477 "The functions B<getpwent_r>()  and B<fgetpwent_r>()  are the reentrant "
1478 "versions of B<getpwent>(3)  and B<fgetpwent>(3).  The former reads the next "
1479 "passwd entry from the stream initialized by B<setpwent>(3).  The latter "
1480 "reads the next passwd entry from the stream I<fp>."
1481 msgstr ""
1482
1483 #. type: Plain text
1484 #: build/C/man3/getpwent_r.3:79
1485 #, no-wrap
1486 msgid ""
1487 "struct passwd {\n"
1488 "    char    *pw_name;      /* username */\n"
1489 "    char    *pw_passwd;    /* user password */\n"
1490 "    uid_t    pw_uid;       /* user ID */\n"
1491 "    gid_t    pw_gid;       /* group ID */\n"
1492 "    char    *pw_gecos;     /* user information */\n"
1493 "    char    *pw_dir;       /* home directory */\n"
1494 "    char    *pw_shell;     /* shell program */\n"
1495 "};\n"
1496 msgstr ""
1497
1498 #. type: Plain text
1499 #: build/C/man3/getpwent_r.3:103
1500 msgid ""
1501 "The nonreentrant functions return a pointer to static storage, where this "
1502 "static storage contains further pointers to user name, password, gecos "
1503 "field, home directory and shell.  The reentrant functions described here "
1504 "return all of that in caller-provided buffers.  First of all there is the "
1505 "buffer I<pwbuf> that can hold a I<struct passwd>.  And next the buffer "
1506 "I<buf> of size I<buflen> that can hold additional strings.  The result of "
1507 "these functions, the I<struct passwd> read from the stream, is stored in the "
1508 "provided buffer I<*pwbuf>, and a pointer to this I<struct passwd> is "
1509 "returned in I<*pwbufp>."
1510 msgstr ""
1511
1512 #. type: Plain text
1513 #: build/C/man3/getpwent_r.3:110
1514 msgid ""
1515 "On success, these functions return 0 and I<*pwbufp> is a pointer to the "
1516 "I<struct passwd>.  On error, these functions return an error value and "
1517 "I<*pwbufp> is NULL."
1518 msgstr ""
1519
1520 #. type: Plain text
1521 #: build/C/man3/getpwent_r.3:128
1522 #, no-wrap
1523 msgid ""
1524 "struct passwd *\n"
1525 "getpwent_r(struct passwd *pwd, char *buf, int buflen);\n"
1526 msgstr ""
1527
1528 #. type: Plain text
1529 #: build/C/man3/getpwent_r.3:138
1530 #, no-wrap
1531 msgid ""
1532 "int\n"
1533 "getpwent_r(struct passwd *pwd, char *buf, int buflen,\n"
1534 "           FILE **pw_fp);\n"
1535 msgstr ""
1536
1537 #. type: Plain text
1538 #: build/C/man3/getpwent_r.3:145
1539 msgid ""
1540 "The function B<getpwent_r>()  is not really reentrant since it shares the "
1541 "reading position in the stream with all other threads."
1542 msgstr ""
1543
1544 #. type: Plain text
1545 #: build/C/man3/getpwent_r.3:151
1546 #, no-wrap
1547 msgid ""
1548 "#define _GNU_SOURCE\n"
1549 "#include E<lt>pwd.hE<gt>\n"
1550 "#include E<lt>stdio.hE<gt>\n"
1551 "#define BUFLEN 4096\n"
1552 msgstr ""
1553
1554 #. type: Plain text
1555 #: build/C/man3/getpwent_r.3:158
1556 #, no-wrap
1557 msgid ""
1558 "int\n"
1559 "main(void)\n"
1560 "{\n"
1561 "    struct passwd pw, *pwp;\n"
1562 "    char buf[BUFLEN];\n"
1563 "    int i;\n"
1564 msgstr ""
1565
1566 #. type: Plain text
1567 #: build/C/man3/getpwent_r.3:170
1568 #, no-wrap
1569 msgid ""
1570 "    setpwent();\n"
1571 "    while (1) {\n"
1572 "        i = getpwent_r(&pw, buf, BUFLEN, &pwp);\n"
1573 "        if (i)\n"
1574 "            break;\n"
1575 "        printf(\"%s (%d)\\etHOME %s\\etSHELL %s\\en\", pwp-E<gt>pw_name,\n"
1576 "               pwp-E<gt>pw_uid, pwp-E<gt>pw_dir, pwp-E<gt>pw_shell);\n"
1577 "    }\n"
1578 "    endpwent();\n"
1579 "    exit(EXIT_SUCCESS);\n"
1580 "}\n"
1581 msgstr ""
1582
1583 #. type: Plain text
1584 #: build/C/man3/getpwent_r.3:188
1585 msgid ""
1586 "B<fgetpwent>(3), B<getpw>(3), B<getpwent>(3), B<getpwnam>(3), "
1587 "B<getpwuid>(3), B<putpwent>(3), B<passwd>(5)"
1588 msgstr ""
1589
1590 #. type: TH
1591 #: build/C/man3/getpwnam.3:37
1592 #, no-wrap
1593 msgid "GETPWNAM"
1594 msgstr ""
1595
1596 #. type: Plain text
1597 #: build/C/man3/getpwnam.3:40
1598 msgid "getpwnam, getpwnam_r, getpwuid, getpwuid_r - get password file entry"
1599 msgstr ""
1600
1601 #. type: Plain text
1602 #: build/C/man3/getpwnam.3:46
1603 #, no-wrap
1604 msgid "B<struct passwd *getpwnam(const char *>I<name>B<);>\n"
1605 msgstr ""
1606
1607 #. type: Plain text
1608 #: build/C/man3/getpwnam.3:48
1609 #, no-wrap
1610 msgid "B<struct passwd *getpwuid(uid_t >I<uid>B<);>\n"
1611 msgstr ""
1612
1613 #. type: Plain text
1614 #: build/C/man3/getpwnam.3:50
1615 #, no-wrap
1616 msgid "B<int getpwnam_r(const char *>I<name>B<, struct passwd *>I<pwd>B<,>\n"
1617 msgstr ""
1618
1619 #. type: Plain text
1620 #: build/C/man3/getpwnam.3:52 build/C/man3/getpwnam.3:56
1621 #, no-wrap
1622 msgid ""
1623 "B<            char *>I<buf>B<, size_t >I<buflen>B<, struct passwd "
1624 "**>I<result>B<);>\n"
1625 msgstr ""
1626
1627 #. type: Plain text
1628 #: build/C/man3/getpwnam.3:54
1629 #, no-wrap
1630 msgid "B<int getpwuid_r(uid_t >I<uid>B<, struct passwd *>I<pwd>B<,>\n"
1631 msgstr ""
1632
1633 #. type: Plain text
1634 #: build/C/man3/getpwnam.3:66
1635 msgid "B<getpwnam_r>(), B<getpwuid_r>():"
1636 msgstr ""
1637
1638 #. type: Plain text
1639 #: build/C/man3/getpwnam.3:81
1640 msgid ""
1641 "The B<getpwnam>()  function returns a pointer to a structure containing the "
1642 "broken-out fields of the record in the password database (e.g., the local "
1643 "password file I</etc/passwd>, NIS, and LDAP)  that matches the username "
1644 "I<name>."
1645 msgstr ""
1646
1647 #. type: Plain text
1648 #: build/C/man3/getpwnam.3:88
1649 msgid ""
1650 "The B<getpwuid>()  function returns a pointer to a structure containing the "
1651 "broken-out fields of the record in the password database that matches the "
1652 "user ID I<uid>."
1653 msgstr ""
1654
1655 #. type: Plain text
1656 #: build/C/man3/getpwnam.3:108
1657 msgid "See B<passwd>(5)  for more information about these fields."
1658 msgstr ""
1659
1660 #. type: Plain text
1661 #: build/C/man3/getpwnam.3:130
1662 msgid ""
1663 "The B<getpwnam_r>()  and B<getpwuid_r>()  functions obtain the same "
1664 "information as B<getpwnam>()  and B<getpwuid>(), but store the retrieved "
1665 "I<passwd> structure in the space pointed to by I<pwd>.  The string fields "
1666 "pointed to by the members of the I<passwd> structure are stored in the "
1667 "buffer I<buf> of size I<buflen>.  A pointer to the result (in case of "
1668 "success) or NULL (in case no entry was found or an error occurred) is stored "
1669 "in I<*result>."
1670 msgstr ""
1671
1672 #. type: Plain text
1673 #: build/C/man3/getpwnam.3:134
1674 #, no-wrap
1675 msgid "    sysconf(_SC_GETPW_R_SIZE_MAX)\n"
1676 msgstr ""
1677
1678 #. type: Plain text
1679 #: build/C/man3/getpwnam.3:158
1680 msgid ""
1681 "The B<getpwnam>()  and B<getpwuid>()  functions return a pointer to a "
1682 "I<passwd> structure, or NULL if the matching entry is not found or an error "
1683 "occurs.  If an error occurs, I<errno> is set appropriately.  If one wants to "
1684 "check I<errno> after the call, it should be set to zero before the call."
1685 msgstr ""
1686
1687 #. type: Plain text
1688 #: build/C/man3/getpwnam.3:167
1689 msgid ""
1690 "The return value may point to a static area, and may be overwritten by "
1691 "subsequent calls to B<getpwent>(3), B<getpwnam>(), or B<getpwuid>().  (Do "
1692 "not pass the returned pointer to B<free>(3).)"
1693 msgstr ""
1694
1695 #. type: Plain text
1696 #: build/C/man3/getpwnam.3:181
1697 msgid ""
1698 "On success, B<getpwnam_r>()  and B<getpwuid_r>()  return zero, and set "
1699 "I<*result> to I<pwd>.  If no matching password record was found, these "
1700 "functions return 0 and store NULL in I<*result>.  In case of error, an error "
1701 "number is returned, and NULL is stored in I<*result>."
1702 msgstr ""
1703
1704 #. type: Plain text
1705 #: build/C/man3/getpwnam.3:189
1706 msgid "The given I<name> or I<uid> was not found."
1707 msgstr ""
1708
1709 #.  more precisely:
1710 #.  AIX 5.1 - gives ESRCH
1711 #.  OSF1 4.0g - gives EWOULDBLOCK
1712 #.  libc, glibc up to version 2.6, Irix 6.5 - give ENOENT
1713 #.  glibc since version 2.7 - give 0
1714 #.  FreeBSD 4.8, OpenBSD 3.2, NetBSD 1.6 - give EPERM
1715 #.  SunOS 5.8 - gives EBADF
1716 #.  Tru64 5.1b, HP-UX-11i, SunOS 5.7 - give 0
1717 #. type: Plain text
1718 #: build/C/man3/getpwnam.3:243
1719 msgid ""
1720 "The formulation given above under \"RETURN VALUE\" is from POSIX.1-2001.  It "
1721 "does not call \"not found\" an error, and hence does not specify what value "
1722 "I<errno> might have in this situation.  But that makes it impossible to "
1723 "recognize errors.  One might argue that according to POSIX I<errno> should "
1724 "be left unchanged if an entry is not found.  Experiments on various "
1725 "UNIX-like systems show that lots of different values occur in this "
1726 "situation: 0, ENOENT, EBADF, ESRCH, EWOULDBLOCK, EPERM and probably others."
1727 msgstr ""
1728
1729 #. type: Plain text
1730 #: build/C/man3/getpwnam.3:261
1731 msgid ""
1732 "The I<pw_dir> field contains the name of the initial working directory of "
1733 "the user.  Login programs use the value of this field to initialize the "
1734 "B<HOME> environment variable for the login shell.  An application that wants "
1735 "to determine its user's home directory should inspect the value of B<HOME> "
1736 "(rather than the value I<getpwuid(getuid())-E<gt>pw_dir>)  since this allows "
1737 "the user to modify their notion of \"the home directory\" during a login "
1738 "session.  To determine the (initial) home directory of another user, it is "
1739 "necessary to use I<getpwnam(\"username\")-E<gt>pw_dir> or similar."
1740 msgstr ""
1741
1742 #. type: Plain text
1743 #: build/C/man3/getpwnam.3:266
1744 msgid ""
1745 "The program below demonstrates the use of B<getpwnam_r>()  to find the full "
1746 "username and user ID for the username supplied as a command-line argument."
1747 msgstr ""
1748
1749 #. type: Plain text
1750 #: build/C/man3/getpwnam.3:273
1751 #, no-wrap
1752 msgid ""
1753 "#include E<lt>pwd.hE<gt>\n"
1754 "#include E<lt>stdio.hE<gt>\n"
1755 "#include E<lt>stdlib.hE<gt>\n"
1756 "#include E<lt>unistd.hE<gt>\n"
1757 "#include E<lt>errno.hE<gt>\n"
1758 msgstr ""
1759
1760 #. type: Plain text
1761 #: build/C/man3/getpwnam.3:282
1762 #, no-wrap
1763 msgid ""
1764 "int\n"
1765 "main(int argc, char *argv[])\n"
1766 "{\n"
1767 "    struct passwd pwd;\n"
1768 "    struct passwd *result;\n"
1769 "    char *buf;\n"
1770 "    size_t bufsize;\n"
1771 "    int s;\n"
1772 msgstr ""
1773
1774 #. type: Plain text
1775 #: build/C/man3/getpwnam.3:287
1776 #, no-wrap
1777 msgid ""
1778 "    if (argc != 2) {\n"
1779 "        fprintf(stderr, \"Usage: %s username\\en\", argv[0]);\n"
1780 "        exit(EXIT_FAILURE);\n"
1781 "    }\n"
1782 msgstr ""
1783
1784 #. type: Plain text
1785 #: build/C/man3/getpwnam.3:291
1786 #, no-wrap
1787 msgid ""
1788 "    bufsize = sysconf(_SC_GETPW_R_SIZE_MAX);\n"
1789 "    if (bufsize == -1)          /* Value was indeterminate */\n"
1790 "        bufsize = 16384;        /* Should be more than enough */\n"
1791 msgstr ""
1792
1793 #. type: Plain text
1794 #: build/C/man3/getpwnam.3:297
1795 #, no-wrap
1796 msgid ""
1797 "    buf = malloc(bufsize);\n"
1798 "    if (buf == NULL) {\n"
1799 "        perror(\"malloc\");\n"
1800 "        exit(EXIT_FAILURE);\n"
1801 "    }\n"
1802 msgstr ""
1803
1804 #. type: Plain text
1805 #: build/C/man3/getpwnam.3:308
1806 #, no-wrap
1807 msgid ""
1808 "    s = getpwnam_r(argv[1], &pwd, buf, bufsize, &result);\n"
1809 "    if (result == NULL) {\n"
1810 "        if (s == 0)\n"
1811 "            printf(\"Not found\\en\");\n"
1812 "        else {\n"
1813 "            errno = s;\n"
1814 "            perror(\"getpwnam_r\");\n"
1815 "        }\n"
1816 "        exit(EXIT_FAILURE);\n"
1817 "    }\n"
1818 msgstr ""
1819
1820 #. type: Plain text
1821 #: build/C/man3/getpwnam.3:312
1822 #, no-wrap
1823 msgid ""
1824 "    printf(\"Name: %s; UID: %ld\\en\", pwd.pw_gecos, (long) pwd.pw_uid);\n"
1825 "    exit(EXIT_SUCCESS);\n"
1826 "}\n"
1827 msgstr ""
1828
1829 #. type: Plain text
1830 #: build/C/man3/getpwnam.3:323
1831 msgid ""
1832 "B<endpwent>(3), B<fgetpwent>(3), B<getgrnam>(3), B<getpw>(3), "
1833 "B<getpwent>(3), B<getspnam>(3), B<putpwent>(3), B<setpwent>(3), B<passwd>(5)"
1834 msgstr ""
1835
1836 #. type: TH
1837 #: build/C/man3/getspnam.3:8
1838 #, no-wrap
1839 msgid "GETSPNAM"
1840 msgstr ""
1841
1842 #. type: TH
1843 #: build/C/man3/getspnam.3:8
1844 #, no-wrap
1845 msgid "2013-01-22"
1846 msgstr ""
1847
1848 #. type: Plain text
1849 #: build/C/man3/getspnam.3:13
1850 msgid ""
1851 "getspnam, getspnam_r, getspent, getspent_r, setspent, endspent, fgetspent, "
1852 "fgetspent_r, sgetspent, sgetspent_r, putspent, lckpwdf, ulckpwdf - get "
1853 "shadow password file entry"
1854 msgstr ""
1855
1856 #. type: Plain text
1857 #: build/C/man3/getspnam.3:16
1858 #, no-wrap
1859 msgid "/* General shadow password file API */\n"
1860 msgstr ""
1861
1862 #. type: Plain text
1863 #: build/C/man3/getspnam.3:18 build/C/man3/getspnam.3:40
1864 #, no-wrap
1865 msgid "B<#include E<lt>shadow.hE<gt>>\n"
1866 msgstr ""
1867
1868 #. type: Plain text
1869 #: build/C/man3/getspnam.3:20
1870 #, no-wrap
1871 msgid "B<struct spwd *getspnam(const char *>I<name>B<);>\n"
1872 msgstr ""
1873
1874 #. type: Plain text
1875 #: build/C/man3/getspnam.3:22
1876 #, no-wrap
1877 msgid "B<struct spwd *getspent(void);>\n"
1878 msgstr ""
1879
1880 #. type: Plain text
1881 #: build/C/man3/getspnam.3:24
1882 #, no-wrap
1883 msgid "B<void setspent(void);>\n"
1884 msgstr ""
1885
1886 #. type: Plain text
1887 #: build/C/man3/getspnam.3:26
1888 #, no-wrap
1889 msgid "B<void endspent(void);>\n"
1890 msgstr ""
1891
1892 #. type: Plain text
1893 #: build/C/man3/getspnam.3:28
1894 #, no-wrap
1895 msgid "B<struct spwd *fgetspent(FILE *>I<fp>B<);>\n"
1896 msgstr ""
1897
1898 #. type: Plain text
1899 #: build/C/man3/getspnam.3:30
1900 #, no-wrap
1901 msgid "B<struct spwd *sgetspent(const char *>I<s>B<);>\n"
1902 msgstr ""
1903
1904 #. type: Plain text
1905 #: build/C/man3/getspnam.3:32
1906 #, no-wrap
1907 msgid "B<int putspent(struct spwd *>I<p>B<, FILE *>I<fp>B<);>\n"
1908 msgstr ""
1909
1910 #. type: Plain text
1911 #: build/C/man3/getspnam.3:34
1912 #, no-wrap
1913 msgid "B<int lckpwdf(void);>\n"
1914 msgstr ""
1915
1916 #. type: Plain text
1917 #: build/C/man3/getspnam.3:36
1918 #, no-wrap
1919 msgid "B<int ulckpwdf(void);>\n"
1920 msgstr ""
1921
1922 #. type: Plain text
1923 #: build/C/man3/getspnam.3:38
1924 #, no-wrap
1925 msgid "/* GNU extension */\n"
1926 msgstr ""
1927
1928 #. type: Plain text
1929 #: build/C/man3/getspnam.3:42
1930 #, no-wrap
1931 msgid "B<int getspent_r(struct spwd *>I<spbuf>B<,>\n"
1932 msgstr ""
1933
1934 #. type: Plain text
1935 #: build/C/man3/getspnam.3:44 build/C/man3/getspnam.3:48 build/C/man3/getspnam.3:52 build/C/man3/getspnam.3:56
1936 #, no-wrap
1937 msgid ""
1938 "B<        char *>I<buf>B<, size_t >I<buflen>B<, struct spwd "
1939 "**>I<spbufp>B<);>\n"
1940 msgstr ""
1941
1942 #. type: Plain text
1943 #: build/C/man3/getspnam.3:46
1944 #, no-wrap
1945 msgid "B<int getspnam_r(const char *>I<name>B<, struct spwd *>I<spbuf>B<,>\n"
1946 msgstr ""
1947
1948 #. type: Plain text
1949 #: build/C/man3/getspnam.3:50
1950 #, no-wrap
1951 msgid "B<int fgetspent_r(FILE *>I<fp>B<, struct spwd *>I<spbuf>B<,>\n"
1952 msgstr ""
1953
1954 #. type: Plain text
1955 #: build/C/man3/getspnam.3:54
1956 #, no-wrap
1957 msgid "B<int sgetspent_r(const char *>I<s>B<, struct spwd *>I<spbuf>B<,>\n"
1958 msgstr ""
1959
1960 #. type: Plain text
1961 #: build/C/man3/getspnam.3:68
1962 msgid "B<getspent_r>(), B<getspnam_r>(), B<fgetspent_r>(), B<sgetspent_r>():"
1963 msgstr ""
1964
1965 #. type: Plain text
1966 #: build/C/man3/getspnam.3:70
1967 msgid "_BSD_SOURCE || _SVID_SOURCE"
1968 msgstr ""
1969
1970 #. type: Plain text
1971 #: build/C/man3/getspnam.3:84
1972 msgid ""
1973 "Long ago it was considered safe to have encrypted passwords openly visible "
1974 "in the password file.  When computers got faster and people got more "
1975 "security-conscious, this was no longer acceptable.  Julianne Frances Haugh "
1976 "implemented the shadow password suite that keeps the encrypted passwords in "
1977 "the shadow password database (e.g., the local shadow password file "
1978 "I</etc/shadow>, NIS, and LDAP), readable only by root."
1979 msgstr ""
1980
1981 #.  FIXME I've commented out the following for the
1982 #.  moment.  The relationship between PAM and nsswitch.conf needs
1983 #.  to be clearly documented in one place, which is pointed to by
1984 #.  the pages for the user, group, and shadow password functions.
1985 #.  (Jul 2005, mtk)
1986 #
1987 #.  This shadow password setup has been superseded by PAM
1988 #.  (pluggable authentication modules), and the file
1989 #.  .I /etc/nsswitch.conf
1990 #.  now describes the sources to be used.
1991 #. type: Plain text
1992 #: build/C/man3/getspnam.3:101
1993 msgid ""
1994 "The functions described below resemble those for the traditional password "
1995 "database (e.g., see B<getpwnam>(3)  and B<getpwent>(3))."
1996 msgstr ""
1997
1998 #. type: Plain text
1999 #: build/C/man3/getspnam.3:108
2000 msgid ""
2001 "The B<getspnam>()  function returns a pointer to a structure containing the "
2002 "broken-out fields of the record in the shadow password database that matches "
2003 "the username I<name>."
2004 msgstr ""
2005
2006 #.  some systems require a call of setspent() before the first getspent()
2007 #.  glibc does not
2008 #. type: Plain text
2009 #: build/C/man3/getspnam.3:120
2010 msgid ""
2011 "The B<getspent>()  function returns a pointer to the next entry in the "
2012 "shadow password database.  The position in the input stream is initialized "
2013 "by B<setspent>().  When done reading, the program may call B<endspent>()  so "
2014 "that resources can be deallocated."
2015 msgstr ""
2016
2017 #. type: Plain text
2018 #: build/C/man3/getspnam.3:127
2019 msgid ""
2020 "The B<fgetspent>()  function is similar to B<getspent>()  but uses the "
2021 "supplied stream instead of the one implicitly opened by B<setspent>()."
2022 msgstr ""
2023
2024 #. type: Plain text
2025 #: build/C/man3/getspnam.3:134
2026 msgid ""
2027 "The B<sgetspent>()  function parses the supplied string I<s> into a struct "
2028 "I<spwd>."
2029 msgstr ""
2030
2031 #. type: Plain text
2032 #: build/C/man3/getspnam.3:144
2033 msgid ""
2034 "The B<putspent>()  function writes the contents of the supplied struct "
2035 "I<spwd> I<*p> as a text line in the shadow password file format to the "
2036 "stream I<fp>.  String entries with value NULL and numerical entries with "
2037 "value -1 are written as an empty string."
2038 msgstr ""
2039
2040 #. type: Plain text
2041 #: build/C/man3/getspnam.3:159
2042 msgid ""
2043 "The B<lckpwdf>()  function is intended to protect against multiple "
2044 "simultaneous accesses of the shadow password database.  It tries to acquire "
2045 "a lock, and returns 0 on success, or -1 on failure (lock not obtained within "
2046 "15 seconds).  The B<ulckpwdf>()  function releases the lock again.  Note "
2047 "that there is no protection against direct access of the shadow password "
2048 "file.  Only programs that use B<lckpwdf>()  will notice the lock."
2049 msgstr ""
2050
2051 #.  Also in libc5
2052 #.  SUN doesn't have sgetspent()
2053 #. type: Plain text
2054 #: build/C/man3/getspnam.3:164
2055 msgid ""
2056 "These were the functions that formed the original shadow API.  They are "
2057 "widely available."
2058 msgstr ""
2059
2060 #. type: SS
2061 #: build/C/man3/getspnam.3:164
2062 #, no-wrap
2063 msgid "Reentrant versions"
2064 msgstr ""
2065
2066 #. type: Plain text
2067 #: build/C/man3/getspnam.3:181
2068 msgid ""
2069 "Analogous to the reentrant functions for the password database, glibc also "
2070 "has reentrant functions for the shadow password database.  The "
2071 "B<getspnam_r>()  function is like B<getspnam>()  but stores the retrieved "
2072 "shadow password structure in the space pointed to by I<spbuf>.  This shadow "
2073 "password structure contains pointers to strings, and these strings are "
2074 "stored in the buffer I<buf> of size I<buflen>.  A pointer to the result (in "
2075 "case of success) or NULL (in case no entry was found or an error occurred) "
2076 "is stored in I<*spbufp>."
2077 msgstr ""
2078
2079 #. type: Plain text
2080 #: build/C/man3/getspnam.3:188
2081 msgid ""
2082 "The functions B<getspent_r>(), B<fgetspent_r>(), and B<sgetspent_r>()  are "
2083 "similarly analogous to their nonreentrant counterparts."
2084 msgstr ""
2085
2086 #.  SUN doesn't have sgetspent_r()
2087 #. type: Plain text
2088 #: build/C/man3/getspnam.3:192
2089 msgid ""
2090 "Some non-glibc systems also have functions with these names, often with "
2091 "different prototypes."
2092 msgstr ""
2093
2094 #. type: SS
2095 #: build/C/man3/getspnam.3:192
2096 #, no-wrap
2097 msgid "Structure"
2098 msgstr ""
2099
2100 #. type: Plain text
2101 #: build/C/man3/getspnam.3:194
2102 msgid ""
2103 "The shadow password structure is defined in I<E<lt>shadow.hE<gt>> as "
2104 "follows:"
2105 msgstr ""
2106
2107 #. type: Plain text
2108 #: build/C/man3/getspnam.3:214
2109 #, no-wrap
2110 msgid ""
2111 "struct spwd {\n"
2112 "    char *sp_namp;     /* Login name */\n"
2113 "    char *sp_pwdp;     /* Encrypted password */\n"
2114 "    long  sp_lstchg;   /* Date of last change\n"
2115 "                          (measured in days since\n"
2116 "                          1970-01-01 00:00:00 +0000 (UTC)) */\n"
2117 "    long  sp_min;      /* Min # of days between changes */\n"
2118 "    long  sp_max;      /* Max # of days between changes */\n"
2119 "    long  sp_warn;     /* # of days before password expires\n"
2120 "                          to warn user to change it */\n"
2121 "    long  sp_inact;    /* # of days after password expires\n"
2122 "                          until account is disabled */\n"
2123 "    long  sp_expire;   /* Date when account expires\n"
2124 "                          (measured in days since\n"
2125 "                          1970-01-01 00:00:00 +0000 (UTC)) */\n"
2126 "    unsigned long sp_flag;  /* Reserved */\n"
2127 "};\n"
2128 msgstr ""
2129
2130 #. type: Plain text
2131 #: build/C/man3/getspnam.3:221
2132 msgid ""
2133 "The functions that return a pointer return NULL if no more entries are "
2134 "available or if an error occurs during processing.  The functions which have "
2135 "I<int> as the return value return 0 for success and -1 for failure."
2136 msgstr ""
2137
2138 #. type: Plain text
2139 #: build/C/man3/getspnam.3:224
2140 msgid ""
2141 "For the nonreentrant functions, the return value may point to static area, "
2142 "and may be overwritten by subsequent calls to these functions."
2143 msgstr ""
2144
2145 #. type: Plain text
2146 #: build/C/man3/getspnam.3:227
2147 msgid ""
2148 "The reentrant functions return zero on success.  In case of error, an error "
2149 "number is returned."
2150 msgstr ""
2151
2152 #. type: TP
2153 #: build/C/man3/getspnam.3:228
2154 #, no-wrap
2155 msgid "B<EACCES>"
2156 msgstr ""
2157
2158 #. type: Plain text
2159 #: build/C/man3/getspnam.3:231
2160 msgid "The caller does not have permission to access the shadow password file."
2161 msgstr ""
2162
2163 #. type: Plain text
2164 #: build/C/man3/getspnam.3:234
2165 msgid "Supplied buffer is too small."
2166 msgstr ""
2167
2168 #. type: TP
2169 #: build/C/man3/getspnam.3:235
2170 #, no-wrap
2171 msgid "I</etc/shadow>"
2172 msgstr ""
2173
2174 #. type: Plain text
2175 #: build/C/man3/getspnam.3:238
2176 msgid "local shadow password database file"
2177 msgstr ""
2178
2179 #. type: TP
2180 #: build/C/man3/getspnam.3:238
2181 #, no-wrap
2182 msgid "I</etc/.pwd.lock>"
2183 msgstr ""
2184
2185 #. type: Plain text
2186 #: build/C/man3/getspnam.3:241
2187 msgid "lock file"
2188 msgstr ""
2189
2190 #. type: Plain text
2191 #: build/C/man3/getspnam.3:247
2192 msgid ""
2193 "The include file I<E<lt>paths.hE<gt>> defines the constant B<_PATH_SHADOW> "
2194 "to the pathname of the shadow password file."
2195 msgstr ""
2196
2197 #. type: Plain text
2198 #: build/C/man3/getspnam.3:251
2199 msgid ""
2200 "The shadow password database and its associated API are not specified in "
2201 "POSIX.1-2001.  However, many other systems provide a similar API."
2202 msgstr ""
2203
2204 #. type: Plain text
2205 #: build/C/man3/getspnam.3:256
2206 msgid "B<getgrnam>(3), B<getpwnam>(3), B<getpwnam_r>(3), B<shadow>(5)"
2207 msgstr ""
2208
2209 #. type: TH
2210 #: build/C/man5/group.5:26
2211 #, no-wrap
2212 msgid "GROUP"
2213 msgstr ""
2214
2215 #. type: Plain text
2216 #: build/C/man5/group.5:29
2217 msgid "group - user group file"
2218 msgstr ""
2219
2220 #. type: Plain text
2221 #: build/C/man5/group.5:34
2222 msgid ""
2223 "The I</etc/group> file is a text file that defines the groups on the "
2224 "system.  There is one entry per line, with the following format:"
2225 msgstr ""
2226
2227 #. type: Plain text
2228 #: build/C/man5/group.5:37
2229 msgid "group_name:password:GID:user_list"
2230 msgstr ""
2231
2232 #. type: Plain text
2233 #: build/C/man5/group.5:40
2234 msgid "The fields are as follows:"
2235 msgstr ""
2236
2237 #. type: TP
2238 #: build/C/man5/group.5:40
2239 #, no-wrap
2240 msgid "I<group_name>"
2241 msgstr ""
2242
2243 #. type: Plain text
2244 #: build/C/man5/group.5:43
2245 msgid "the name of the group."
2246 msgstr ""
2247
2248 #. type: TP
2249 #: build/C/man5/group.5:43 build/C/man5/passwd.5:91
2250 #, no-wrap
2251 msgid "I<password>"
2252 msgstr ""
2253
2254 #. type: Plain text
2255 #: build/C/man5/group.5:47
2256 msgid ""
2257 "the (encrypted) group password.  If this field is empty, no password is "
2258 "needed."
2259 msgstr ""
2260
2261 #. type: TP
2262 #: build/C/man5/group.5:47 build/C/man5/passwd.5:103
2263 #, no-wrap
2264 msgid "I<GID>"
2265 msgstr ""
2266
2267 #. type: Plain text
2268 #: build/C/man5/group.5:50
2269 msgid "the numeric group ID."
2270 msgstr ""
2271
2272 #. type: TP
2273 #: build/C/man5/group.5:50
2274 #, no-wrap
2275 msgid "I<user_list>"
2276 msgstr ""
2277
2278 #. type: Plain text
2279 #: build/C/man5/group.5:53
2280 msgid "a list of the usernames that are members of this group, separated by commas."
2281 msgstr ""
2282
2283 #. type: Plain text
2284 #: build/C/man5/group.5:55
2285 msgid "/etc/group"
2286 msgstr ""
2287
2288 #. type: Plain text
2289 #: build/C/man5/group.5:61
2290 msgid ""
2291 "As the 4.2BSD B<initgroups>(3)  man page says: No-one seems to keep "
2292 "I</etc/group> up-to-date."
2293 msgstr ""
2294
2295 #. type: Plain text
2296 #: build/C/man5/group.5:67
2297 msgid "B<login>(1), B<newgrp>(1), B<getgrent>(3), B<getgrnam>(3), B<passwd>(5)"
2298 msgstr ""
2299
2300 #. type: TH
2301 #: build/C/man3/initgroups.3:32
2302 #, no-wrap
2303 msgid "INITGROUPS"
2304 msgstr ""
2305
2306 #. type: TH
2307 #: build/C/man3/initgroups.3:32 build/C/man3/putpwent.3:30
2308 #, no-wrap
2309 msgid "2007-07-26"
2310 msgstr ""
2311
2312 #. type: Plain text
2313 #: build/C/man3/initgroups.3:35
2314 msgid "initgroups - initialize the supplementary group access list"
2315 msgstr ""
2316
2317 #. type: Plain text
2318 #: build/C/man3/initgroups.3:41
2319 #, no-wrap
2320 msgid "B<int initgroups(const char *>I<user>B<, gid_t >I<group>B<);>\n"
2321 msgstr ""
2322
2323 #. type: Plain text
2324 #: build/C/man3/initgroups.3:50
2325 msgid "B<initgroups>(): _BSD_SOURCE"
2326 msgstr ""
2327
2328 #. type: Plain text
2329 #: build/C/man3/initgroups.3:58
2330 msgid ""
2331 "The B<initgroups>()  function initializes the group access list by reading "
2332 "the group database I</etc/group> and using all groups of which I<user> is a "
2333 "member.  The additional group I<group> is also added to the list."
2334 msgstr ""
2335
2336 #. type: Plain text
2337 #: build/C/man3/initgroups.3:62
2338 msgid "The I<user> argument must be non-NULL."
2339 msgstr ""
2340
2341 #. type: Plain text
2342 #: build/C/man3/initgroups.3:69
2343 msgid ""
2344 "The B<initgroups>()  function returns 0 on success.  On error, -1 is "
2345 "returned, and I<errno> is set appropriately."
2346 msgstr ""
2347
2348 #. type: Plain text
2349 #: build/C/man3/initgroups.3:73
2350 msgid "Insufficient memory to allocate group information structure."
2351 msgstr ""
2352
2353 #. type: TP
2354 #: build/C/man3/initgroups.3:73
2355 #, no-wrap
2356 msgid "B<EPERM>"
2357 msgstr ""
2358
2359 #. type: Plain text
2360 #: build/C/man3/initgroups.3:78
2361 msgid ""
2362 "The calling process has insufficient privilege.  See the underlying system "
2363 "call B<setgroups>(2)."
2364 msgstr ""
2365
2366 #. type: Plain text
2367 #: build/C/man3/initgroups.3:81
2368 #, no-wrap
2369 msgid "I</etc/group>\t\tgroup database file\n"
2370 msgstr ""
2371
2372 #. type: Plain text
2373 #: build/C/man3/initgroups.3:84
2374 msgid "SVr4, 4.3BSD."
2375 msgstr ""
2376
2377 #. type: Plain text
2378 #: build/C/man3/initgroups.3:88
2379 msgid "B<getgroups>(2), B<setgroups>(2), B<credentials>(7)"
2380 msgstr ""
2381
2382 #. type: TH
2383 #: build/C/man5/passwd.5:30
2384 #, no-wrap
2385 msgid "PASSWD"
2386 msgstr ""
2387
2388 #. type: TH
2389 #: build/C/man5/passwd.5:30
2390 #, no-wrap
2391 msgid "2012-05-03"
2392 msgstr ""
2393
2394 #. type: Plain text
2395 #: build/C/man5/passwd.5:33
2396 msgid "passwd - password file"
2397 msgstr ""
2398
2399 #. type: Plain text
2400 #: build/C/man5/passwd.5:41
2401 msgid ""
2402 "The I</etc/passwd> file is a text file that describes user login accounts "
2403 "for the system.  It should have read permission allowed for all users (many "
2404 "utilities, like B<ls>(1)  use it to map user IDs to usernames), but write "
2405 "access only for the superuser."
2406 msgstr ""
2407
2408 #. type: Plain text
2409 #: build/C/man5/passwd.5:53
2410 msgid ""
2411 "In the good old days there was no great problem with this general read "
2412 "permission.  Everybody could read the encrypted passwords, but the hardware "
2413 "was too slow to crack a well-chosen password, and moreover the basic "
2414 "assumption used to be that of a friendly user-community.  These days many "
2415 "people run some version of the shadow password suite, where I</etc/passwd> "
2416 "has an \\(aqx\\(aq character in the password field, and the encrypted "
2417 "passwords are in I</etc/shadow>, which is readable by the superuser only."
2418 msgstr ""
2419
2420 #. type: Plain text
2421 #: build/C/man5/passwd.5:62
2422 msgid ""
2423 "If the encrypted password, whether in I</etc/passwd> or in I</etc/shadow>, "
2424 "is an empty string, login is allowed without even asking for a password.  "
2425 "Note that this functionality may be intentionally disabled in applications, "
2426 "or configurable (for example using the \"nullok\" or \"nonull\" arguments to "
2427 "pam_unix.so)."
2428 msgstr ""
2429
2430 #. type: Plain text
2431 #: build/C/man5/passwd.5:67
2432 msgid ""
2433 "If the encrypted password in I</etc/passwd> is \"I<*NP*>\" (without the "
2434 "quotes), the shadow record should be obtained from an NIS+ server."
2435 msgstr ""
2436
2437 #. type: Plain text
2438 #: build/C/man5/passwd.5:73
2439 msgid ""
2440 "Regardless of whether shadow passwords are used, many system administrators "
2441 "use an asterisk (*) in the encrypted password field to make sure that this "
2442 "user can not authenticate him- or herself using a password.  (But see NOTES "
2443 "below.)"
2444 msgstr ""
2445
2446 #. type: Plain text
2447 #: build/C/man5/passwd.5:78
2448 msgid ""
2449 "If you create a new login, first put an asterisk (*) in the password field, "
2450 "then use B<passwd>(1)  to set it."
2451 msgstr ""
2452
2453 #. type: Plain text
2454 #: build/C/man5/passwd.5:81
2455 msgid ""
2456 "Each line of the file describes a single user, and contains seven "
2457 "colon-separated fields:"
2458 msgstr ""
2459
2460 #. type: Plain text
2461 #: build/C/man5/passwd.5:84
2462 msgid "name:password:UID:GID:GECOS:directory:shell"
2463 msgstr ""
2464
2465 #. type: Plain text
2466 #: build/C/man5/passwd.5:87
2467 msgid "The field are as follows:"
2468 msgstr ""
2469
2470 #. type: TP
2471 #: build/C/man5/passwd.5:87
2472 #, no-wrap
2473 msgid "I<name>"
2474 msgstr ""
2475
2476 #. type: Plain text
2477 #: build/C/man5/passwd.5:91
2478 msgid "This is the user's login name.  It should not contain capital letters."
2479 msgstr ""
2480
2481 #. type: Plain text
2482 #: build/C/man5/passwd.5:98
2483 msgid ""
2484 "This is either the encrypted user password, an asterisk (*), or the letter "
2485 "\\(aqx\\(aq.  (See B<pwconv>(8)  for an explanation of \\(aqx\\(aq.)"
2486 msgstr ""
2487
2488 #. type: TP
2489 #: build/C/man5/passwd.5:98
2490 #, no-wrap
2491 msgid "I<UID>"
2492 msgstr ""
2493
2494 #. type: Plain text
2495 #: build/C/man5/passwd.5:103
2496 msgid "The privileged I<root> login account (superuser) has the user ID 0."
2497 msgstr ""
2498
2499 #. type: Plain text
2500 #: build/C/man5/passwd.5:108
2501 msgid ""
2502 "This is the numeric primary group ID for this user.  (Additional groups for "
2503 "the user are defined in the system group file; see B<group>(5))."
2504 msgstr ""
2505
2506 #. type: TP
2507 #: build/C/man5/passwd.5:108
2508 #, no-wrap
2509 msgid "I<GECOS>"
2510 msgstr ""
2511
2512 #. type: Plain text
2513 #: build/C/man5/passwd.5:116
2514 msgid ""
2515 "This field (sometimes called the \"comment field\")  is optional and used "
2516 "only for informational purposes.  Usually, it contains the full username.  "
2517 "Some programs (for example, B<finger>(1))  display information from this "
2518 "field."
2519 msgstr ""
2520
2521 #. type: Plain text
2522 #: build/C/man5/passwd.5:125
2523 msgid ""
2524 "GECOS stands for \"General Electric Comprehensive Operating System\", which "
2525 "was renamed to GCOS when GE's large systems division was sold to Honeywell.  "
2526 "Dennis Ritchie has reported: \"Sometimes we sent printer output or batch "
2527 "jobs to the GCOS machine.  The gcos field in the password file was a place "
2528 "to stash the information for the $IDENTcard.  Not elegant.\""
2529 msgstr ""
2530
2531 #. type: TP
2532 #: build/C/man5/passwd.5:125
2533 #, no-wrap
2534 msgid "I<directory>"
2535 msgstr ""
2536
2537 #. type: Plain text
2538 #: build/C/man5/passwd.5:132
2539 msgid ""
2540 "This is the user's home directory: the initial directory where the user is "
2541 "placed after logging in.  The value in this field is used to set the B<HOME> "
2542 "environment variable."
2543 msgstr ""
2544
2545 #. type: TP
2546 #: build/C/man5/passwd.5:132
2547 #, no-wrap
2548 msgid "I<shell>"
2549 msgstr ""
2550
2551 #. type: Plain text
2552 #: build/C/man5/passwd.5:142
2553 msgid ""
2554 "This is the program to run at login (if empty, use I</bin/sh>).  If set to a "
2555 "nonexistent executable, the user will be unable to login through "
2556 "B<login>(1).  The value in this field is used to set the B<SHELL> "
2557 "environment variable."
2558 msgstr ""
2559
2560 #. type: Plain text
2561 #: build/C/man5/passwd.5:148
2562 msgid ""
2563 "If you want to create user groups, there must be an entry in I</etc/group>, "
2564 "or no group will exist."
2565 msgstr ""
2566
2567 #. type: Plain text
2568 #: build/C/man5/passwd.5:162
2569 msgid ""
2570 "If the encrypted password is set to an asterisk (*), the user will be unable "
2571 "to login using B<login>(1), but may still login using B<rlogin>(1), run "
2572 "existing processes and initiate new ones through B<rsh>(1), B<cron>(8), "
2573 "B<at>(1), or mail filters, etc.  Trying to lock an account by simply "
2574 "changing the shell field yields the same result and additionally allows the "
2575 "use of B<su>(1)."
2576 msgstr ""
2577
2578 #. type: Plain text
2579 #: build/C/man5/passwd.5:171
2580 msgid ""
2581 "B<login>(1), B<passwd>(1), B<su>(1), B<getpwent>(3), B<getpwnam>(3), "
2582 "B<crypt>(3), B<group>(5), B<shadow>(5)"
2583 msgstr ""
2584
2585 #. type: TH
2586 #: build/C/man3/putgrent.3:7
2587 #, no-wrap
2588 msgid "PUTGRENT"
2589 msgstr ""
2590
2591 #. type: TH
2592 #: build/C/man3/putgrent.3:7 build/C/man3/setaliasent.3:9
2593 #, no-wrap
2594 msgid "2003-09-09"
2595 msgstr ""
2596
2597 #. type: Plain text
2598 #: build/C/man3/putgrent.3:10
2599 msgid "putgrent - write a group database entry to a file"
2600 msgstr ""
2601
2602 #. type: Plain text
2603 #: build/C/man3/putgrent.3:12
2604 msgid "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */"
2605 msgstr ""
2606
2607 #. type: Plain text
2608 #: build/C/man3/putgrent.3:16
2609 msgid "B<int putgrent(const struct group *>I<grp>B<, FILE *>I<fp>B<);>"
2610 msgstr ""
2611
2612 #. type: Plain text
2613 #: build/C/man3/putgrent.3:25
2614 msgid ""
2615 "The B<putgrent>()  function is the counterpart for B<fgetgrent>(3).  The "
2616 "function writes the content of the provided I<struct group> into the file "
2617 "pointed to by I<fp>.  The list of group members must be NULL-terminated or "
2618 "NULL-initialized."
2619 msgstr ""
2620
2621 #. type: Plain text
2622 #: build/C/man3/putgrent.3:27
2623 msgid "The I<struct group> is defined as follows:"
2624 msgstr ""
2625
2626 #. type: Plain text
2627 #: build/C/man3/putgrent.3:36
2628 #, no-wrap
2629 msgid ""
2630 "struct group {\n"
2631 "    char   *gr_name;      /* group name */\n"
2632 "    char   *gr_passwd;    /* group password */\n"
2633 "    gid_t   gr_gid;       /* group ID */\n"
2634 "    char  **gr_mem;       /* group members */\n"
2635 "};\n"
2636 msgstr ""
2637
2638 #. type: Plain text
2639 #: build/C/man3/putgrent.3:40
2640 msgid "The function returns zero on success, and a nonzero value on error."
2641 msgstr ""
2642
2643 #. type: Plain text
2644 #: build/C/man3/putgrent.3:42
2645 msgid "This function is a GNU extension."
2646 msgstr ""
2647
2648 #. type: Plain text
2649 #: build/C/man3/putgrent.3:46
2650 msgid "B<fgetgrent>(3), B<getgrent>(3), B<group>(5)"
2651 msgstr ""
2652
2653 #. type: TH
2654 #: build/C/man3/putpwent.3:30
2655 #, no-wrap
2656 msgid "PUTPWENT"
2657 msgstr ""
2658
2659 #. type: Plain text
2660 #: build/C/man3/putpwent.3:33
2661 msgid "putpwent - write a password file entry"
2662 msgstr ""
2663
2664 #. type: Plain text
2665 #: build/C/man3/putpwent.3:40
2666 #, no-wrap
2667 msgid "B<int putpwent(const struct passwd *>I<p>B<, FILE *>I<stream>B<);>\n"
2668 msgstr ""
2669
2670 #. type: Plain text
2671 #: build/C/man3/putpwent.3:49
2672 msgid "B<putpwent>(): _SVID_SOURCE"
2673 msgstr ""
2674
2675 #. type: Plain text
2676 #: build/C/man3/putpwent.3:54
2677 msgid ""
2678 "The B<putpwent>()  function writes a password entry from the structure I<p> "
2679 "in the file associated with I<stream>."
2680 msgstr ""
2681
2682 #. type: Plain text
2683 #: build/C/man3/putpwent.3:68
2684 #, no-wrap
2685 msgid ""
2686 "struct passwd {\n"
2687 "    char    *pw_name;        /* username */\n"
2688 "    char    *pw_passwd;      /* user password */\n"
2689 "    uid_t    pw_uid;         /* user ID */\n"
2690 "    gid_t    pw_gid;         /* group ID */\n"
2691 "    char    *pw_gecos;       /* real name */\n"
2692 "    char    *pw_dir;         /* home directory */\n"
2693 "    char    *pw_shell;       /* shell program */\n"
2694 "};\n"
2695 msgstr ""
2696
2697 #. type: Plain text
2698 #: build/C/man3/putpwent.3:75
2699 msgid "The B<putpwent>()  function returns 0 on success, or -1 if an error occurs."
2700 msgstr ""
2701
2702 #. type: Plain text
2703 #: build/C/man3/putpwent.3:79
2704 msgid "Invalid (NULL) argument given."
2705 msgstr ""
2706
2707 #. type: Plain text
2708 #: build/C/man3/putpwent.3:89
2709 msgid ""
2710 "B<endpwent>(3), B<fgetpwent>(3), B<getpw>(3), B<getpwent>(3), "
2711 "B<getpwnam>(3), B<getpwuid>(3), B<setpwent>(3)"
2712 msgstr ""
2713
2714 #. type: TH
2715 #: build/C/man3/setaliasent.3:9
2716 #, no-wrap
2717 msgid "SETALIASENT"
2718 msgstr ""
2719
2720 #. type: Plain text
2721 #: build/C/man3/setaliasent.3:13
2722 msgid ""
2723 "setaliasent, endaliasent, getaliasent, getaliasent_r, getaliasbyname, "
2724 "getaliasbyname_r - read an alias entry"
2725 msgstr ""
2726
2727 #. type: Plain text
2728 #: build/C/man3/setaliasent.3:15
2729 msgid "B<#include E<lt>aliases.hE<gt>>"
2730 msgstr ""
2731
2732 #. type: Plain text
2733 #: build/C/man3/setaliasent.3:17
2734 msgid "B<void setaliasent(void);>"
2735 msgstr ""
2736
2737 #. type: Plain text
2738 #: build/C/man3/setaliasent.3:19
2739 msgid "B<void endaliasent(void);>"
2740 msgstr ""
2741
2742 #. type: Plain text
2743 #: build/C/man3/setaliasent.3:21
2744 msgid "B<struct aliasent *getaliasent(void);>"
2745 msgstr ""
2746
2747 #. type: Plain text
2748 #: build/C/man3/setaliasent.3:23
2749 msgid "B<int getaliasent_r(struct aliasent *>I<result>B<,>"
2750 msgstr ""
2751
2752 #. type: Plain text
2753 #: build/C/man3/setaliasent.3:25 build/C/man3/setaliasent.3:31
2754 msgid "B< char *>I<buffer>B<, size_t >I<buflen>B<, struct aliasent **>I<res>B<);>"
2755 msgstr ""
2756
2757 #. type: Plain text
2758 #: build/C/man3/setaliasent.3:27
2759 msgid "B<struct aliasent *getaliasbyname(const char *>I<name>B<);>"
2760 msgstr ""
2761
2762 #. type: Plain text
2763 #: build/C/man3/setaliasent.3:29
2764 msgid ""
2765 "B<int getaliasbyname_r(const char *>I<name>B<, struct aliasent "
2766 "*>I<result>B<,>"
2767 msgstr ""
2768
2769 #. type: Plain text
2770 #: build/C/man3/setaliasent.3:36
2771 msgid ""
2772 "One of the databases available with the Name Service Switch (NSS)  is the "
2773 "aliases database, that contains mail aliases.  (To find out which databases "
2774 "are supported, try I<getent --help>.)  Six functions are provided to access "
2775 "the aliases database."
2776 msgstr ""
2777
2778 #. type: Plain text
2779 #: build/C/man3/setaliasent.3:43
2780 msgid ""
2781 "The B<getaliasent>()  function returns a pointer to a structure containing "
2782 "the group information from the aliases database.  The first time it is "
2783 "called it returns the first entry; thereafter, it returns successive "
2784 "entries."
2785 msgstr ""
2786
2787 #. type: Plain text
2788 #: build/C/man3/setaliasent.3:48
2789 msgid ""
2790 "The B<setaliasent>()  function rewinds the file pointer to the beginning of "
2791 "the aliases database."
2792 msgstr ""
2793
2794 #. type: Plain text
2795 #: build/C/man3/setaliasent.3:52
2796 msgid "The B<endaliasent>()  function closes the aliases database."
2797 msgstr ""
2798
2799 #. type: Plain text
2800 #: build/C/man3/setaliasent.3:59
2801 msgid ""
2802 "B<getaliasent_r>()  is the reentrant version of the previous function.  The "
2803 "requested structure is stored via the first argument but the programmer "
2804 "needs to fill the other arguments also.  Not providing enough space causes "
2805 "the function to fail."
2806 msgstr ""
2807
2808 #. type: Plain text
2809 #: build/C/man3/setaliasent.3:65
2810 msgid ""
2811 "The function B<getaliasbyname>()  takes the name argument and searches the "
2812 "aliases database.  The entry is returned as a pointer to a I<struct "
2813 "aliasent>."
2814 msgstr ""
2815
2816 #. type: Plain text
2817 #: build/C/man3/setaliasent.3:72
2818 msgid ""
2819 "B<getaliasbyname_r>()  is the reentrant version of the previous function.  "
2820 "The requested structure is stored via the second argument but the programmer "
2821 "needs to fill the other arguments also.  Not providing enough space causes "
2822 "the function to fail."
2823 msgstr ""
2824
2825 #. type: Plain text
2826 #: build/C/man3/setaliasent.3:77
2827 msgid "The I<struct aliasent> is defined in I<E<lt>aliases.hE<gt>>:"
2828 msgstr ""
2829
2830 #. type: Plain text
2831 #: build/C/man3/setaliasent.3:86
2832 #, no-wrap
2833 msgid ""
2834 "struct aliasent {\n"
2835 "    char    *alias_name;             /* alias name */\n"
2836 "    size_t   alias_members_len;\n"
2837 "    char   **alias_members;          /* alias name list */\n"
2838 "    int      alias_local;\n"
2839 "};\n"
2840 msgstr ""
2841
2842 #. type: Plain text
2843 #: build/C/man3/setaliasent.3:94
2844 msgid ""
2845 "The functions B<getaliasent_r>()  and B<getaliasbyname_r>()  return a "
2846 "nonzero value on error."
2847 msgstr ""
2848
2849 #. type: Plain text
2850 #: build/C/man3/setaliasent.3:100
2851 msgid ""
2852 "The default alias database is the file I</etc/aliases>.  This can be changed "
2853 "in the I</etc/nsswitch.conf> file."
2854 msgstr ""
2855
2856 #. type: Plain text
2857 #: build/C/man3/setaliasent.3:103
2858 msgid "These routines are glibc-specific.  The NeXT system has similar routines:"
2859 msgstr ""
2860
2861 #. type: Plain text
2862 #: build/C/man3/setaliasent.3:107
2863 #, no-wrap
2864 msgid "#include E<lt>aliasdb.hE<gt>\n"
2865 msgstr ""
2866
2867 #. type: Plain text
2868 #: build/C/man3/setaliasent.3:112
2869 #, no-wrap
2870 msgid ""
2871 "void alias_setent(void);\n"
2872 "void alias_endent(void);\n"
2873 "alias_ent *alias_getent(void);\n"
2874 "alias_ent *alias_getbyname(char *name);\n"
2875 msgstr ""
2876
2877 #. type: Plain text
2878 #: build/C/man3/setaliasent.3:118
2879 msgid ""
2880 "The following example compiles with I<gcc example.c -o example>.  It will "
2881 "dump all names in the alias database."
2882 msgstr ""
2883
2884 #. type: Plain text
2885 #: build/C/man3/setaliasent.3:124
2886 #, no-wrap
2887 msgid ""
2888 "#include E<lt>aliases.hE<gt>\n"
2889 "#include E<lt>stdio.hE<gt>\n"
2890 "#include E<lt>stdlib.hE<gt>\n"
2891 "#include E<lt>errno.hE<gt>\n"
2892 msgstr ""
2893
2894 #. type: Plain text
2895 #: build/C/man3/setaliasent.3:143
2896 #, no-wrap
2897 msgid ""
2898 "int\n"
2899 "main(void)\n"
2900 "{\n"
2901 "    struct aliasent *al;\n"
2902 "    setaliasent();\n"
2903 "    for (;;) {\n"
2904 "        al = getaliasent();\n"
2905 "        if (al == NULL)\n"
2906 "            break;\n"
2907 "        printf(\"Name: %s\\en\", al-E<gt>alias_name);\n"
2908 "    }\n"
2909 "    if (errno) {\n"
2910 "        perror(\"reading alias\");\n"
2911 "        exit(EXIT_FAILURE);\n"
2912 "    }\n"
2913 "    endaliasent();\n"
2914 "    exit(EXIT_SUCCESS);\n"
2915 "}\n"
2916 msgstr ""
2917
2918 #
2919 #.  /etc/sendmail/aliases
2920 #.  Yellow Pages
2921 #.  newaliases, postalias
2922 #. type: Plain text
2923 #: build/C/man3/setaliasent.3:153
2924 msgid "B<getgrent>(3), B<getpwent>(3), B<getspent>(3), B<aliases>(5)"
2925 msgstr ""