[SSSD] [PATCH][PRELIMINARY] sudo: send username and uid while requesting default options

Jakub Hrozek jhrozek at redhat.com
Tue Apr 3 00:48:07 UTC 2012


On Mon, Apr 02, 2012 at 04:19:52PM -0400, Dmitri Pal wrote:
> On 03/30/2012 09:34 AM, Jakub Hrozek wrote:
> > On Fri, Mar 30, 2012 at 01:23:10PM +0200, Pavel Březina wrote:
> >> On 28.3.2012 17:33, Simo Sorce wrote:
> >>> On Wed, 2012-03-28 at 10:09 -0400, Jakub Hrozek wrote:
> >>>> On Tue, Mar 27, 2012 at 10:05:04AM +0200, Pavel Březina wrote:
> >>>>> 2. store the pair (user,domainname) in the in-memory cache as well
> >>>>> - find domain name in in-memory cache
> >>>>> - if not found then perform initgroups, go into provider, ...
> >>>>>
> >>>>> - find default options in in-memory cache
> >>>>> - if not found then go into provider, ...
> >>>>>
> >>>>> Advantage - faster, easier to implement
> >>>>> Disadvantage - bigger memory dump if the sudo is used by many users
> >>>>>
> >>>>> I hope that this is understandable enough.
> >>>>>
> >>>> The cache places a timer on the cached data, so the memory is only
> >>>> occupied for a short and defined period of time. I think the advantages
> >>>> outweight the slightly bigger memory consumption, so I would prefer this
> >>>> option.
> >>> Why this data is not simply stored in LDB ?
> >>>
> >>> Simo.
> >>>
> >> I'm sorry, what data do you mean? The (user,domain) pair?
> > We talked with Simo recently about abandoning the memory cache completely
> 
> Which memory cache you are referring to here?
> 

It is a different memory cache than what Simo wrote (sorry, memory cache
seems to be an overloaded term..). The sudo responder caches the set of
sudo rules for a user in a short-lived entry in a hash table. 

Simo didn't like this another level of cache and suggested we always
perform sysdb lookups. Pavel, who actually wrote the sudo cache is now
looking into whether the removal would cause any issues (we do some
post-processing of the rules after fetching them from sysdb).



More information about the sssd-devel mailing list