[Bug libc/12491] Calling getpwuid in a statically linked program should return an error, not a seg fault.

geir at cray dot com sourceware-bugzilla@sourceware.org
Thu Sep 15 16:15:00 GMT 2011


http://sourceware.org/bugzilla/show_bug.cgi?id=12491

--- Comment #3 from Geir Johansen <geir at cray dot com> 2011-09-15 16:14:45 UTC ---
(In reply to comment #2)
> getpwuid works just fine under the only conditions when it can work, just as
> described in the link message.  If you overlook that message it is your
> problem.

My editorial comment on this resolution:

If the nscd daemon is running on the system, the program will run fine without
problems.

If the nscd daemon is not running on the system, the program will get a
segmentation fault and the user will not have any idea why the program is
failing. In my opinion this behavior is unacceptable. The library should be
more robust and at the very least report an error in this case.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the Glibc-bugs mailing list