switch rpc_pipe_open_internal to use NDR marshalling
Andrew Bartlett
abartlet at samba.org
Thu Jul 8 06:34:06 MDT 2010
On Thu, 2010-07-08 at 14:26 +0200, Guenther Deschner wrote:
> Hi,
>
> currently, the way we handle internal rpc pipes (in RAP to RPC, RPC to RPC
> and winbind to RPC scenarios) is highly effective (given the generated
> dispatch table) but rather problematic for two reasons:
>
> * Various fields of the IDL structs (all [value(X) elements) are only set
> during NDR push operations and thus remain unset in rpc_pipe_open_internal()
> exchanges.
>
> * Memory allocation (in particular in,out pointers)
This is the most important reason to do this. I recently put in a
talloc_steal() of an 'in' variable in the samba4 RPC server, and while I
could fix that, there may be other cases already.
> Therefor I'd like to push this patch
> http://git.samba.org/?p=gd/samba/.git;a=commitdiff;h=d351fc3da3c0a7a5b27435fbcae895eb246a8c0f
> which would do change the handling of internal pipes to this model:
>
>
> Current model:
>
> CLI -> rpccli_INTERFACE_X -> _INTERFACE_X
>
> Proposed model:
>
> CLI -> rpccli_INTERFACE_X -> NDR_PUSH -> api_INTERFACE_X -> NDR_PULL
> I think the performance loss is acceptable given that we would gain much
> more correctnes and a cleaner API this way.
I agree with the approach. I've not looked at the patch in great
detail, but I can't see any issues with a quick glance.
Andrew Bartlett
--
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
Samba Developer, Cisco Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20100708/96c685e5/attachment.pgp>
More information about the samba-technical
mailing list