Debian Codegraph @

po/fr/man3/getgrouplist.3.po

raw
1 # French translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # Christophe Blaess <https://www.blaess.fr/christophe/>, 1996-2003.
5 # Stéphan Rafin <[email protected]>, 2002.
6 # Thierry Vignaud <[email protected]>, 1999, 2002.
7 # François Micaux, 2002.
8 # Alain Portal <[email protected]>, 2003-2008.
9 # Jean-Philippe Guérard <[email protected]>, 2005-2006.
10 # Jean-Luc Coulon (f5ibh) <[email protected]>, 2006-2007.
11 # Julien Cristau <[email protected]>, 2006-2007.
12 # Thomas Huriaux <[email protected]>, 2006-2008.
13 # Nicolas François <[email protected]>, 2006-2008.
14 # Florentin Duneau <[email protected]>, 2006-2010.
15 # Simon Paillard <[email protected]>, 2006.
16 # Denis Barbier <[email protected]>, 2006, 2010.
17 # David Prévot <[email protected]>, 2010, 2012, 2013.
18 # Jean-Pierre Giraud <[email protected]>, 2023-2024.
19 msgid ""
20 msgstr ""
21 "Project-Id-Version: manpages-l10n 4.22.0\n"
22 "POT-Creation-Date: 2026-06-05 06:25+0200\n"
23 "PO-Revision-Date: 2024-06-03 09:06+0200\n"
24 "Last-Translator: Jean-Pierre Giraud <[email protected]>\n"
25 "Language-Team: French <[email protected]>\n"
26 "Language: fr\n"
27 "MIME-Version: 1.0\n"
28 "Content-Type: text/plain; charset=UTF-8\n"
29 "Content-Transfer-Encoding: 8bit\n"
30 "Plural-Forms: nplurals=2; plural=n > 1;\n"
31 "X-Generator: Lokalize 22.12.3\n"
32
33 #. type: TH
34 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
35 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
36 #, no-wrap
37 msgid "getgrouplist"
38 msgstr "getgrouplist"
39
40 #. type: TH
41 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
42 #: opensuse-tumbleweed
43 #, no-wrap
44 msgid "2025-09-21"
45 msgstr "21 septembre 2025"
46
47 #. type: TH
48 #: archlinux debian-unstable
49 #, no-wrap
50 msgid "Linux man-pages 6.18"
51 msgstr "Pages du manuel de Linux 6.18"
52
53 #. type: SH
54 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
55 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
56 #, no-wrap
57 msgid "NAME"
58 msgstr "NOM"
59
60 #. type: Plain text
61 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
62 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
63 msgid "getgrouplist - get list of groups to which a user belongs"
64 msgstr ""
65 "getgrouplist - Obtenir la liste des groupes auxquels appartient un "
66 "utilisateur"
67
68 #. type: SH
69 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
70 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
71 #, no-wrap
72 msgid "LIBRARY"
73 msgstr "BIBLIOTHÈQUE"
74
75 #. type: Plain text
76 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
77 #: opensuse-leap-16-1 opensuse-tumbleweed
78 msgid "Standard C library (I<libc>,\\ I<-lc>)"
79 msgstr "Bibliothèque C standard (I<libc>,\\ I<-lc>)"
80
81 #. type: SH
82 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
83 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
84 #, no-wrap
85 msgid "SYNOPSIS"
86 msgstr "SYNOPSIS"
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 #, no-wrap
92 msgid "B<#include E<lt>grp.hE<gt>>\n"
93 msgstr "B<#include E<lt>grp.hE<gt>>\n"
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 #, no-wrap
99 msgid ""
100 "B<int getgrouplist(const char *>I<user>B<, gid_t >I<group>B<,>\n"
101 "B< gid_t *>I<groups>B<, int *>I<ngroups>B<);>\n"
102 msgstr ""
103 "B<int getgrouplist(const char *>I<user>B<, gid_t >I<group>B<,>\n"
104 "B< gid_t *>I<groups>B<, int *>I<ngroups>B<);>\n"
105
106 #. type: Plain text
107 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
108 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
109 msgid ""
110 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
111 msgstr ""
112 "Exigences de macros de test de fonctionnalités pour la glibc (consulter "
113 "B<feature_test_macros>(7)) :"
114
115 #. type: Plain text
116 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
117 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
118 msgid "B<getgrouplist>():"
119 msgstr "B<getgrouplist>()\\ :"
120
121 #. type: Plain text
122 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
123 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
124 #, no-wrap
125 msgid ""
126 " Since glibc 2.19:\n"
127 " _DEFAULT_SOURCE\n"
128 " glibc 2.19 and earlier:\n"
129 " _BSD_SOURCE\n"
130 msgstr ""
131 " Depuis la glibc 2.19 :\n"
132 " _DEFAULT_SOURCE\n"
133 " glibc 2.19 et antérieures :\n"
134 " _BSD_SOURCE\n"
135
136 #. type: SH
137 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
138 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
139 #, no-wrap
140 msgid "DESCRIPTION"
141 msgstr "DESCRIPTION"
142
143 #. type: Plain text
144 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
145 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
146 msgid ""
147 "The B<getgrouplist>() function scans the group database (see B<group>(5)) "
148 "to obtain the list of groups that I<user> belongs to. Up to I<*ngroups> of "
149 "these groups are returned in the array I<groups>."
150 msgstr ""
151 "La fonction B<getgrouplist>() balaie la base de données des groupes (voir "
152 "B<group>(5)) pour obtenir la liste des groupes auxquels appartient "
153 "l'utilisateur I<user>. Jusqu'à I<*ngroups> de ces groupes sont retournés "
154 "dans le tableau I<groups>."
155
156 #. type: Plain text
157 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
158 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
159 msgid ""
160 "If it was not among the groups defined for I<user> in the group database, "
161 "then I<group> is included in the list of groups returned by "
162 "B<getgrouplist>(); typically this argument is specified as the group ID from "
163 "the password record for I<user>."
164 msgstr ""
165 "S'il n'était pas parmi les groupes définis pour l'utilisateur I<user> dans "
166 "la base de données des groupes, I<group> est inclus dans la liste des "
167 "groupes retournée par B<getgrouplist> ; typiquement, cet argument est "
168 "spécifié comme étant l'identifiant du groupe de l'utilisateur I<user> pris "
169 "dans l'enregistrement correspondant dans le fichier des mots de passe."
170
171 #. type: Plain text
172 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
173 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
174 msgid ""
175 "The I<ngroups> argument is a value-result argument: on return it always "
176 "contains the number of groups found for I<user>, including I<group>; this "
177 "value may be greater than the number of groups stored in I<groups>."
178 msgstr ""
179 "L'argument I<ngroups> est un argument «\\ valeur résultat\\ »\\ : au retour, "
180 "il contient toujours le nombre de groupes trouvés pour l'utilisateur "
181 "I<user>, incluant I<group> ; cette valeur peut être supérieure au nombre de "
182 "groupes enregistrés dans I<groups>."
183
184 #. type: SH
185 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
186 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
187 #, no-wrap
188 msgid "RETURN VALUE"
189 msgstr "VALEUR RENVOYÉE"
190
191 #. type: Plain text
192 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
193 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
194 msgid ""
195 "If the number of groups of which I<user> is a member is less than or equal "
196 "to I<*ngroups>, then the value I<*ngroups> is returned."
197 msgstr ""
198 "Si le nombre de groupes auquel l'utilisateur I<user> appartient est "
199 "inférieur ou égal à I<*ngroups>, la valeur I<*ngroups> est renvoyée."
200
201 #. type: Plain text
202 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
203 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
204 msgid ""
205 "If the user is a member of more than I<*ngroups> groups, then "
206 "B<getgrouplist>() returns -1. In this case, the value returned in "
207 "I<*ngroups> can be used to resize the buffer passed to a further call to "
208 "B<getgrouplist>()."
209 msgstr ""
210 "Si l'utilisateur appartient à plus de I<*ngroups> groupes, B<getgrouplist>() "
211 "renvoie -1. Dans ce cas, la valeur renvoyée dans I<*ngroups> peut être "
212 "utilisée pour redimensionner le tampon passé à un appel ultérieur à "
213 "B<getgrouplist>()."
214
215 #. type: SH
216 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
217 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
218 #, no-wrap
219 msgid "ATTRIBUTES"
220 msgstr "ATTRIBUTS"
221
222 #. type: Plain text
223 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
224 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
225 msgid ""
226 "For an explanation of the terms used in this section, see B<attributes>(7)."
227 msgstr ""
228 "Pour une explication des termes utilisés dans cette section, consulter "
229 "B<attributes>(7)."
230
231 #. type: tbl table
232 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
233 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
234 #, no-wrap
235 msgid "Interface"
236 msgstr "Interface"
237
238 #. type: tbl table
239 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
240 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
241 #, no-wrap
242 msgid "Attribute"
243 msgstr "Attribut"
244
245 #. type: tbl table
246 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
247 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
248 #, no-wrap
249 msgid "Value"
250 msgstr "Valeur"
251
252 #. type: tbl table
253 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
254 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
255 #, no-wrap
256 msgid ".na\n"
257 msgstr ".na\n"
258
259 #. type: tbl table
260 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
261 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
262 #, no-wrap
263 msgid ".nh\n"
264 msgstr ".nh\n"
265
266 #. type: tbl table
267 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
268 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
269 #, no-wrap
270 msgid "B<getgrouplist>()"
271 msgstr "B<getgrouplist>()"
272
273 #. type: tbl table
274 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
275 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
276 #, no-wrap
277 msgid "Thread safety"
278 msgstr "Sécurité des threads"
279
280 #. type: tbl table
281 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
282 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
283 #, no-wrap
284 msgid "MT-Safe locale"
285 msgstr "MT-Safe locale"
286
287 #. type: SH
288 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
289 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
290 #, no-wrap
291 msgid "STANDARDS"
292 msgstr "NORMES"
293
294 #. type: Plain text
295 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
296 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
297 msgid "None."
298 msgstr "Aucune."
299
300 #. type: SH
301 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
302 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
303 #, no-wrap
304 msgid "HISTORY"
305 msgstr "HISTORIQUE"
306
307 #. type: Plain text
308 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
309 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
310 msgid "glibc 2.2.4."
311 msgstr "glibc 2.2.4."
312
313 #. type: SH
314 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
315 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
316 #, no-wrap
317 msgid "BUGS"
318 msgstr "BOGUES"
319
320 #. type: Plain text
321 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
322 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
323 msgid ""
324 "Before glibc 2.3.3, the implementation of this function contains a buffer-"
325 "overrun bug: it returns the complete list of groups for I<user> in the array "
326 "I<groups>, even when the number of groups exceeds I<*ngroups>."
327 msgstr ""
328 "Avant la glibc\\ 2.3.3, l'implémentation de cette fonction comportait un "
329 "bogue de débordement de tampon : elle renvoyait la liste complète des "
330 "groupes de l'utilisateur I<user> dans le tableau I<groups>, même si le "
331 "nombre de groupes était supérieur à I<*ngroups>."
332
333 #. type: SH
334 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
335 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
336 #, no-wrap
337 msgid "EXAMPLES"
338 msgstr "EXEMPLES"
339
340 #. type: Plain text
341 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
342 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
343 msgid ""
344 "The program below displays the group list for the user named in its first "
345 "command-line argument. The second command-line argument specifies the "
346 "I<ngroups> value to be supplied to B<getgrouplist>(). The following shell "
347 "session shows examples of the use of this program:"
348 msgstr ""
349 "Le programme ci-dessous affiche la liste des groupes auxquels appartient "
350 "l'utilisateur indiqué comme premier argument de la ligne de commande. Le "
351 "second argument indique la valeur I<ngroups> à passer à B<getgrouplist>(). "
352 "La session shell suivante montre des exemples d'utilisation de ce programme :"
353
354 #. type: Plain text
355 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
356 #: opensuse-tumbleweed
357 #, fuzzy, no-wrap
358 #| msgid ""
359 #| "$B< ./a.out cecilia 0>\n"
360 #| "getgrouplist() returned -1; ngroups = 3\n"
361 #| "$B< ./a.out cecilia 3>\n"
362 #| "ngroups = 3\n"
363 #| "16 (dialout)\n"
364 #| "33 (video)\n"
365 #| "100 (users)\n"
366 msgid ""
367 "$B< ./a.out cecilia 0>\n"
368 "getgrouplist() returned -1\n"
369 "ngroups = 3\n"
370 "$B< ./a.out cecilia 3>\n"
371 "ngroups = 3\n"
372 "16 (dialout)\n"
373 "33 (video)\n"
374 "100 (users)\n"
375 msgstr ""
376 "$B< ./a.out cecilia 0>\n"
377 "getgrouplist() returned -1; ngroups = 3\n"
378 "$B< ./a.out cecilia 3>\n"
379 "ngroups = 3\n"
380 "16 (dialout)\n"
381 "33 (video)\n"
382 "100 (users)\n"
383
384 #. type: SS
385 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
386 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
387 #, no-wrap
388 msgid "Program source"
389 msgstr "Source du programme"
390
391 #. type: Plain text
392 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
393 #: opensuse-tumbleweed
394 #, fuzzy, no-wrap
395 #| msgid ""
396 #| "#include E<lt>errno.hE<gt>\n"
397 #| "#include E<lt>grp.hE<gt>\n"
398 #| "#include E<lt>pwd.hE<gt>\n"
399 #| "#include E<lt>stdio.hE<gt>\n"
400 #| "#include E<lt>stdlib.hE<gt>\n"
401 #| "\\&\n"
402 #| "int\n"
403 #| "main(int argc, char *argv[])\n"
404 #| "{\n"
405 #| " int ngroups;\n"
406 #| " gid_t *groups;\n"
407 #| " struct group *gr;\n"
408 #| " struct passwd *pw;\n"
409 #| "\\&\n"
410 #| " if (argc != 3) {\n"
411 #| " fprintf(stderr, \"Usage: %s E<lt>userE<gt> E<lt>ngroupsE<gt>\\[rs]n\", argv[0]);\n"
412 #| " exit(EXIT_FAILURE);\n"
413 #| " }\n"
414 #| "\\&\n"
415 #| " ngroups = atoi(argv[2]);\n"
416 #| "\\&\n"
417 #| " groups = malloc(sizeof(*groups) * ngroups);\n"
418 #| " if (groups == NULL) {\n"
419 #| " perror(\"malloc\");\n"
420 #| " exit(EXIT_FAILURE);\n"
421 #| " }\n"
422 #| "\\&\n"
423 #| " /* Fetch passwd structure (contains first group ID for user). */\n"
424 #| "\\&\n"
425 #| " errno = 0;\n"
426 #| " pw = getpwnam(argv[1]);\n"
427 #| " if (pw == NULL) {\n"
428 #| " if (errno)\n"
429 #| " perror(\"getpwnam\");\n"
430 #| " else\n"
431 #| " fprintf(stderr, \"no such user\\[rs]n\");\n"
432 #| " exit(EXIT_FAILURE);\n"
433 #| " }\n"
434 #| "\\&\n"
435 #| " /* Retrieve group list. */\n"
436 #| "\\&\n"
437 #| " if (getgrouplist(argv[1], pw-E<gt>pw_gid, groups, &ngroups) == -1) {\n"
438 #| " fprintf(stderr, \"getgrouplist() returned -1; ngroups = %d\\[rs]n\",\n"
439 #| " ngroups);\n"
440 #| " exit(EXIT_FAILURE);\n"
441 #| " }\n"
442 #| "\\&\n"
443 #| " /* Display list of retrieved groups, along with group names. */\n"
444 #| "\\&\n"
445 #| " fprintf(stderr, \"ngroups = %d\\[rs]n\", ngroups);\n"
446 #| " for (int j = 0; j E<lt> ngroups; j++) {\n"
447 #| " printf(\"%d\", groups[j]);\n"
448 #| " gr = getgrgid(groups[j]);\n"
449 #| " if (gr != NULL)\n"
450 #| " printf(\" (%s)\", gr-E<gt>gr_name);\n"
451 #| " printf(\"\\[rs]n\");\n"
452 #| " }\n"
453 #| "\\&\n"
454 #| " exit(EXIT_SUCCESS);\n"
455 #| "}\n"
456 msgid ""
457 "#include E<lt>errno.hE<gt>\n"
458 "#include E<lt>grp.hE<gt>\n"
459 "#include E<lt>pwd.hE<gt>\n"
460 "#include E<lt>stdio.hE<gt>\n"
461 "#include E<lt>stdlib.hE<gt>\n"
462 "\\&\n"
463 "int\n"
464 "main(int argc, char *argv[])\n"
465 "{\n"
466 " int ngroups;\n"
467 " gid_t *groups;\n"
468 " struct group *gr;\n"
469 " struct passwd *pw;\n"
470 "\\&\n"
471 " if (argc != 3) {\n"
472 " fprintf(stderr, \"Usage: %s E<lt>userE<gt> E<lt>ngroupsE<gt>\\[rs]n\", argv[0]);\n"
473 " exit(EXIT_FAILURE);\n"
474 " }\n"
475 "\\&\n"
476 " ngroups = atoi(argv[2]);\n"
477 "\\&\n"
478 " groups = malloc(sizeof(*groups) * ngroups);\n"
479 " if (groups == NULL) {\n"
480 " perror(\"malloc\");\n"
481 " exit(EXIT_FAILURE);\n"
482 " }\n"
483 "\\&\n"
484 " /* Fetch passwd structure (contains first group ID for user). */\n"
485 "\\&\n"
486 " errno = 0;\n"
487 " pw = getpwnam(argv[1]);\n"
488 " if (pw == NULL) {\n"
489 " if (errno)\n"
490 " perror(\"getpwnam\");\n"
491 " else\n"
492 " fprintf(stderr, \"no such user\\[rs]n\");\n"
493 " exit(EXIT_FAILURE);\n"
494 " }\n"
495 "\\&\n"
496 " /* Retrieve group list. */\n"
497 "\\&\n"
498 " if (getgrouplist(argv[1], pw-E<gt>pw_gid, groups, &ngroups) == -1) {\n"
499 " fprintf(stderr, \"getgrouplist() returned -1\\[rs]n\");\n"
500 " fprintf(stderr, \"ngroups = %d\\[rs]n\", ngroups);\n"
501 " exit(EXIT_FAILURE);\n"
502 " }\n"
503 "\\&\n"
504 " /* Display list of retrieved groups, along with group names. */\n"
505 "\\&\n"
506 " fprintf(stderr, \"ngroups = %d\\[rs]n\", ngroups);\n"
507 " for (int j = 0; j E<lt> ngroups; j++) {\n"
508 " printf(\"%d\", groups[j]);\n"
509 " gr = getgrgid(groups[j]);\n"
510 " if (gr != NULL)\n"
511 " printf(\" (%s)\", gr-E<gt>gr_name);\n"
512 " printf(\"\\[rs]n\");\n"
513 " }\n"
514 "\\&\n"
515 " exit(EXIT_SUCCESS);\n"
516 "}\n"
517 msgstr ""
518 "#include E<lt>errno.hE<gt>\n"
519 "#include E<lt>grp.hE<gt>\n"
520 "#include E<lt>pwd.hE<gt>\n"
521 "#include E<lt>stdio.hE<gt>\n"
522 "#include E<lt>stdlib.hE<gt>\n"
523 "\\&\n"
524 "int\n"
525 "main(int argc, char *argv[])\n"
526 "{\n"
527 " int ngroups;\n"
528 " struct passwd *pw;\n"
529 " struct group *gr;\n"
530 " gid_t *groups;\n"
531 "\\&\n"
532 " if (argc != 3) {\n"
533 " fprintf(stderr, \"Utilisation : %s E<lt>userE<gt> E<lt>ngroupsE<gt>\\[rs]n\", argv[0]);\n"
534 " exit(EXIT_FAILURE);\n"
535 " }\n"
536 "\\&\n"
537 " ngroups = atoi(argv[2]);\n"
538 "\\&\n"
539 " groups = malloc(sizeof(*groups) * ngroups);\n"
540 " if (groups == NULL) {\n"
541 " perror(\"malloc\");\n"
542 " exit(EXIT_FAILURE);\n"
543 " }\n"
544 "\\&\n"
545 " /* Extraire la structure passwd (contient le premier identifiant \n"
546 " de groupe de l'utilisateur). */\n"
547 "\\&\n"
548 " errno = 0;\n"
549 " pw = getpwnam(argv[1]);\n"
550 " if (pw == NULL) {\n"
551 " if (errno)\n"
552 " perror(\"getpwnam\");\n"
553 " else\n"
554 " fprintf(stderr, \"utilisateur inconnu\\[rs]n\");\n"
555 " exit(EXIT_FAILURE);\n"
556 " }\n"
557 "\\&\n"
558 " /* Récupérer la liste de groupes. */\n"
559 "\\&\n"
560 " if (getgrouplist(argv[1], pw-E<gt>pw_gid, groups, &ngroups) == -1) {\n"
561 " fprintf(stderr, \"getgrouplist() returned -1; ngroups = %d\\[rs]n\",\n"
562 " ngroups);\n"
563 " exit(EXIT_FAILURE);\n"
564 " }\n"
565 "\\&\n"
566 " /* Afficher la liste de groupes récupérés avec les noms de groupes. */\n"
567 "\\&\n"
568 " fprintf(stderr, \"ngroups = %d\\[rs]n\", ngroups);\n"
569 " for (int j = 0; j E<lt> ngroups; j++) {\n"
570 " printf(\"%d\", groups[j]);\n"
571 " gr = getgrgid(groups[j]);\n"
572 " if (gr != NULL)\n"
573 " printf(\" (%s)\", gr-E<gt>gr_name);\n"
574 " printf(\"\\[rs]n\");\n"
575 " }\n"
576 "\\&\n"
577 " exit(EXIT_SUCCESS);\n"
578 "}\n"
579
580 #. SRC END
581 #. type: SH
582 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
583 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
584 #, no-wrap
585 msgid "SEE ALSO"
586 msgstr "VOIR AUSSI"
587
588 #. type: Plain text
589 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
590 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
591 msgid ""
592 "B<getgroups>(2), B<setgroups>(2), B<getgrent>(3), B<group_member>(3), "
593 "B<group>(5), B<passwd>(5)"
594 msgstr ""
595 "B<getgroups>(2), B<setgroups>(2), B<getgrent>(3), B<group_member>(3), "
596 "B<group>(5), B<passwd>(5)"
597
598 #. type: TH
599 #: debian-trixie
600 #, no-wrap
601 msgid "2024-06-15"
602 msgstr "15 juin 2024"
603
604 #. type: TH
605 #: debian-trixie
606 #, no-wrap
607 msgid "Linux man-pages 6.9.1"
608 msgstr "Pages du manuel de Linux 6.9.1"
609
610 #. type: Plain text
611 #: debian-trixie
612 msgid "Standard C library (I<libc>, I<-lc>)"
613 msgstr "Bibliothèque C standard (I<libc>, I<-lc>)"
614
615 #. type: Plain text
616 #: debian-trixie fedora-44 fedora-rawhide
617 #, no-wrap
618 msgid ""
619 "$B< ./a.out cecilia 0>\n"
620 "getgrouplist() returned -1; ngroups = 3\n"
621 "$B< ./a.out cecilia 3>\n"
622 "ngroups = 3\n"
623 "16 (dialout)\n"
624 "33 (video)\n"
625 "100 (users)\n"
626 msgstr ""
627 "$B< ./a.out cecilia 0>\n"
628 "getgrouplist() returned -1; ngroups = 3\n"
629 "$B< ./a.out cecilia 3>\n"
630 "ngroups = 3\n"
631 "16 (dialout)\n"
632 "33 (video)\n"
633 "100 (users)\n"
634
635 #. type: Plain text
636 #: debian-trixie fedora-44 fedora-rawhide
637 #, no-wrap
638 msgid ""
639 "#include E<lt>errno.hE<gt>\n"
640 "#include E<lt>grp.hE<gt>\n"
641 "#include E<lt>pwd.hE<gt>\n"
642 "#include E<lt>stdio.hE<gt>\n"
643 "#include E<lt>stdlib.hE<gt>\n"
644 "\\&\n"
645 "int\n"
646 "main(int argc, char *argv[])\n"
647 "{\n"
648 " int ngroups;\n"
649 " gid_t *groups;\n"
650 " struct group *gr;\n"
651 " struct passwd *pw;\n"
652 "\\&\n"
653 " if (argc != 3) {\n"
654 " fprintf(stderr, \"Usage: %s E<lt>userE<gt> E<lt>ngroupsE<gt>\\[rs]n\", argv[0]);\n"
655 " exit(EXIT_FAILURE);\n"
656 " }\n"
657 "\\&\n"
658 " ngroups = atoi(argv[2]);\n"
659 "\\&\n"
660 " groups = malloc(sizeof(*groups) * ngroups);\n"
661 " if (groups == NULL) {\n"
662 " perror(\"malloc\");\n"
663 " exit(EXIT_FAILURE);\n"
664 " }\n"
665 "\\&\n"
666 " /* Fetch passwd structure (contains first group ID for user). */\n"
667 "\\&\n"
668 " errno = 0;\n"
669 " pw = getpwnam(argv[1]);\n"
670 " if (pw == NULL) {\n"
671 " if (errno)\n"
672 " perror(\"getpwnam\");\n"
673 " else\n"
674 " fprintf(stderr, \"no such user\\[rs]n\");\n"
675 " exit(EXIT_FAILURE);\n"
676 " }\n"
677 "\\&\n"
678 " /* Retrieve group list. */\n"
679 "\\&\n"
680 " if (getgrouplist(argv[1], pw-E<gt>pw_gid, groups, &ngroups) == -1) {\n"
681 " fprintf(stderr, \"getgrouplist() returned -1; ngroups = %d\\[rs]n\",\n"
682 " ngroups);\n"
683 " exit(EXIT_FAILURE);\n"
684 " }\n"
685 "\\&\n"
686 " /* Display list of retrieved groups, along with group names. */\n"
687 "\\&\n"
688 " fprintf(stderr, \"ngroups = %d\\[rs]n\", ngroups);\n"
689 " for (int j = 0; j E<lt> ngroups; j++) {\n"
690 " printf(\"%d\", groups[j]);\n"
691 " gr = getgrgid(groups[j]);\n"
692 " if (gr != NULL)\n"
693 " printf(\" (%s)\", gr-E<gt>gr_name);\n"
694 " printf(\"\\[rs]n\");\n"
695 " }\n"
696 "\\&\n"
697 " exit(EXIT_SUCCESS);\n"
698 "}\n"
699 msgstr ""
700 "#include E<lt>errno.hE<gt>\n"
701 "#include E<lt>grp.hE<gt>\n"
702 "#include E<lt>pwd.hE<gt>\n"
703 "#include E<lt>stdio.hE<gt>\n"
704 "#include E<lt>stdlib.hE<gt>\n"
705 "\\&\n"
706 "int\n"
707 "main(int argc, char *argv[])\n"
708 "{\n"
709 " int ngroups;\n"
710 " struct passwd *pw;\n"
711 " struct group *gr;\n"
712 " gid_t *groups;\n"
713 "\\&\n"
714 " if (argc != 3) {\n"
715 " fprintf(stderr, \"Utilisation : %s E<lt>userE<gt> E<lt>ngroupsE<gt>\\[rs]n\", argv[0]);\n"
716 " exit(EXIT_FAILURE);\n"
717 " }\n"
718 "\\&\n"
719 " ngroups = atoi(argv[2]);\n"
720 "\\&\n"
721 " groups = malloc(sizeof(*groups) * ngroups);\n"
722 " if (groups == NULL) {\n"
723 " perror(\"malloc\");\n"
724 " exit(EXIT_FAILURE);\n"
725 " }\n"
726 "\\&\n"
727 " /* Extraire la structure passwd (contient le premier identifiant \n"
728 " de groupe de l'utilisateur). */\n"
729 "\\&\n"
730 " errno = 0;\n"
731 " pw = getpwnam(argv[1]);\n"
732 " if (pw == NULL) {\n"
733 " if (errno)\n"
734 " perror(\"getpwnam\");\n"
735 " else\n"
736 " fprintf(stderr, \"utilisateur inconnu\\[rs]n\");\n"
737 " exit(EXIT_FAILURE);\n"
738 " }\n"
739 "\\&\n"
740 " /* Récupérer la liste de groupes. */\n"
741 "\\&\n"
742 " if (getgrouplist(argv[1], pw-E<gt>pw_gid, groups, &ngroups) == -1) {\n"
743 " fprintf(stderr, \"getgrouplist() returned -1; ngroups = %d\\[rs]n\",\n"
744 " ngroups);\n"
745 " exit(EXIT_FAILURE);\n"
746 " }\n"
747 "\\&\n"
748 " /* Afficher la liste de groupes récupérés avec les noms de groupes. */\n"
749 "\\&\n"
750 " fprintf(stderr, \"ngroups = %d\\[rs]n\", ngroups);\n"
751 " for (int j = 0; j E<lt> ngroups; j++) {\n"
752 " printf(\"%d\", groups[j]);\n"
753 " gr = getgrgid(groups[j]);\n"
754 " if (gr != NULL)\n"
755 " printf(\" (%s)\", gr-E<gt>gr_name);\n"
756 " printf(\"\\[rs]n\");\n"
757 " }\n"
758 "\\&\n"
759 " exit(EXIT_SUCCESS);\n"
760 "}\n"
761
762 #. type: TH
763 #: fedora-44 fedora-rawhide
764 #, no-wrap
765 msgid "2024-07-23"
766 msgstr "23 juillet 2024"
767
768 #. type: TH
769 #: fedora-44 fedora-rawhide
770 #, no-wrap
771 msgid "Linux man-pages 6.13"
772 msgstr "Pages du manuel de Linux 6.13"
773
774 #. type: TH
775 #: mageia-cauldron
776 #, no-wrap
777 msgid "Linux man-pages 6.17"
778 msgstr "Pages du manuel de Linux 6.17"
779
780 #. type: TH
781 #: opensuse-leap-16-1 opensuse-tumbleweed
782 #, no-wrap
783 msgid "Linux man-pages (unreleased)"
784 msgstr "Pages du manuel de Linux (non publiées)"