From 4b068bb91994a0fc3a76abd45bff4e2fe53e9a34 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 25 Jan 2011 19:46:18 +0100 Subject: pidl:Samba3/ServerNDR: correctly initialise ndr_push struct We need to copy the ptr_count from the ndr_pull struct to the ndr_push struct, otherwise we'll reuse full pointer ids, which will cause the client to fail in the ndr unmarshalling. metze --- pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'pidl/lib/Parse') diff --git a/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm b/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm index 0ebccf552c..64a4ec5aed 100644 --- a/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm +++ b/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm @@ -199,6 +199,12 @@ sub ParseFunction($$) pidl "\treturn false;"; pidl "}"; pidl ""; + pidl "/*"; + pidl " * carry over the pointer count to the reply in case we are"; + pidl " * using full pointer. See NDR specification for full pointers"; + pidl " */"; + pidl "push->ptr_count = pull->ptr_count;"; + pidl ""; pidl "ndr_err = call->ndr_push(push, NDR_OUT, r);"; pidl "if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {"; pidl "\ttalloc_free(r);"; -- cgit