fgetpwent(3) Library Functions Manual fgetpwent(3) fgetpwent - (libc -lc) #include #include #include struct passwd *fgetpwent(FILE *stream); glibc ( feature_test_macros(7)): fgetpwent(): glibc 2.19: _DEFAULT_SOURCE glibc 2.19 : _SVID_SOURCE fgetpwent() stream. . stream /etc/passwd ( passwd(5)). passwd : struct passwd { char *pw_name; /* */ char *pw_passwd; /* */ uid_t pw_uid; /* */ gid_t pw_gid; /* */ char *pw_gecos; /* */ char *pw_dir; /* */ char *pw_shell; /* */ }; fgetpwent() passwd NULL . errno . ENOMEM passwd. /etc/passwd attributes(7). +------+------------------------------------+--------------------------+ || | | +------+------------------------------------+--------------------------+ |fgetpwent()| | MT-Unsafe race:fgetpwent | | | | | +------+------------------------------------+--------------------------+ . SVr4. endpwent(3), fgetpwent_r(3), fopen(3), getpw(3), getpwent(3), getpwnam(3), getpwuid(3), putpwent(3), setpwent(3), passwd(5) 3 . . : . 6.18 8 2026 fgetpwent(3)