Debian Codegraph @

templates/man3/getgrouplist.3.pot

raw
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: 2026-06-05 06:25+0200\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <[email protected]>\n"
14 "Language: \n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
18
19 #. type: TH
20 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
21 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
22 #, no-wrap
23 msgid "getgrouplist"
24 msgstr ""
25
26 #. type: TH
27 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
28 #: opensuse-tumbleweed
29 #, no-wrap
30 msgid "2025-09-21"
31 msgstr ""
32
33 #. type: TH
34 #: archlinux debian-unstable
35 #, no-wrap
36 msgid "Linux man-pages 6.18"
37 msgstr ""
38
39 #. type: SH
40 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
41 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
42 #, no-wrap
43 msgid "NAME"
44 msgstr ""
45
46 #. type: Plain text
47 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
48 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
49 msgid "getgrouplist - get list of groups to which a user belongs"
50 msgstr ""
51
52 #. type: SH
53 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
54 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
55 #, no-wrap
56 msgid "LIBRARY"
57 msgstr ""
58
59 #. type: Plain text
60 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
61 #: opensuse-leap-16-1 opensuse-tumbleweed
62 msgid "Standard C library (I<libc>,\\ I<-lc>)"
63 msgstr ""
64
65 #. type: SH
66 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
67 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
68 #, no-wrap
69 msgid "SYNOPSIS"
70 msgstr ""
71
72 #. type: Plain text
73 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
74 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
75 #, no-wrap
76 msgid "B<#include E<lt>grp.hE<gt>>\n"
77 msgstr ""
78
79 #. type: Plain text
80 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
81 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
82 #, no-wrap
83 msgid ""
84 "B<int getgrouplist(const char *>I<user>B<, gid_t >I<group>B<,>\n"
85 "B< gid_t *>I<groups>B<, int *>I<ngroups>B<);>\n"
86 msgstr ""
87
88 #. type: Plain text
89 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
90 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
91 msgid ""
92 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
93 msgstr ""
94
95 #. type: Plain text
96 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
97 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
98 msgid "B<getgrouplist>():"
99 msgstr ""
100
101 #. type: Plain text
102 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
103 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
104 #, no-wrap
105 msgid ""
106 " Since glibc 2.19:\n"
107 " _DEFAULT_SOURCE\n"
108 " glibc 2.19 and earlier:\n"
109 " _BSD_SOURCE\n"
110 msgstr ""
111
112 #. type: SH
113 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
114 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
115 #, no-wrap
116 msgid "DESCRIPTION"
117 msgstr ""
118
119 #. type: Plain text
120 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
121 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
122 msgid ""
123 "The B<getgrouplist>() function scans the group database (see B<group>(5)) "
124 "to obtain the list of groups that I<user> belongs to. Up to I<*ngroups> of "
125 "these groups are returned in the array I<groups>."
126 msgstr ""
127
128 #. type: Plain text
129 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
130 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
131 msgid ""
132 "If it was not among the groups defined for I<user> in the group database, "
133 "then I<group> is included in the list of groups returned by "
134 "B<getgrouplist>(); typically this argument is specified as the group ID from "
135 "the password record for I<user>."
136 msgstr ""
137
138 #. type: Plain text
139 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
140 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
141 msgid ""
142 "The I<ngroups> argument is a value-result argument: on return it always "
143 "contains the number of groups found for I<user>, including I<group>; this "
144 "value may be greater than the number of groups stored in I<groups>."
145 msgstr ""
146
147 #. type: SH
148 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
149 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
150 #, no-wrap
151 msgid "RETURN VALUE"
152 msgstr ""
153
154 #. type: Plain text
155 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
156 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
157 msgid ""
158 "If the number of groups of which I<user> is a member is less than or equal "
159 "to I<*ngroups>, then the value I<*ngroups> is returned."
160 msgstr ""
161
162 #. type: Plain text
163 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
164 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
165 msgid ""
166 "If the user is a member of more than I<*ngroups> groups, then "
167 "B<getgrouplist>() returns -1. In this case, the value returned in "
168 "I<*ngroups> can be used to resize the buffer passed to a further call to "
169 "B<getgrouplist>()."
170 msgstr ""
171
172 #. type: SH
173 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
174 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
175 #, no-wrap
176 msgid "ATTRIBUTES"
177 msgstr ""
178
179 #. type: Plain text
180 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
181 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
182 msgid ""
183 "For an explanation of the terms used in this section, see B<attributes>(7)."
184 msgstr ""
185
186 #. type: tbl table
187 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
188 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
189 #, no-wrap
190 msgid "Interface"
191 msgstr ""
192
193 #. type: tbl table
194 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
195 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
196 #, no-wrap
197 msgid "Attribute"
198 msgstr ""
199
200 #. type: tbl table
201 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
202 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
203 #, no-wrap
204 msgid "Value"
205 msgstr ""
206
207 #. type: tbl table
208 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
209 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
210 #, no-wrap
211 msgid ".na\n"
212 msgstr ""
213
214 #. type: tbl table
215 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
216 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
217 #, no-wrap
218 msgid ".nh\n"
219 msgstr ""
220
221 #. type: tbl table
222 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
223 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
224 #, no-wrap
225 msgid "B<getgrouplist>()"
226 msgstr ""
227
228 #. type: tbl table
229 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
230 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
231 #, no-wrap
232 msgid "Thread safety"
233 msgstr ""
234
235 #. type: tbl table
236 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
237 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
238 #, no-wrap
239 msgid "MT-Safe locale"
240 msgstr ""
241
242 #. type: SH
243 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
244 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
245 #, no-wrap
246 msgid "STANDARDS"
247 msgstr ""
248
249 #. type: Plain text
250 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
251 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
252 msgid "None."
253 msgstr ""
254
255 #. type: SH
256 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
257 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
258 #, no-wrap
259 msgid "HISTORY"
260 msgstr ""
261
262 #. type: Plain text
263 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
264 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
265 msgid "glibc 2.2.4."
266 msgstr ""
267
268 #. type: SH
269 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
270 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
271 #, no-wrap
272 msgid "BUGS"
273 msgstr ""
274
275 #. type: Plain text
276 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
277 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
278 msgid ""
279 "Before glibc 2.3.3, the implementation of this function contains a buffer-"
280 "overrun bug: it returns the complete list of groups for I<user> in the array "
281 "I<groups>, even when the number of groups exceeds I<*ngroups>."
282 msgstr ""
283
284 #. type: SH
285 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
286 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
287 #, no-wrap
288 msgid "EXAMPLES"
289 msgstr ""
290
291 #. type: Plain text
292 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
293 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
294 msgid ""
295 "The program below displays the group list for the user named in its first "
296 "command-line argument. The second command-line argument specifies the "
297 "I<ngroups> value to be supplied to B<getgrouplist>(). The following shell "
298 "session shows examples of the use of this program:"
299 msgstr ""
300
301 #. type: Plain text
302 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
303 #: opensuse-tumbleweed
304 #, no-wrap
305 msgid ""
306 "$B< ./a.out cecilia 0>\n"
307 "getgrouplist() returned -1\n"
308 "ngroups = 3\n"
309 "$B< ./a.out cecilia 3>\n"
310 "ngroups = 3\n"
311 "16 (dialout)\n"
312 "33 (video)\n"
313 "100 (users)\n"
314 msgstr ""
315
316 #. type: SS
317 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
318 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
319 #, no-wrap
320 msgid "Program source"
321 msgstr ""
322
323 #. type: Plain text
324 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
325 #: opensuse-tumbleweed
326 #, no-wrap
327 msgid ""
328 "#include E<lt>errno.hE<gt>\n"
329 "#include E<lt>grp.hE<gt>\n"
330 "#include E<lt>pwd.hE<gt>\n"
331 "#include E<lt>stdio.hE<gt>\n"
332 "#include E<lt>stdlib.hE<gt>\n"
333 "\\&\n"
334 "int\n"
335 "main(int argc, char *argv[])\n"
336 "{\n"
337 " int ngroups;\n"
338 " gid_t *groups;\n"
339 " struct group *gr;\n"
340 " struct passwd *pw;\n"
341 "\\&\n"
342 " if (argc != 3) {\n"
343 " fprintf(stderr, \"Usage: %s E<lt>userE<gt> E<lt>ngroupsE<gt>\\[rs]n\", argv[0]);\n"
344 " exit(EXIT_FAILURE);\n"
345 " }\n"
346 "\\&\n"
347 " ngroups = atoi(argv[2]);\n"
348 "\\&\n"
349 " groups = malloc(sizeof(*groups) * ngroups);\n"
350 " if (groups == NULL) {\n"
351 " perror(\"malloc\");\n"
352 " exit(EXIT_FAILURE);\n"
353 " }\n"
354 "\\&\n"
355 " /* Fetch passwd structure (contains first group ID for user). */\n"
356 "\\&\n"
357 " errno = 0;\n"
358 " pw = getpwnam(argv[1]);\n"
359 " if (pw == NULL) {\n"
360 " if (errno)\n"
361 " perror(\"getpwnam\");\n"
362 " else\n"
363 " fprintf(stderr, \"no such user\\[rs]n\");\n"
364 " exit(EXIT_FAILURE);\n"
365 " }\n"
366 "\\&\n"
367 " /* Retrieve group list. */\n"
368 "\\&\n"
369 " if (getgrouplist(argv[1], pw-E<gt>pw_gid, groups, &ngroups) == -1) {\n"
370 " fprintf(stderr, \"getgrouplist() returned -1\\[rs]n\");\n"
371 " fprintf(stderr, \"ngroups = %d\\[rs]n\", ngroups);\n"
372 " exit(EXIT_FAILURE);\n"
373 " }\n"
374 "\\&\n"
375 " /* Display list of retrieved groups, along with group names. */\n"
376 "\\&\n"
377 " fprintf(stderr, \"ngroups = %d\\[rs]n\", ngroups);\n"
378 " for (int j = 0; j E<lt> ngroups; j++) {\n"
379 " printf(\"%d\", groups[j]);\n"
380 " gr = getgrgid(groups[j]);\n"
381 " if (gr != NULL)\n"
382 " printf(\" (%s)\", gr-E<gt>gr_name);\n"
383 " printf(\"\\[rs]n\");\n"
384 " }\n"
385 "\\&\n"
386 " exit(EXIT_SUCCESS);\n"
387 "}\n"
388 msgstr ""
389
390 #. SRC END
391 #. type: SH
392 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
393 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
394 #, no-wrap
395 msgid "SEE ALSO"
396 msgstr ""
397
398 #. type: Plain text
399 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
400 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
401 msgid ""
402 "B<getgroups>(2), B<setgroups>(2), B<getgrent>(3), B<group_member>(3), "
403 "B<group>(5), B<passwd>(5)"
404 msgstr ""
405
406 #. type: TH
407 #: debian-trixie
408 #, no-wrap
409 msgid "2024-06-15"
410 msgstr ""
411
412 #. type: TH
413 #: debian-trixie
414 #, no-wrap
415 msgid "Linux man-pages 6.9.1"
416 msgstr ""
417
418 #. type: Plain text
419 #: debian-trixie
420 msgid "Standard C library (I<libc>, I<-lc>)"
421 msgstr ""
422
423 #. type: Plain text
424 #: debian-trixie fedora-44 fedora-rawhide
425 #, no-wrap
426 msgid ""
427 "$B< ./a.out cecilia 0>\n"
428 "getgrouplist() returned -1; ngroups = 3\n"
429 "$B< ./a.out cecilia 3>\n"
430 "ngroups = 3\n"
431 "16 (dialout)\n"
432 "33 (video)\n"
433 "100 (users)\n"
434 msgstr ""
435
436 #. type: Plain text
437 #: debian-trixie fedora-44 fedora-rawhide
438 #, no-wrap
439 msgid ""
440 "#include E<lt>errno.hE<gt>\n"
441 "#include E<lt>grp.hE<gt>\n"
442 "#include E<lt>pwd.hE<gt>\n"
443 "#include E<lt>stdio.hE<gt>\n"
444 "#include E<lt>stdlib.hE<gt>\n"
445 "\\&\n"
446 "int\n"
447 "main(int argc, char *argv[])\n"
448 "{\n"
449 " int ngroups;\n"
450 " gid_t *groups;\n"
451 " struct group *gr;\n"
452 " struct passwd *pw;\n"
453 "\\&\n"
454 " if (argc != 3) {\n"
455 " fprintf(stderr, \"Usage: %s E<lt>userE<gt> E<lt>ngroupsE<gt>\\[rs]n\", argv[0]);\n"
456 " exit(EXIT_FAILURE);\n"
457 " }\n"
458 "\\&\n"
459 " ngroups = atoi(argv[2]);\n"
460 "\\&\n"
461 " groups = malloc(sizeof(*groups) * ngroups);\n"
462 " if (groups == NULL) {\n"
463 " perror(\"malloc\");\n"
464 " exit(EXIT_FAILURE);\n"
465 " }\n"
466 "\\&\n"
467 " /* Fetch passwd structure (contains first group ID for user). */\n"
468 "\\&\n"
469 " errno = 0;\n"
470 " pw = getpwnam(argv[1]);\n"
471 " if (pw == NULL) {\n"
472 " if (errno)\n"
473 " perror(\"getpwnam\");\n"
474 " else\n"
475 " fprintf(stderr, \"no such user\\[rs]n\");\n"
476 " exit(EXIT_FAILURE);\n"
477 " }\n"
478 "\\&\n"
479 " /* Retrieve group list. */\n"
480 "\\&\n"
481 " if (getgrouplist(argv[1], pw-E<gt>pw_gid, groups, &ngroups) == -1) {\n"
482 " fprintf(stderr, \"getgrouplist() returned -1; ngroups = %d\\[rs]n\",\n"
483 " ngroups);\n"
484 " exit(EXIT_FAILURE);\n"
485 " }\n"
486 "\\&\n"
487 " /* Display list of retrieved groups, along with group names. */\n"
488 "\\&\n"
489 " fprintf(stderr, \"ngroups = %d\\[rs]n\", ngroups);\n"
490 " for (int j = 0; j E<lt> ngroups; j++) {\n"
491 " printf(\"%d\", groups[j]);\n"
492 " gr = getgrgid(groups[j]);\n"
493 " if (gr != NULL)\n"
494 " printf(\" (%s)\", gr-E<gt>gr_name);\n"
495 " printf(\"\\[rs]n\");\n"
496 " }\n"
497 "\\&\n"
498 " exit(EXIT_SUCCESS);\n"
499 "}\n"
500 msgstr ""
501
502 #. type: TH
503 #: fedora-44 fedora-rawhide
504 #, no-wrap
505 msgid "2024-07-23"
506 msgstr ""
507
508 #. type: TH
509 #: fedora-44 fedora-rawhide
510 #, no-wrap
511 msgid "Linux man-pages 6.13"
512 msgstr ""
513
514 #. type: TH
515 #: mageia-cauldron
516 #, no-wrap
517 msgid "Linux man-pages 6.17"
518 msgstr ""
519
520 #. type: TH
521 #: opensuse-leap-16-1 opensuse-tumbleweed
522 #, no-wrap
523 msgid "Linux man-pages (unreleased)"
524 msgstr ""