.\" Modified Sat Jul 24 19:37:37 1993 by Rik Faith (faith@cs.unc.edu)
.\" Modified Mon May 27 22:40:48 1996 by Martin Schulze (joey@linux.de)
.\"
-.TH FGETPWENT 3 2008-07-10 "GNU" "Linux Programmer's Manual"
+.TH FGETPWENT 3 2018-02-02 "GNU" "Linux Programmer's Manual"
.SH NAME
fgetpwent \- get password file entry
.SH SYNOPSIS
.B #include <stdio.h>
.B #include <sys/types.h>
.B #include <pwd.h>
-.sp
+.PP
.BI "struct passwd *fgetpwent(FILE *" stream );
.fi
-.sp
+.PP
.in -4n
Feature Test Macro Requirements for glibc (see
.BR feature_test_macros (7)):
.in
-.sp
+.PP
.BR fgetpwent ():
-_SVID_SOURCE
+ Since glibc 2.19:
+ _DEFAULT_SOURCE
+ Glibc 2.19 and earlier:
+ _SVID_SOURCE
.SH DESCRIPTION
The
.BR fgetpwent ()
.BR passwd (5)).
.PP
The \fIpasswd\fP structure is defined in \fI<pwd.h>\fP as follows:
-.sp
+.PP
.in +4n
-.nf
+.EX
struct passwd {
char *pw_name; /* username */
char *pw_passwd; /* user password */
char *pw_dir; /* home directory */
char *pw_shell; /* shell program */
};
-.fi
+.EE
.in
.SH RETURN VALUE
The
.I passwd
structure, or NULL if
there are no more entries or an error occurs.
+In the event of an error,
+.I errno
+is set to indicate the cause.
.SH ERRORS
.TP
.B ENOMEM
.TP
.I /etc/passwd
password database file
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lb lb lb
+l l l.
+Interface Attribute Value
+T{
+.BR fgetpwent ()
+T} Thread safety MT-Unsafe race:fgetpwent
+.TE
+.\" FIXME: The marking is different from that in the glibc manual,
+.\" which has:
+.\"
+.\" fgetpwent: MT-Unsafe race:fpwent
+.\"
+.\" We think race:fpwent in glibc maybe hard for users to understand,
+.\" and have sent a patch to the GNU libc community for changing it to
+.\" race:fgetpwent, however, something about the copyright impeded the
+.\" progress.
.SH CONFORMING TO
SVr4.
.SH SEE ALSO