access idmap cache directly from smbd

Jeremy Allison jra at samba.org
Mon Aug 18 23:26:35 GMT 2008


On Mon, Aug 18, 2008 at 06:18:59PM -0500, Gerald (Jerry) Carter wrote:

> I don't care as long as it's graceful failure over
> if the entry is not in the cache.  smbd should not
> be writing to the cache.
> 
> For example,
> 
> 	smbd_check_cache();
> 	if (!in_cache)
> 		ask_winbindd();
> 
> 	do_legacy_mapping()
> 
> 
> But in order to solve Volker's pdb_ldap.c issue, just make
> smbd in memory cache a tdb separate from winbind's cache
> and let smbd write all it wants.

Ok, I'm cool with that. We can even leave the current
in-memory cache code in place to do just that, and let
smbd look in the winbindd cache, followed by the local
in-memory cache before doing any lookup or legacy mapping.

Then if we have to fallback to the legacy mapping it just stores
in the old-style local memory cache as it used to.

Does that work for you ?

> It's you guys' call.  I'm just expressing my thoughts.
> The fact is that pdb_ldap should have had it's own cache
> to begin with.  That would have made more sense IMO.
> We knew that doing ldap_search() all the time was a bad
> idea.

The idea was to add a generic layer on top of any
backend, rather than having each one have to recreate
a caching layer.

> I'm bowing out this thread as I don't think I have much
> more to add nuless it's actual code.

Nope, don't bow out, more comments very welcome :-).

Jeremy.


More information about the samba-technical mailing list