[PATCH] libwbclient clear pointer on bad read

Volker Lendecke Volker.Lendecke at SerNet.DE
Tue Jan 20 00:38:04 MST 2015


On Tue, Jan 20, 2015 at 08:08:11AM +0100, Andreas Schneider wrote:
> On Monday 19 January 2015 20:30:37 Matthew Newton wrote:
> > Hi,
> > 
> > On Sun, Jan 18, 2015 at 04:26:41PM +0100, Stefan (metze) Metzmacher wrote:
> > > Am 17.01.2015 um 02:44 schrieb Matthew Newton:
> > > > +	if ((fd_info = winbindd_fd_info()) == NULL) {
> > > > +		return;
> > > > +	}
> > > 
> > > Can you please change all changes like this into two lines:
> > > 
> > > fd_info = winbindd_fd_info();
> > > if (fd_info == NULL) {
> > > ...
> > 
> > Updated patches attached.
> > 
> > I've now tested this on a FreeRADIUS server and it's working fine:
> > over 22,000 auths, peaking at 15 per second with 5 threads. I just
> > can't test the irix bit.
> 
> Great work, thanks. Could you please make is_privileged a bool? :)

Well, it wasn't before, so this is an add-on, right?

There's one question I have: Does the pthread_create_key
destructor also kick in if we are unloaded via dlclose()? We
had to specificially add the __attribute__((destructor))
to fix a fd leak in long-running apps that load and unload
us. I believe some apache module did this. I'd not like to
re-introduce this fd leak again.

Thanks,

Volker

-- 
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:kontakt at sernet.de


More information about the samba-technical mailing list