cvs commit: projects/csup idcache.c idcache.h
Maxime Henrion
mux at FreeBSD.org
Sun Mar 5 16:32:54 PST 2006
mux 2006-03-06 00:32:54 UTC
FreeBSD projects repository
Added files:
csup idcache.c idcache.h
Log:
Add an implementation of a thread-safe cache for lookups in the group
or password files, per name or per uid/gid. It serves two purposes.
First, it makes the code thread-safe by serializing calls to getpwuid()
or getpwnam() and calls to getgrgid() or getgrnam(). Second, it's a
cache so we avoid calling those functions several times for the same
password/group file entry. It's implemented using four separate hash
tables (uid->name, gid->name, name->uid, name->gid).
Revision Changes Path
1.1 +421 -0 projects/csup/idcache.c (new)
1.1 +41 -0 projects/csup/idcache.h (new)
More information about the cvs-projects
mailing list