+ \funcdecl{struct group *getgrgid(gid\_t gid)}
+
+ \funcdecl{struct group *getgrnam(const char *name)}
+
+ \funcdecl{struct group *getpwuid\_r(gid\_t gid, struct group *password,
+ char *buffer, size\_t buflen, struct group **result)}
+
+ \funcdecl{struct group *getpwnam\_r(const char *name, struct group
+ *password, char *buffer, size\_t buflen, struct group **result)}
+
+ Restituiscono le informazioni relative al gruppo specificato.
+
+ \bodydesc{Le funzioni ritornano 0 in caso di successo e un codice d'errore
+ altriementi, nel qual caso \var{errno} sarà settato opportunente.}
+\end{functions}
+
+Il comportamento di tutte queste funzioni è assolutamente identico alle
+precedenti che leggono le informazioni sugli utenti, l'unica differenza è che
+in questo caso le informazioni vengono restituite in una struttura di tipo
+\type{group}, la cui definizione è riportata in \figref{fig:sys_group_struct}.
+
+\begin{figure}[!htb]
+ \footnotesize
+ \centering
+ \begin{minipage}[c]{15cm}
+ \begin{lstlisting}[labelstep=0]{}%,frame=,indent=1cm]{}
+struct group {
+ char *gr_name; /* group name */
+ char *gr_passwd; /* group password */
+ gid_t gr_gid; /* group id */
+ char **gr_mem; /* group members */
+};
+ \end{lstlisting}
+ \end{minipage}
+ \normalsize
+ \caption{La struttura \var{group} contenente le informazioni relative ad un
+ gruppo del sistema.}
+ \label{fig:sys_group_struct}
+\end{figure}
+
+Le funzioni viste finora sono in grado di leggere le informazioni sia dal file
+delle password in \file{/etc/passwd} che con qualunque altro metodo sia stato
+utilizzato per mantenere il database degli utenti. Non permettono però di
+settare direttamente le password; questo è possibile con un'altra interfaccia
+al database degli utenti, derivata da SVID, che però funziona soltanto con un
+database che sia tenuto su un file che abbia il formato classico di
+\file{/etc/passwd}.
+
+Dato che ormai la gran parte delle distribuzioni di Linux utilizzano PAM, che
+come minimo usa almeno le \textit{shadow password}, con quindi delle modifiche
+rispetto al formato classico di \file{/etc/passwd}, ci limitiamo a citare
+queste funzioni in \tabref{tab:sys_passwd_func}.
+
+
+\begin{table}[htb]
+ \footnotesize
+ \centering
+ \begin{tabular}[c]{|l|l|}
+ \hline
+ \textbf{Funzione} & \textbf{Significato}\\
+ \hline
+ \hline
+ \func{fgetpwent} & \\
+ \func{fgetpwent\_r}& \\
+ \func{getpwent} & \\
+ \func{getpwent\_r} & \\
+ \func{setpwent} & \\
+ \func{putpwent} & \\
+ \func{endpwent} & \\
+ \func{fgetgrent} & \\
+ \func{fgetgrent\_r}& \\
+ \func{getgrent} & \\
+ \func{getgrent\_r} & \\
+ \func{setgrent} & \\
+ \func{endgrent} & \\
+ \hline
+ \end{tabular}
+ \caption{Funzioni per la manipolazione dei campi di un file usato come
+ database di utenti e gruppi nel formato di \file{/etc/passwd} e
+ \file{/etc/groups}.}
+ \label{tab:sys_passwd_func}
+\end{table}
+
+Un altro insieme di funzioni utili è quello che permette di accedere ai dati
+del database di