svn commit: samba r23072 - in branches/SAMBA_3_0/source/nsswitch: .

Michael Adam ma at
Tue May 22 16:08:49 GMT 2007

On Tue, May 22, 2007 at 05:36:06PM +0200, Guenther Deschner wrote:
> obnox at wrote:
> > -		if (lookup_cached_sid(mem_ctx, &sid, &domain_name, &name, &name_type)) {
> > -
> > -			DEBUG(10,("ads: lookup_groupmem: got sid %s from cache\n", 
> > -				sid_string_static(&sid)));
> > -
> > -			(*names)[*num_names] = CONST_DISCARD(char *,name);
> > -			(*name_types)[*num_names] = name_type;
> > -			sid_copy(&(*sid_mem)[*num_names], &sid);
> > -
> Hm, what was the reason the remove the frontend cache for lookups that
> we already have done and go out to the network with every query?

You are right in that the cache should be used. I just threw the
original stuff out completey... :-)

The primary reason was that it is of not much use to get *some* sid
lookups from cache: Massive overhead of tending two lists etc.
In the lookup_sids case, talloc is done inside the lsa function.
In the cache/dn_lookup case, talloc is done in the
lookup_groupmem function.

Volker just suggested to go through the list and take 
results from cache if all can be retrieved. Otherwise pass
the complete list to lsa_lookup_sids. Seems like a good idea,
but the probem of where talloc is done remains. 

I will think about this and re-incorporate the cache lookups again.

Cheers, Michael

Michael Adam <ma at>
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.SerNet.DE, mailto: Info @ SerNet.DE

More information about the samba-technical mailing list