diff options
author | Simo Sorce <idra@samba.org> | 2010-07-13 15:43:44 -0400 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2010-07-16 01:51:16 +0200 |
commit | 31b59bbf99835279a0a78858aca2f327150eb5e2 (patch) | |
tree | 7524b7fcca9218767737c10eba864b9579f4a43a /source3/winbindd | |
parent | 8246214e7ef5374acc0a1f97f4f1203374fba7f8 (diff) | |
download | samba-31b59bbf99835279a0a78858aca2f327150eb5e2.tar.gz samba-31b59bbf99835279a0a78858aca2f327150eb5e2.tar.bz2 samba-31b59bbf99835279a0a78858aca2f327150eb5e2.zip |
s3-dcerpc: Convert rdata from prs_struct to a simple DATA_BLOB
Signed-off-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'source3/winbindd')
-rw-r--r-- | source3/winbindd/winbindd_dual_ndr.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source3/winbindd/winbindd_dual_ndr.c b/source3/winbindd/winbindd_dual_ndr.c index aee5052687..08d92d45e6 100644 --- a/source3/winbindd/winbindd_dual_ndr.c +++ b/source3/winbindd/winbindd_dual_ndr.c @@ -266,19 +266,20 @@ enum winbindd_result winbindd_dual_ndrcmd(struct winbindd_domain *domain, p.mem_ctx = talloc_stackframe(); p.in_data.data.buffer_size = state->request->extra_len; p.in_data.data.data_p = state->request->extra_data.data; - prs_init(&p.out_data.rdata, 0, state->mem_ctx, MARSHALL); ret = fns[state->request->data.ndrcmd].fn(&p); - TALLOC_FREE(p.mem_ctx); if (!ret) { + TALLOC_FREE(p.mem_ctx); return WINBINDD_ERROR; } state->response->extra_data.data = - talloc_memdup(state->mem_ctx, p.out_data.rdata.data_p, - p.out_data.rdata.data_offset); - state->response->length += p.out_data.rdata.data_offset; - prs_mem_free(&p.out_data.rdata); + talloc_move(state->mem_ctx, &p.out_data.rdata.data); + state->response->length += p.out_data.rdata.length; + p.out_data.rdata.length = 0; + + TALLOC_FREE(p.mem_ctx); + if (state->response->extra_data.data == NULL) { return WINBINDD_ERROR; } |