tags 504787 fixed-upstream thanks Hello Andreas,
On Fri, Nov 7, 2008 at 12:45 PM, Andreas Henriksson <[EMAIL PROTECTED]> wrote: > Sorry, noticed that there already is a description about it if you look > close enough in the "DESCRIPTION" section. I guess I'm not alone to jump > straight to the "RETURN" section and it would be nice with a small > pointer there, right after.... > > "The getpwnam_r() and getpwuid_r() functions return zero on success. In > case of error, an error number is returned." > > > Feel free to disagree and close this report. I don't feel strongly about > it, just thought it might help others to not make the same mistake I > did. Actually, I'll feel free to strongly agree with you. The page could be rather clearer on this point. I made the change below, which also makes other details more explicit, for upstream man-pages-3.14. I also made an analogous change in getgrnam.3. Thanks for your report! Cheers, Michael --- a/man3/getpwnam.3 +++ b/man3/getpwnam.3 @@ -142,15 +142,21 @@ by subsequent calls to .BR getpwnam (), or .BR getpwuid (). .LP -The +On success, .BR getpwnam_r () and .BR getpwuid_r () -functions return -zero on success. -In case of error, an error number is returned. +return zero, and set +.IR *pwbufp +to +.IR pwbuf . +If no matching password record was found, +these functions return 0 and store NULL in +.IR *pwbufp . +In case of error, an error number is returned, and NULL is stored in +.IR *pwbufp . .SH ERRORS .TP .BR 0 " or " ENOENT " or " ESRCH " or " EBADF " or " EPERM " or ... " The given -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ git://git.kernel.org/pub/scm/docs/man-pages/man-pages.git man-pages online: http://www.kernel.org/doc/man-pages/online_pages.html Found a bug? http://www.kernel.org/doc/man-pages/reporting_bugs.html -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

