[sudo-commits] sudo changeset 5954:2c1d8ec4fa5f

Todd C. Miller Todd.Miller at courtesan.com
Tue Aug 3 14:59:26 EDT 2010

changeset:	5954:2c1d8ec4fa5f in /home/hg/sudo
details:	http://www.sudo.ws/repos/sudo/rev/2c1d8ec4fa5f
user:		Todd C. Miller <Todd.Miller at courtesan.com>
date:		Tue Aug 03 14:59:17 2010 -0400

Log Message:
	Instead of caching struct passwd and struct group in the red-black
	tree, store a struct cache_item which includes both the key and
	datum.  This allows us to user the actual name that was looked up
	as the key instead of the contents of struct passwd or struct group.
	This matters because the name in the database may not match what
	we looked up, due either to case folding or truncation (historically
	at 8 characters).  Also mark the disabled calls to sudo_freepwcache()
	and sudo_freegrcache() as broken since we use cached data for things
	like set_perms() and the logging functions.  Fixing this would
	require making a copy of the structs for user and runas or adding
	a reference count (better).


 pwutil.c |  360 +++++++++++++++++++++++++++++++++++++-------------------------
 1 files changed, 214 insertions(+), 146 deletions(-)

More information about the sudo-commits mailing list