Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Dec 2004 20:02:10 -0600
From:      Mike Meyer <mwm@mired.org>
To:        hackers@freebsd.org
Subject:   files_getstate
Message-ID:  <16834.15906.60580.929003@guru.mired.org>

next in thread | raw e-mail | index | archive | help
I am, for perverse reasons, writing my own version of getpwuid_r on
5-STABLE. The real source to this lives in
/usr/src/lib/libc/gen/getpwent.c There, the code looks values up in a
db database using a key that consists of a magic cookie prepended to
the userid. The magic cookie is built from a constant in pwd.h and the
version member of a files_state struct. The files_state struct is
presumably filled in by a call to files_getstate.

I can't find the source to files_getstate *anywhere* in /usr/src.

See?

guru% pwd
/usr/src
guru% find . -type f | xargs grep files_getstate /dev/null
./lib/libc/gen/getgrent.c:	rv = files_getstate(&st);
./lib/libc/gen/getgrent.c:	*errnop = files_getstate(&st);
./lib/libc/gen/getpwent.c:	rv = files_getstate(&st);
./lib/libc/gen/getpwent.c:	*errnop = files_getstate(&st);

For that matter, the files_state structure is declared in getpwent.c.

Since I can't figure out what value the version member has, I'm sort
of stuck

Can anyone tell me where to find this missing function/macro?

	Thanks,
	<mike
-- 
Mike Meyer <mwm@mired.org>		http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?16834.15906.60580.929003>