winbindd_cm.c leak in failed connection cache

Tim Potter tpot at samba.org
Mon Jul 29 18:08:02 GMT 2002


On Mon, Jul 29, 2002 at 10:40:54AM -0700, Dan Coppock wrote:

> I'm seeing a slow winbind leak when the dc for a trusted domain is
> permanently unreachable (it's down, or administratively unavailable).  It
> looks like in winbindd_cm.c, when the controller name cannot be looked up,
> or when the connection really fails, cm_open_connection() calls
> add_failed_connection_entry(), blindly adding to the failed connection
> cache.  I suspect there should be check to see if it's already in the failed
> connection cache, and only update the lookup_time when present.

Fixed.  Thanks for spotting this.

> Also, in the case where the controller name lookup fails, is controller even
> defined for inclusion in the "struct failed_connection_cache"?  Isn't the
> controller name the very piece of information that wasn't obtainable, and
> therefore not useful for caching here?  I'm not sure on this part.

Yes this does look like a bit of a problem.  Fortunately the connection
structure is zeroed before cm_open_connection is called so the
controller name will always be the null string.  It does seem a bit
silly to store the controller name as part of the cache entry.


Tim.




More information about the samba-technical mailing list