OSDN Git Service

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