On Wed, 24 May 2006 17:18:11 +0200, Rainer Peter Feller wrote:
on my system a ls -l will give the first match in /etc/passwd for a username
I suspect that is the most common implementation (scan /etc/passwd from the top util the first match) but that the 'correct' behaviour is specified nowhere. I guess it's defined by the implementation of getpwuid(3) in your libc.
BTW, can anyone point to the glibc source file that contains the actual working code for this? I've spent a whole afternoon trying to trace this, but all I could find are buffer allocations and lookups of which nss database to use, etc. until finally the function name, that has been constructed by a bunch of nested macro calls and passed many levels down the call stack, gets looked up in some tree structure or added if it's not there and they finally come back somehow with a pointer to a function that gets called... That's about where I lost the trail!
-- Brandon. -- http://linuxfromscratch.org/mailman/listinfo/lfs-chat FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
