access idmap cache directly from smbd

Jeremy Allison jra at samba.org
Mon Aug 18 23:28:32 GMT 2008


On Mon, Aug 18, 2008 at 04:26:35PM -0700, Jeremy Allison wrote:
> 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.

Pseudocode to try and make things clearer...

smbd_check_winbindd_cache();
if (!in_cache) {
	smbd_check_in_local_memory_cache();
}
if (!in_cache) {
	ask_winbindd();
}

do_legacy_mapping_and_store_in_local_memory_cache();


More information about the samba-technical mailing list