From 224fbbe33fbb4acea1c0907b1b7566d749521a92 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 22 Sep 2010 19:04:58 -0700 Subject: s4:irpc: use LIBNDR_FLAG_REF_ALLOC for the server side when pulling The dcerpc server also uses it, so it was surprising that the IRPC server side doesn't used it. The reason to have this is that we want to handle error cases and returns like NT_STATUS_NOT_SUPPORTED sane, without crashing while marshalling the response. metze Signed-off-by: Anatoliy Atanasov --- source4/lib/messaging/messaging.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source4/lib') diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c index d880c6336f..724d66af68 100644 --- a/source4/lib/messaging/messaging.c +++ b/source4/lib/messaging/messaging.c @@ -769,6 +769,8 @@ static void irpc_handler_request(struct messaging_context *msg_ctx, r = talloc_zero_size(m->ndr, i->table->calls[m->header.callnum].struct_size); if (r == NULL) goto failed; + m->ndr->flags |= LIBNDR_FLAG_REF_ALLOC; + /* parse the request data */ ndr_err = i->table->calls[i->callnum].ndr_pull(m->ndr, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) goto failed; -- cgit