proposition of further changes in dcerpc code
Rafal Szczesniak
mimir at samba.org
Mon Dec 5 15:51:01 GMT 2005
On Mon, Dec 05, 2005 at 04:44:45PM +0100, Stefan Metzmacher wrote:
> On Mon, Dec 05, 2005 at 10:47:54AM +0100, Rafal Szczesniak wrote:
> Hi Rafal,
>
> I have some comments...
Great!
> and please do 'make clean test valgrindtest' befor commiting :-)
naturally :)
>
> > +struct pipe_connect {
>
> please rename this to dcerpc_pipe_connect
Yes, I thought about that too.
> > + c->status = dcerpc_pipe_open_smb_recv(ctx);
> > + if (!composite_is_ok(c)) {
> > + DEBUG(0,("Failed to open pipe %s - %s\n", s->io.pipe_name, nt_errstr(c->status)));
> > + return;
> > + }
>
> this will crash, as the composite_is_ok() calls the callback and that calls the _recv() function
> which free's the composite_context, so put the debug before the composite_is_ok()
> or remove it completly.
You're right. Thanks for pointing this.
> > +
> > + c->status = smb_composite_connect_recv(ctx, c);
> > + if (!composite_is_ok(c)) {
> > + DEBUG(0,("Failed to connect to %s - %s\n", s->io.binding->host, nt_errstr(c->status)));
>
> same as above...
>
> > + if (s->io.binding->flags & DCERPC_SCHANNEL) {
> > + struct cli_credentials *anon_creds
> > + = cli_credentials_init(tmp_ctx);
>
> if (composite_nomem(anon_creds, c)) return;
>
> > +
> > +NTSTATUS dcerpc_pipe_connect_ncacn_np_smb_recv(struct composite_context *c,
> > + TALLOC_CTX *mem_ctx)
>
> the mem_ctx isn't used, so remove it here
Sure. Thank you :)
cheers,
--
Rafal Szczesniak
Samba Team member http://www.samba.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.samba.org/archive/samba-technical/attachments/20051205/e803e4ea/attachment.bin
More information about the samba-technical
mailing list