Date: Mon, 6 Mar 2006 00:32:54 +0000 (UTC) From: Maxime Henrion <mux@FreeBSD.org> To: projects-committers@FreeBSD.org, cvs-projects@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: projects/csup idcache.c idcache.h Message-ID: <200603060032.k260Wsge098532@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200603060032.k260Wsge098532>