proposition of further changes in dcerpc code

tridge at samba.org tridge at samba.org
Mon Dec 5 23:48:06 GMT 2005


Mimir,

 > Attached patch is a change leading towards fully async
 > dcerpc_pipe_connect function. It contains work on connection
 > routine via named pipe. Note, that I have separated functions
 > into dcerpc_connect.c, as dcerpc_util.c grows too big doing
 > many different things. I believe dcerpc connection functions
 > put in a separate file make a clear split.

yes, I agree on splitting out the connect code. The split you've made
looks sensible.

In dcerpc_pipe_connect_ncacn_np_smb_send() you should probably put the
smb_composite_connect_send() call outside the SCHANNEL if
statement. It's the same call in both branches of the if() so no need
to duplicate it.

I'd also like to see a few comments. I think that composite functions
really do need a few comments at minimum stating what stage of the
connection process is reached in each function. So for example,
explain at the top of continue_smb_connect() that this is called when
the SMB socket is established, and the IPC$ share open, and that the
remaining task is to open the pipe.

I think you are also missing a couple of places where allocation
failures should be checked for. For example, add a composite_nomem()
check after copying the called_name. Apart from that the code looks
good and I think you should commit. I think the structure interface is
fine for this call, although if you'd prefer the function parameter
approach then I won't object.

Have you thought about where the epm map calls will fit in? I know
you're concentrating on ncacn_np for now, where epm isn't needed, but
it might be worth thinking about what the API will look like when epm
is taken into account.

Cheers, Tridge


More information about the samba-technical mailing list