OSDN Git Service

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