[sudo-commits] sudo changeset 5957:225d4a22f60e

Todd C. Miller Todd.Miller at courtesan.com
Tue Aug 3 15:17:03 EDT 2010


changeset:	5957:225d4a22f60e in /home/hg/sudo
details:	http://www.sudo.ws/repos/sudo/rev/225d4a22f60e
user:		Todd C. Miller <Todd.Miller at courtesan.com>
date:		Tue Aug 03 15:15:45 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).

diffstat:

 plugins/sudoers/pwutil.c |  356 +++++++++++++++++++++++++++-------------------
 1 files changed, 212 insertions(+), 144 deletions(-)



More information about the sudo-commits mailing list