On Wed, 30 Jun 2010, Ian Smith wrote:


I wondered whether this might be a Linux thing.  On my 7.2 system,

% find /usr/src -name "*.[ch]" -exec grep -Hw getpwuid {} \; > file

returns 195 lines, many in the form getpwuid(getuid()), in many base and
contrib components - including id(1), bind, sendmail etc - that could be
nondeterministic if getpwuid(0) ever returned other than root.

Just one mention of 'toor' in /usr/src/usr.sbin/makefs/compat/pwcache.c

Not claiming to know how the lookups in /usr/src/lib/libc/gen/getpwent.c
work under the hood, but this does seem likely a non-issue on FreeBSD.

I remember it causing some confusion while testing, but I can't remember
when or where. It might have been Linux or I might have been logged in as
"toor" or ????

I think I will hardcode the "root" case in nfsuserd, just to be safe.
(I also migt have editted /etc/passwd and reordered entries without
paying attention to it.)

rick

_______________________________________________
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"

Reply via email to