summaryrefslogtreecommitdiff
path: root/pidl
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-01-25 19:46:18 +0100
committerStefan Metzmacher <metze@samba.org>2011-01-26 08:51:46 +0100
commit4b068bb91994a0fc3a76abd45bff4e2fe53e9a34 (patch)
tree1ee6fa392973cfc54dd38588774a6dcbd2874aa6 /pidl
parent3272e16846f6b7363c5a42c8cececaf4bb409688 (diff)
downloadsamba-4b068bb91994a0fc3a76abd45bff4e2fe53e9a34.tar.gz
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
Diffstat (limited to 'pidl')
-rw-r--r--pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm b/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
index 0ebccf552cb..64a4ec5aede 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);";