.\" -*- coding: UTF-8 -*- .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\" References consulted: .\" Linux libc source code .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sat Jul 24 19:29:54 1993 by Rik Faith (faith@cs.unc.edu) .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH GETGRENT 3 "15 septembre 2017" "" "Manuel du programmeur Linux" .SH NOM getgrent, setgrent, endgrent \- Lire les enregistrements du fichier de groupes .SH SYNOPSIS .nf \fB#include \fP \fB#include \fP .PP \fBstruct group *getgrent(void);\fP .PP \fBvoid setgrent(void);\fP .PP \fBvoid endgrent(void);\fP .fi .PP .RS -4 Exigences de macros de test de fonctionnalités pour la glibc (consulter \fBfeature_test_macros\fP(7))\ : .RE .PP .PD 0 .ad l \fBsetgrent\fP()\ : .RS 4 .\" || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED _XOPEN_SOURCE\ >=\ 500 || /* Glibc since 2.19: */ _DEFAULT_SOURCE || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE .RE .PP \fBgetgrent\fP(), \fBendgrent\fP()\ : .RS 4 .\" || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED Since glibc 2.22: _XOPEN_SOURCE\ >=\ 500 || _DEFAULT_SOURCE .br .\" || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED Glibc 2.21 and earlier _XOPEN_SOURCE\ >=\ 500 || /* Since glibc 2.12: */ _POSIX_C_SOURCE\ >=\ 200809L || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE .RE .PD .ad b .SH DESCRIPTION La fonction \fBgetgrent\fP() renvoie un pointeur sur une structure contenant les champs d'un enregistrement de la base de données de groupe (par exemple, le fichier de groupe local \fI/etc/group\fP, NIS ou LDAP). Au premier appel, \fBgetgrent\fP() renvoie le premier enregistrement, puis les autres enregistrements lors des appels successifs. .PP La fonction \fBsetgrent\fP() ramène le pointeur au début de la base de données de groupe pour permettre des balayages répétitifs. .PP La fonction \fBendgrent\fP() est utilisée pour fermer la base de données de groupe après que toutes les actions ont été réalisées. .PP La structure \fIgroup\fP est définie dans \fI\fP comme ceci\ : .PP .in +4n .EX struct group { char *gr_name; /* nom de groupe */ char *gr_passwd; /* mot de passe de groupe */ gid_t gr_gid; /* identifiant de groupe */ char **gr_mem; /* tableau de pointeurs de nom des membres de groupe terminé par un pointeur NULL */ }; .EE .in .PP Pour plus d'informations à propos des champs de cette structure, consultez \fBgroup\fP(5). .SH "VALEUR RENVOYÉE" La fonction \fBgetgrent\fP() renvoie un pointeur vers une structure \fIgroup\fP ou un pointeur NULL s'il n'y a plus d'enregistrement, ou si une erreur se produit. .PP En cas d'erreur, \fIerrno\fP peut être positionnée. Si vous souhaitez vérifier sa valeur, il est nécessaire de la positionner à zéro avant l'appel. .PP La valeur de retour peut pointer sur une zone de mémoire statique et peut être écrasée par des appels successifs à \fBgetgrent\fP(), \fBgetgrgid\fP(3) ou \fBgetgrnam\fP(3). (Ne pas passer le pointeur renvoyé à \fBfree\fP(3).) .SH ERREURS .TP \fBEAGAIN\fP The service was temporarily unavailable; try again later. For NSS backends in glibc this indicates a temporary error talking to the backend. The error may correct itself, retrying later is suggested. .TP \fBEINTR\fP Un signal a été intercepté\ ; consultez \fBsignal\fP(7). .TP \fBEIO\fP Erreur d'entrée\-sortie. .TP \fBEMFILE\fP La limite du nombre de descripteurs de fichiers par processus a été atteinte. .TP \fBENFILE\fP La limite du nombre total de fichiers ouverts pour le système entier a été atteinte. .TP .\" not in POSIX \fBENOENT\fP A necessary input file cannot be found. For NSS backends in glibc this indicates the backend is not correctly configured. .TP \fBENOMEM\fP .\" not in POSIX Pas assez de mémoire pour allouer la structure \fIgroup\fP. .TP \fBERANGE\fP L'espace tampon fourni est insuffisant. .SH FICHIERS .TP \fI/etc/group\fP Base de données des groupes locaux .SH ATTRIBUTS Pour une explication des termes utilisés dans cette section, consulter \fBattributes\fP(7). .TS allbox; lbw11 lb lb l l l. Interface Attribut Valeur T{ \fBgetgrent\fP() T} Sécurité des threads T{ MT\-Unsafe race:grent .br race:grentbuf locale T} T{ \fBsetgrent\fP(), \fBendgrent\fP() T} Sécurité des threads MT\-Unsafe race:grent locale .TE .PP In the above table, \fIgrent\fP in \fIrace:grent\fP signifies that if any of the functions \fBsetgrent\fP(), \fBgetgrent\fP(), or \fBendgrent\fP() are used in parallel in different threads of a program, then data races could occur. .SH CONFORMITÉ POSIX.1\-2001, POSIX.1\-2008, SVr4, 4.3BSD. .SH "VOIR AUSSI" \fBfgetgrent\fP(3), \fBgetgrent_r\fP(3), \fBgetgrgid\fP(3), \fBgetgrnam\fP(3), \fBgetgrouplist\fP(3), \fBputgrent\fP(3), \fBgroup\fP(5) .SH COLOPHON Cette page fait partie de la publication\ 5.10 du projet \fIman\-pages\fP Linux. Une description du projet et des instructions pour signaler des anomalies et la dernière version de cette page peuvent être trouvées à l'adresse \%https://www.kernel.org/doc/man\-pages/. .SH TRADUCTION La traduction française de cette page de manuel a été créée par Christophe Blaess , Stéphan Rafin , Thierry Vignaud , François Micaux, Alain Portal , Jean-Philippe Guérard , Jean-Luc Coulon (f5ibh) , Julien Cristau , Thomas Huriaux , Nicolas François , Florentin Duneau , Simon Paillard , Denis Barbier et David Prévot . Cette traduction est une documentation libre ; veuillez vous reporter à la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License version 3 .UE concernant les conditions de copie et de distribution. Il n'y a aucune RESPONSABILITÉ LÉGALE. Si vous découvrez un bogue dans la traduction de cette page de manuel, veuillez envoyer un message à .MT debian-l10n-french@lists.debian.org .ME .