summaryrefslogtreecommitdiffstats
path: root/man3/getgrnam.3
diff options
context:
space:
mode:
Diffstat (limited to 'man3/getgrnam.3')
-rw-r--r--man3/getgrnam.331
1 files changed, 15 insertions, 16 deletions
diff --git a/man3/getgrnam.3 b/man3/getgrnam.3
index b79e15f..fb53c6e 100644
--- a/man3/getgrnam.3
+++ b/man3/getgrnam.3
@@ -11,7 +11,7 @@
.\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
.\" Modified 2003-11-15 by aeb
.\"
-.TH getgrnam 3 2023-07-20 "Linux man-pages 6.05.01"
+.TH getgrnam 3 2023-10-31 "Linux man-pages 6.7"
.SH NAME
getgrnam, getgrnam_r, getgrgid, getgrgid_r \- get group file entry
.SH LIBRARY
@@ -21,10 +21,10 @@ Standard C library
.nf
.B #include <sys/types.h>
.B #include <grp.h>
-.PP
+.P
.BI "struct group *getgrnam(const char *" name );
.BI "struct group *getgrgid(gid_t " gid );
-.PP
+.P
.BI "int getgrnam_r(const char *restrict " name \
", struct group *restrict " grp ,
.BI " char " buf "[restrict ." buflen "], size_t " buflen ,
@@ -33,12 +33,12 @@ Standard C library
.BI " char " buf "[restrict ." buflen "], size_t " buflen ,
.BI " struct group **restrict " result );
.fi
-.PP
+.P
.RS -4
Feature Test Macro Requirements for glibc (see
.BR feature_test_macros (7)):
.RE
-.PP
+.P
.BR getgrnam_r (),
.BR getgrgid_r ():
.nf
@@ -55,16 +55,16 @@ the broken-out fields of the record in the group database
NIS, and LDAP)
that matches the group name
.IR name .
-.PP
+.P
The
.BR getgrgid ()
function returns a pointer to a structure containing
the broken-out fields of the record in the group database
that matches the group ID
.IR gid .
-.PP
+.P
The \fIgroup\fP structure is defined in \fI<grp.h>\fP as follows:
-.PP
+.P
.in +4n
.EX
struct group {
@@ -76,10 +76,10 @@ struct group {
};
.EE
.in
-.PP
+.P
For more information about the fields of this structure, see
.BR group (5).
-.PP
+.P
The
.BR getgrnam_r ()
and
@@ -102,15 +102,15 @@ of size
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
+.P
The call
-.PP
+.P
.in +4n
.EX
sysconf(_SC_GETGR_R_SIZE_MAX)
.EE
.in
-.PP
+.P
returns either \-1, without changing
.IR errno ,
or an initial suggested size for
@@ -134,7 +134,7 @@ is set to indicate the error.
If one wants to check
.I errno
after the call, it should be set to zero before the call.
-.PP
+.P
The return value may point to a static area, and may be overwritten
by subsequent calls to
.BR getgrent (3),
@@ -143,7 +143,7 @@ or
.BR getgrnam ().
(Do not pass the returned pointer to
.BR free (3).)
-.PP
+.P
On success,
.BR getgrnam_r ()
and
@@ -225,7 +225,6 @@ T{
.BR getgrgid_r ()
T} Thread safety MT-Safe locale
.TE
-.sp 1
.SH VERSIONS
The formulation given above under "RETURN VALUE" is from POSIX.1.
.\" POSIX.1-2001, POSIX.1-2008