getgrent.3, getgrent_r.3, getgrnam.3: Refer reader for group(5) for more ino on group structure

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2010-10-21 11:52:05 +02:00
parent 7f12f11793
commit b39f3e059c
3 changed files with 38 additions and 25 deletions

View File

@ -25,7 +25,7 @@
.\" 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)
.TH GETGRENT 3 2010-09-20 "" "Linux Programmer's Manual"
.TH GETGRENT 3 2010-10-21 "" "Linux Programmer's Manual"
.SH NAME
getgrent, setgrent, endgrent \- get group file entry
.SH SYNOPSIS
@ -98,6 +98,9 @@ struct group {
};
.fi
.in
.PP
For more information about the fields of this structure, see
.BR group (5).
.SH "RETURN VALUE"
The
.BR getgrent ()
@ -155,4 +158,5 @@ SVr4, 4.3BSD, POSIX.1-2001.
.BR getgrgid (3),
.BR getgrnam (3),
.BR getgrouplist (3),
.BR putgrent (3)
.BR putgrent (3),
.BR group (5)

View File

@ -20,7 +20,7 @@
.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
.\" USA.
.\"
.TH GETGRENT_R 3 2007-07-26 "GNU" "Linux Programmer's Manual"
.TH GETGRENT_R 3 2010-10-21 "GNU" "Linux Programmer's Manual"
.SH NAME
getgrent_r, fgetgrent_r \- get group file entry reentrantly
.SH SYNOPSIS
@ -75,7 +75,10 @@ struct group {
};
.fi
.in
.sp
.PP
For more information about the fields of this structure, see
.BR group (5).
.PP
The nonreentrant functions return a pointer to static storage,
where this static storage contains further pointers to group
name, password and members.

View File

@ -28,7 +28,7 @@
.\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
.\" Modified 2003-11-15 by aeb
.\"
.TH GETGRNAM 3 2009-03-30 "" "Linux Programmer's Manual"
.TH GETGRNAM 3 2010-10-21 "" "Linux Programmer's Manual"
.SH NAME
getgrnam, getgrnam_r, getgrgid, getgrgid_r \- get group file entry
.SH SYNOPSIS
@ -80,26 +80,6 @@ the broken-out fields of the record in the group database
that matches the group ID
.IR gid .
.PP
The
.BR getgrnam_r ()
and
.BR getgrgid_r ()
functions obtain the same information, but store the retrieved
.I group
structure
in the space pointed to by
.IR grp .
This
.I group
structure contains pointers to strings, and these strings
are stored in the buffer
.I buf
of size
.IR buflen .
A pointer to the result (in case of success) or NULL (in case no entry
was found or an error occurred) is stored in
.IR *result .
.PP
The \fIgroup\fP structure is defined in \fI<grp.h>\fP as follows:
.sp
.in +4n
@ -113,6 +93,32 @@ struct group {
.fi
.in
.PP
For more information about the fields of this structure, see
.BR group (5).
.PP
The
.BR getgrnam_r ()
and
.BR getgrgid_r ()
functions obtain the same information as
.BR getgrnam ()
and
.BR getgrgid (),
but store the retrieved
.I group
structure
in the space pointed to by
.IR grp .
The string fields pointed to by the members of the
.I group
structure are stored in the buffer
.I buf
of size
.IR buflen .
A pointer to the result (in case of success) or NULL (in case no entry
was found or an error occurred) is stored in
.IR *result .
.PP
The maximum needed size for
.I buf
can be found using