From aeaec31533ca74e4f2e9ff03fe9554ad7e006962 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 6 Sep 2004 10:29:18 +0000 Subject: r2234: Tridge, this is a patch to allow people to set the REF_ALLOC flag on a dcerpc_pipe structure as we discussed this morning. (This used to be commit 79969dc8daf5fdaacd26135a200ecec0b4d7663c) --- source4/librpc/rpc/dcerpc.c | 4 ++++ source4/librpc/rpc/dcerpc.h | 3 +++ 2 files changed, 7 insertions(+) (limited to 'source4/librpc/rpc') diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c index 55acf4625c..715a680fde 100644 --- a/source4/librpc/rpc/dcerpc.c +++ b/source4/librpc/rpc/dcerpc.c @@ -116,6 +116,10 @@ static struct ndr_pull *ndr_pull_init_flags(struct dcerpc_pipe *p, DATA_BLOB *bl ndr->flags |= LIBNDR_FLAG_PAD_CHECK; } + if (p->flags & DCERPC_NDR_REF_ALLOC) { + ndr->flags |= LIBNDR_FLAG_REF_ALLOC; + } + return ndr; } diff --git a/source4/librpc/rpc/dcerpc.h b/source4/librpc/rpc/dcerpc.h index 0ec1abf55d..9083bfb795 100644 --- a/source4/librpc/rpc/dcerpc.h +++ b/source4/librpc/rpc/dcerpc.h @@ -104,6 +104,9 @@ struct dcerpc_pipe { /* check incoming pad bytes */ #define DCERPC_DEBUG_PAD_CHECK (1<<12) +/* set LIBNDR_FLAG_REF_ALLOC flag when decoding NDR */ +#define DCERPC_NDR_REF_ALLOC (1<<13) + /* this is used to find pointers to calls */ -- cgit