[PATCH] libwbclient clear pointer on bad read

Matthew Newton mcn4 at leicester.ac.uk
Sun Feb 22 18:18:39 MST 2015


Hi,

On Tue, Jan 27, 2015 at 09:27:14PM +0100, Volker Lendecke wrote:
> On Tue, Jan 27, 2015 at 09:26:06PM +0100, Stefan (metze) Metzmacher wrote:
> > Maybe
> > 
> > struct wbcContext *ctx = NULL;
> > 
> > ...
> > 
> > ctx = wbcCtxCreate();
> > 
> > ...
> > 
> > err = wbcCtxAuthenticateUserEx(ctx, &authparams, &info, &error);
> > 
> > ...
> > 
> > wbcCtxFree(ctx);
...
> 
> Looks good to me from a naming perspective :-)

Well, after life got in the way for a bit, I've managed to spend a
few evenings and finally worm on this. The patch is (obviously)
quite a lot bigger than before, but hopefully still fairly clear.

I've broken it down into six separate patches - I'll send them as
a series to the list rather than attaching to this e-mail. Hope
that's OK!

The first couple of patches work on the underlying winbind client
library (nsswitch/wb_common.c and related sources), then the rest
update the libwbclient library in nsswitch/libwbclient/.

Cheers,

Matthew


-- 
Matthew Newton, Ph.D. <mcn4 at le.ac.uk>

Systems Specialist, Infrastructure Services,
I.T. Services, University of Leicester, Leicester LE1 7RH, United Kingdom

For IT help contact helpdesk extn. 2253, <ithelp at le.ac.uk>


More information about the samba-technical mailing list