[PATCH] Add messaging_init_client() function

Volker Lendecke vl at samba.org
Mon Nov 14 11:22:11 UTC 2016


On Mon, Nov 14, 2016 at 12:16:43PM +0100, Andreas Schneider wrote:
> On Monday, 14 November 2016 11:51:59 CET Volker Lendecke wrote:
> > On Mon, Nov 14, 2016 at 11:42:01AM +0100, Andreas Schneider wrote:
> > > The attached patchset adds a messaging_init_client() to correctly address
> > > issues when we try to setup messaging in a client tool like rpcclient or
> > > net.
> > > 
> > > It also cleans them up a bit.
> > > 
> > > Review and push much appreciated!
> > 
> > In general I like those changes, just returning a pointer is
> > definitely not enough.
> > 
> > However -- is returning NT_STATUS_OK really the right thing for the
> > client_init function when it did not work? Shouldn't we lift the error
> > handling a bit up? NT_STATUS_OK tells the caller everything was fine,
> > and I would expect crashes later on trying to dereference the
> > messaging context pointer.
> 
> Check the code, the messaging context can be NULL in the client code!

Sorry, I am not familiar enough with the messaging code it seems. I
hand this over to the experts.

Volker



More information about the samba-technical mailing list