[PATCH] Fix possible crash bugs in tdb code.

Volker Lendecke Volker.Lendecke at SerNet.DE
Mon Nov 19 16:33:58 GMT 2007


On Mon, Nov 19, 2007 at 04:33:18PM +0100, Andreas Schneider wrote:
> > Can't you fix the callers? Passing NULL as tdb_ctx *should*
> > IMHO lead to a segfault.
> 
> here is the fix for the caller.

Hmmmm. How can this happen? Jerry?

Volker

> index a88a061..d11748e 100644
> --- a/source/nsswitch/winbindd_cache.c
> +++ b/source/nsswitch/winbindd_cache.c
> @@ -2165,7 +2165,7 @@ void wcache_invalidate_cache(void)
>  
>  		DEBUG(10, ("wcache_invalidate_cache: invalidating cache "
>  			   "entries for %s\n", domain->name));
> -		if (cache)
> +		if (cache && cache->tdb)
>  			tdb_traverse(cache->tdb, traverse_fn, NULL);
>  	}
>  }
> -- 
> 1.5.3.4
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20071119/796f2c16/attachment.bin


More information about the samba-technical mailing list