From 48e2a2bfb75cdc914345b498012e82331546f0c0 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 13 Sep 2006 16:28:25 +0000 Subject: r18481: Use pidl-generated server side code for dfs. (This used to be commit 3f337c104d42321595161d0283b39357df252a8e) --- source3/librpc/gen_ndr/srv_dfs.c | 1201 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 1201 insertions(+) create mode 100644 source3/librpc/gen_ndr/srv_dfs.c (limited to 'source3/librpc/gen_ndr/srv_dfs.c') diff --git a/source3/librpc/gen_ndr/srv_dfs.c b/source3/librpc/gen_ndr/srv_dfs.c new file mode 100644 index 0000000000..75f3cd3949 --- /dev/null +++ b/source3/librpc/gen_ndr/srv_dfs.c @@ -0,0 +1,1201 @@ +/* + * Unix SMB/CIFS implementation. + * server auto-generated by pidl. DO NOT MODIFY! + */ + +#include "includes.h" +#include "librpc/gen_ndr/srv_dfs.h" + +static BOOL api_dfs_GetManagerVersion(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct dfs_GetManagerVersion r; + TALLOC_CTX *mem_ctx = talloc_init("api_dfs_GetManagerVersion"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_dfs_GetManagerVersion(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + _dfs_GetManagerVersion(p, r.out.exist_flag); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_dfs_GetManagerVersion(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_dfs_Add(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct dfs_Add r; + TALLOC_CTX *mem_ctx = talloc_init("api_dfs_Add"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_dfs_Add(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _dfs_Add(p, r.in.path, r.in.server, r.in.share, r.in.comment, r.in.flags); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_dfs_Add(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_dfs_Remove(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct dfs_Remove r; + TALLOC_CTX *mem_ctx = talloc_init("api_dfs_Remove"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_dfs_Remove(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _dfs_Remove(p, r.in.path, r.in.server, r.in.share); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_dfs_Remove(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_dfs_SetInfo(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct dfs_SetInfo r; + TALLOC_CTX *mem_ctx = talloc_init("api_dfs_SetInfo"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_dfs_SetInfo(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _dfs_SetInfo(p); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_dfs_SetInfo(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_dfs_GetInfo(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct dfs_GetInfo r; + TALLOC_CTX *mem_ctx = talloc_init("api_dfs_GetInfo"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_dfs_GetInfo(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _dfs_GetInfo(p, r.in.path, r.in.server, r.in.share, r.in.level, r.out.info); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_dfs_GetInfo(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_dfs_Enum(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct dfs_Enum r; + TALLOC_CTX *mem_ctx = talloc_init("api_dfs_Enum"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_dfs_Enum(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + r.out.info = r.in.info; + r.out.total = r.in.total; + r.out.result = _dfs_Enum(p, r.in.level, r.in.bufsize, r.in.info, r.in.unknown, r.in.total); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_dfs_Enum(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_dfs_Rename(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct dfs_Rename r; + TALLOC_CTX *mem_ctx = talloc_init("api_dfs_Rename"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_dfs_Rename(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _dfs_Rename(p); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_dfs_Rename(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_dfs_Move(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct dfs_Move r; + TALLOC_CTX *mem_ctx = talloc_init("api_dfs_Move"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_dfs_Move(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _dfs_Move(p); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_dfs_Move(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_dfs_ManagerGetConfigInfo(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct dfs_ManagerGetConfigInfo r; + TALLOC_CTX *mem_ctx = talloc_init("api_dfs_ManagerGetConfigInfo"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_dfs_ManagerGetConfigInfo(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _dfs_ManagerGetConfigInfo(p); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_dfs_ManagerGetConfigInfo(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_dfs_ManagerSendSiteInfo(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct dfs_ManagerSendSiteInfo r; + TALLOC_CTX *mem_ctx = talloc_init("api_dfs_ManagerSendSiteInfo"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_dfs_ManagerSendSiteInfo(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _dfs_ManagerSendSiteInfo(p); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_dfs_ManagerSendSiteInfo(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_dfs_AddFtRoot(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct dfs_AddFtRoot r; + TALLOC_CTX *mem_ctx = talloc_init("api_dfs_AddFtRoot"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_dfs_AddFtRoot(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _dfs_AddFtRoot(p); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_dfs_AddFtRoot(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_dfs_RemoveFtRoot(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct dfs_RemoveFtRoot r; + TALLOC_CTX *mem_ctx = talloc_init("api_dfs_RemoveFtRoot"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_dfs_RemoveFtRoot(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _dfs_RemoveFtRoot(p); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_dfs_RemoveFtRoot(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_dfs_AddStdRoot(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct dfs_AddStdRoot r; + TALLOC_CTX *mem_ctx = talloc_init("api_dfs_AddStdRoot"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_dfs_AddStdRoot(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _dfs_AddStdRoot(p); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_dfs_AddStdRoot(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_dfs_RemoveStdRoot(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct dfs_RemoveStdRoot r; + TALLOC_CTX *mem_ctx = talloc_init("api_dfs_RemoveStdRoot"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_dfs_RemoveStdRoot(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _dfs_RemoveStdRoot(p); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_dfs_RemoveStdRoot(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_dfs_ManagerInitialize(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct dfs_ManagerInitialize r; + TALLOC_CTX *mem_ctx = talloc_init("api_dfs_ManagerInitialize"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_dfs_ManagerInitialize(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _dfs_ManagerInitialize(p); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_dfs_ManagerInitialize(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_dfs_AddStdRootForced(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct dfs_AddStdRootForced r; + TALLOC_CTX *mem_ctx = talloc_init("api_dfs_AddStdRootForced"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_dfs_AddStdRootForced(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _dfs_AddStdRootForced(p); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_dfs_AddStdRootForced(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_dfs_GetDcAddress(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct dfs_GetDcAddress r; + TALLOC_CTX *mem_ctx = talloc_init("api_dfs_GetDcAddress"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_dfs_GetDcAddress(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _dfs_GetDcAddress(p); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_dfs_GetDcAddress(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_dfs_SetDcAddress(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct dfs_SetDcAddress r; + TALLOC_CTX *mem_ctx = talloc_init("api_dfs_SetDcAddress"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_dfs_SetDcAddress(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _dfs_SetDcAddress(p); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_dfs_SetDcAddress(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_dfs_FlushFtTable(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct dfs_FlushFtTable r; + TALLOC_CTX *mem_ctx = talloc_init("api_dfs_FlushFtTable"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_dfs_FlushFtTable(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _dfs_FlushFtTable(p); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_dfs_FlushFtTable(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_dfs_Add2(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct dfs_Add2 r; + TALLOC_CTX *mem_ctx = talloc_init("api_dfs_Add2"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_dfs_Add2(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _dfs_Add2(p); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_dfs_Add2(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_dfs_Remove2(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct dfs_Remove2 r; + TALLOC_CTX *mem_ctx = talloc_init("api_dfs_Remove2"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_dfs_Remove2(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _dfs_Remove2(p); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_dfs_Remove2(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_dfs_EnumEx(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct dfs_EnumEx r; + TALLOC_CTX *mem_ctx = talloc_init("api_dfs_EnumEx"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_dfs_EnumEx(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + r.out.info = r.in.info; + r.out.total = r.in.total; + r.out.result = _dfs_EnumEx(p, r.in.name, r.in.level, r.in.bufsize, r.in.info, r.in.total); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_dfs_EnumEx(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + +static BOOL api_dfs_SetInfo2(pipes_struct *p) +{ + struct ndr_pull *pull; + struct ndr_push *push; + NTSTATUS status; + DATA_BLOB blob; + struct dfs_SetInfo2 r; + TALLOC_CTX *mem_ctx = talloc_init("api_dfs_SetInfo2"); + + if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + pull = ndr_pull_init_blob(&blob, mem_ctx); + if (pull == NULL) + return False; + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + status = ndr_pull_dfs_SetInfo2(pull, NDR_IN, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + r.out.result = _dfs_SetInfo2(p); + + push = ndr_push_init_ctx(mem_ctx); + if (push == NULL) { + talloc_free(mem_ctx); + return False; + } + + status = ndr_push_dfs_SetInfo2(push, NDR_OUT, &r); + if (NT_STATUS_IS_ERR(status)) { + talloc_free(mem_ctx); + return False; + } + + blob = ndr_push_blob(push); + if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + talloc_free(mem_ctx); + return False; + } + + talloc_free(mem_ctx); + + return True; +} + + +/* Tables */ +static struct api_struct api_netdfs_cmds[] = +{ + {"DFS_GETMANAGERVERSION", DCERPC_DFS_GETMANAGERVERSION, api_dfs_GetManagerVersion}, + {"DFS_ADD", DCERPC_DFS_ADD, api_dfs_Add}, + {"DFS_REMOVE", DCERPC_DFS_REMOVE, api_dfs_Remove}, + {"DFS_SETINFO", DCERPC_DFS_SETINFO, api_dfs_SetInfo}, + {"DFS_GETINFO", DCERPC_DFS_GETINFO, api_dfs_GetInfo}, + {"DFS_ENUM", DCERPC_DFS_ENUM, api_dfs_Enum}, + {"DFS_RENAME", DCERPC_DFS_RENAME, api_dfs_Rename}, + {"DFS_MOVE", DCERPC_DFS_MOVE, api_dfs_Move}, + {"DFS_MANAGERGETCONFIGINFO", DCERPC_DFS_MANAGERGETCONFIGINFO, api_dfs_ManagerGetConfigInfo}, + {"DFS_MANAGERSENDSITEINFO", DCERPC_DFS_MANAGERSENDSITEINFO, api_dfs_ManagerSendSiteInfo}, + {"DFS_ADDFTROOT", DCERPC_DFS_ADDFTROOT, api_dfs_AddFtRoot}, + {"DFS_REMOVEFTROOT", DCERPC_DFS_REMOVEFTROOT, api_dfs_RemoveFtRoot}, + {"DFS_ADDSTDROOT", DCERPC_DFS_ADDSTDROOT, api_dfs_AddStdRoot}, + {"DFS_REMOVESTDROOT", DCERPC_DFS_REMOVESTDROOT, api_dfs_RemoveStdRoot}, + {"DFS_MANAGERINITIALIZE", DCERPC_DFS_MANAGERINITIALIZE, api_dfs_ManagerInitialize}, + {"DFS_ADDSTDROOTFORCED", DCERPC_DFS_ADDSTDROOTFORCED, api_dfs_AddStdRootForced}, + {"DFS_GETDCADDRESS", DCERPC_DFS_GETDCADDRESS, api_dfs_GetDcAddress}, + {"DFS_SETDCADDRESS", DCERPC_DFS_SETDCADDRESS, api_dfs_SetDcAddress}, + {"DFS_FLUSHFTTABLE", DCERPC_DFS_FLUSHFTTABLE, api_dfs_FlushFtTable}, + {"DFS_ADD2", DCERPC_DFS_ADD2, api_dfs_Add2}, + {"DFS_REMOVE2", DCERPC_DFS_REMOVE2, api_dfs_Remove2}, + {"DFS_ENUMEX", DCERPC_DFS_ENUMEX, api_dfs_EnumEx}, + {"DFS_SETINFO2", DCERPC_DFS_SETINFO2, api_dfs_SetInfo2}, +}; + +void netdfs_get_pipe_fns(struct api_struct **fns, int *n_fns) +{ + *fns = api_netdfs_cmds; + *n_fns = sizeof(api_netdfs_cmds) / sizeof(struct api_struct); +} + +NTSTATUS rpc_netdfs_init(void) +{ + return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "netdfs", "netdfs", api_netdfs_cmds, sizeof(api_netdfs_cmds) / sizeof(struct api_struct)); +} -- cgit From 71453ab90dbda7f335a3c7119eb8d404e85a0131 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 14 Sep 2006 14:51:16 +0000 Subject: r18526: Use generated server for unixinfo RPC interface. (This used to be commit a5c0606d7667506fdc64776e32d4b3508195a199) --- source3/librpc/gen_ndr/srv_dfs.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'source3/librpc/gen_ndr/srv_dfs.c') diff --git a/source3/librpc/gen_ndr/srv_dfs.c b/source3/librpc/gen_ndr/srv_dfs.c index 75f3cd3949..bd4503248d 100644 --- a/source3/librpc/gen_ndr/srv_dfs.c +++ b/source3/librpc/gen_ndr/srv_dfs.c @@ -31,6 +31,12 @@ static BOOL api_dfs_GetManagerVersion(pipes_struct *p) return False; } + r.out.exist_flag = talloc_size(mem_ctx, sizeof(*r.out.exist_flag)); + if (r.out.exist_flag == NULL) { + talloc_free(mem_ctx); + return False; + } + _dfs_GetManagerVersion(p, r.out.exist_flag); push = ndr_push_init_ctx(mem_ctx); @@ -231,6 +237,12 @@ static BOOL api_dfs_GetInfo(pipes_struct *p) return False; } + r.out.info = talloc_size(mem_ctx, sizeof(*r.out.info)); + if (r.out.info == NULL) { + talloc_free(mem_ctx); + return False; + } + r.out.result = _dfs_GetInfo(p, r.in.path, r.in.server, r.in.share, r.in.level, r.out.info); push = ndr_push_init_ctx(mem_ctx); -- cgit From 8c79b4cbc152dd4df11d3916739bc851b6db2e86 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 19 Sep 2006 22:22:57 +0000 Subject: r18690: Regenerate RPC files after pidl changes. (This used to be commit 87d34305374e867eeac9d75d5d690c6b15570e6e) --- source3/librpc/gen_ndr/srv_dfs.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/librpc/gen_ndr/srv_dfs.c') diff --git a/source3/librpc/gen_ndr/srv_dfs.c b/source3/librpc/gen_ndr/srv_dfs.c index bd4503248d..bb27ab021f 100644 --- a/source3/librpc/gen_ndr/srv_dfs.c +++ b/source3/librpc/gen_ndr/srv_dfs.c @@ -31,6 +31,7 @@ static BOOL api_dfs_GetManagerVersion(pipes_struct *p) return False; } + ZERO_STRUCT(r.out); r.out.exist_flag = talloc_size(mem_ctx, sizeof(*r.out.exist_flag)); if (r.out.exist_flag == NULL) { talloc_free(mem_ctx); @@ -237,6 +238,7 @@ static BOOL api_dfs_GetInfo(pipes_struct *p) return False; } + ZERO_STRUCT(r.out); r.out.info = talloc_size(mem_ctx, sizeof(*r.out.info)); if (r.out.info == NULL) { talloc_free(mem_ctx); @@ -293,6 +295,7 @@ static BOOL api_dfs_Enum(pipes_struct *p) return False; } + ZERO_STRUCT(r.out); r.out.info = r.in.info; r.out.total = r.in.total; r.out.result = _dfs_Enum(p, r.in.level, r.in.bufsize, r.in.info, r.in.unknown, r.in.total); @@ -1095,6 +1098,7 @@ static BOOL api_dfs_EnumEx(pipes_struct *p) return False; } + ZERO_STRUCT(r.out); r.out.info = r.in.info; r.out.total = r.in.total; r.out.result = _dfs_EnumEx(p, r.in.name, r.in.level, r.in.bufsize, r.in.info, r.in.total); -- cgit From e3068ef054b6c500e9d9be16ffebda5cb2402f3a Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 19 Sep 2006 22:39:15 +0000 Subject: r18692: Dump debug data when DEBUGLEVEL >= 10 (This used to be commit 503d1a27d5838718355fdd37968c3670f53b1cd7) --- source3/librpc/gen_ndr/srv_dfs.c | 138 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) (limited to 'source3/librpc/gen_ndr/srv_dfs.c') diff --git a/source3/librpc/gen_ndr/srv_dfs.c b/source3/librpc/gen_ndr/srv_dfs.c index bb27ab021f..a4da9fbe06 100644 --- a/source3/librpc/gen_ndr/srv_dfs.c +++ b/source3/librpc/gen_ndr/srv_dfs.c @@ -31,6 +31,9 @@ static BOOL api_dfs_GetManagerVersion(pipes_struct *p) return False; } + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(dfs_GetManagerVersion, &r); + ZERO_STRUCT(r.out); r.out.exist_flag = talloc_size(mem_ctx, sizeof(*r.out.exist_flag)); if (r.out.exist_flag == NULL) { @@ -40,6 +43,9 @@ static BOOL api_dfs_GetManagerVersion(pipes_struct *p) _dfs_GetManagerVersion(p, r.out.exist_flag); + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(dfs_GetManagerVersion, &r); + push = ndr_push_init_ctx(mem_ctx); if (push == NULL) { talloc_free(mem_ctx); @@ -88,8 +94,14 @@ static BOOL api_dfs_Add(pipes_struct *p) return False; } + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(dfs_Add, &r); + r.out.result = _dfs_Add(p, r.in.path, r.in.server, r.in.share, r.in.comment, r.in.flags); + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(dfs_Add, &r); + push = ndr_push_init_ctx(mem_ctx); if (push == NULL) { talloc_free(mem_ctx); @@ -138,8 +150,14 @@ static BOOL api_dfs_Remove(pipes_struct *p) return False; } + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(dfs_Remove, &r); + r.out.result = _dfs_Remove(p, r.in.path, r.in.server, r.in.share); + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(dfs_Remove, &r); + push = ndr_push_init_ctx(mem_ctx); if (push == NULL) { talloc_free(mem_ctx); @@ -188,8 +206,14 @@ static BOOL api_dfs_SetInfo(pipes_struct *p) return False; } + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(dfs_SetInfo, &r); + r.out.result = _dfs_SetInfo(p); + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(dfs_SetInfo, &r); + push = ndr_push_init_ctx(mem_ctx); if (push == NULL) { talloc_free(mem_ctx); @@ -238,6 +262,9 @@ static BOOL api_dfs_GetInfo(pipes_struct *p) return False; } + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(dfs_GetInfo, &r); + ZERO_STRUCT(r.out); r.out.info = talloc_size(mem_ctx, sizeof(*r.out.info)); if (r.out.info == NULL) { @@ -247,6 +274,9 @@ static BOOL api_dfs_GetInfo(pipes_struct *p) r.out.result = _dfs_GetInfo(p, r.in.path, r.in.server, r.in.share, r.in.level, r.out.info); + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(dfs_GetInfo, &r); + push = ndr_push_init_ctx(mem_ctx); if (push == NULL) { talloc_free(mem_ctx); @@ -295,11 +325,17 @@ static BOOL api_dfs_Enum(pipes_struct *p) return False; } + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(dfs_Enum, &r); + ZERO_STRUCT(r.out); r.out.info = r.in.info; r.out.total = r.in.total; r.out.result = _dfs_Enum(p, r.in.level, r.in.bufsize, r.in.info, r.in.unknown, r.in.total); + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(dfs_Enum, &r); + push = ndr_push_init_ctx(mem_ctx); if (push == NULL) { talloc_free(mem_ctx); @@ -348,8 +384,14 @@ static BOOL api_dfs_Rename(pipes_struct *p) return False; } + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(dfs_Rename, &r); + r.out.result = _dfs_Rename(p); + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(dfs_Rename, &r); + push = ndr_push_init_ctx(mem_ctx); if (push == NULL) { talloc_free(mem_ctx); @@ -398,8 +440,14 @@ static BOOL api_dfs_Move(pipes_struct *p) return False; } + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(dfs_Move, &r); + r.out.result = _dfs_Move(p); + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(dfs_Move, &r); + push = ndr_push_init_ctx(mem_ctx); if (push == NULL) { talloc_free(mem_ctx); @@ -448,8 +496,14 @@ static BOOL api_dfs_ManagerGetConfigInfo(pipes_struct *p) return False; } + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(dfs_ManagerGetConfigInfo, &r); + r.out.result = _dfs_ManagerGetConfigInfo(p); + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(dfs_ManagerGetConfigInfo, &r); + push = ndr_push_init_ctx(mem_ctx); if (push == NULL) { talloc_free(mem_ctx); @@ -498,8 +552,14 @@ static BOOL api_dfs_ManagerSendSiteInfo(pipes_struct *p) return False; } + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(dfs_ManagerSendSiteInfo, &r); + r.out.result = _dfs_ManagerSendSiteInfo(p); + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(dfs_ManagerSendSiteInfo, &r); + push = ndr_push_init_ctx(mem_ctx); if (push == NULL) { talloc_free(mem_ctx); @@ -548,8 +608,14 @@ static BOOL api_dfs_AddFtRoot(pipes_struct *p) return False; } + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(dfs_AddFtRoot, &r); + r.out.result = _dfs_AddFtRoot(p); + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(dfs_AddFtRoot, &r); + push = ndr_push_init_ctx(mem_ctx); if (push == NULL) { talloc_free(mem_ctx); @@ -598,8 +664,14 @@ static BOOL api_dfs_RemoveFtRoot(pipes_struct *p) return False; } + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(dfs_RemoveFtRoot, &r); + r.out.result = _dfs_RemoveFtRoot(p); + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(dfs_RemoveFtRoot, &r); + push = ndr_push_init_ctx(mem_ctx); if (push == NULL) { talloc_free(mem_ctx); @@ -648,8 +720,14 @@ static BOOL api_dfs_AddStdRoot(pipes_struct *p) return False; } + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(dfs_AddStdRoot, &r); + r.out.result = _dfs_AddStdRoot(p); + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(dfs_AddStdRoot, &r); + push = ndr_push_init_ctx(mem_ctx); if (push == NULL) { talloc_free(mem_ctx); @@ -698,8 +776,14 @@ static BOOL api_dfs_RemoveStdRoot(pipes_struct *p) return False; } + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(dfs_RemoveStdRoot, &r); + r.out.result = _dfs_RemoveStdRoot(p); + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(dfs_RemoveStdRoot, &r); + push = ndr_push_init_ctx(mem_ctx); if (push == NULL) { talloc_free(mem_ctx); @@ -748,8 +832,14 @@ static BOOL api_dfs_ManagerInitialize(pipes_struct *p) return False; } + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(dfs_ManagerInitialize, &r); + r.out.result = _dfs_ManagerInitialize(p); + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(dfs_ManagerInitialize, &r); + push = ndr_push_init_ctx(mem_ctx); if (push == NULL) { talloc_free(mem_ctx); @@ -798,8 +888,14 @@ static BOOL api_dfs_AddStdRootForced(pipes_struct *p) return False; } + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(dfs_AddStdRootForced, &r); + r.out.result = _dfs_AddStdRootForced(p); + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(dfs_AddStdRootForced, &r); + push = ndr_push_init_ctx(mem_ctx); if (push == NULL) { talloc_free(mem_ctx); @@ -848,8 +944,14 @@ static BOOL api_dfs_GetDcAddress(pipes_struct *p) return False; } + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(dfs_GetDcAddress, &r); + r.out.result = _dfs_GetDcAddress(p); + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(dfs_GetDcAddress, &r); + push = ndr_push_init_ctx(mem_ctx); if (push == NULL) { talloc_free(mem_ctx); @@ -898,8 +1000,14 @@ static BOOL api_dfs_SetDcAddress(pipes_struct *p) return False; } + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(dfs_SetDcAddress, &r); + r.out.result = _dfs_SetDcAddress(p); + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(dfs_SetDcAddress, &r); + push = ndr_push_init_ctx(mem_ctx); if (push == NULL) { talloc_free(mem_ctx); @@ -948,8 +1056,14 @@ static BOOL api_dfs_FlushFtTable(pipes_struct *p) return False; } + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(dfs_FlushFtTable, &r); + r.out.result = _dfs_FlushFtTable(p); + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(dfs_FlushFtTable, &r); + push = ndr_push_init_ctx(mem_ctx); if (push == NULL) { talloc_free(mem_ctx); @@ -998,8 +1112,14 @@ static BOOL api_dfs_Add2(pipes_struct *p) return False; } + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(dfs_Add2, &r); + r.out.result = _dfs_Add2(p); + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(dfs_Add2, &r); + push = ndr_push_init_ctx(mem_ctx); if (push == NULL) { talloc_free(mem_ctx); @@ -1048,8 +1168,14 @@ static BOOL api_dfs_Remove2(pipes_struct *p) return False; } + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(dfs_Remove2, &r); + r.out.result = _dfs_Remove2(p); + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(dfs_Remove2, &r); + push = ndr_push_init_ctx(mem_ctx); if (push == NULL) { talloc_free(mem_ctx); @@ -1098,11 +1224,17 @@ static BOOL api_dfs_EnumEx(pipes_struct *p) return False; } + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(dfs_EnumEx, &r); + ZERO_STRUCT(r.out); r.out.info = r.in.info; r.out.total = r.in.total; r.out.result = _dfs_EnumEx(p, r.in.name, r.in.level, r.in.bufsize, r.in.info, r.in.total); + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(dfs_EnumEx, &r); + push = ndr_push_init_ctx(mem_ctx); if (push == NULL) { talloc_free(mem_ctx); @@ -1151,8 +1283,14 @@ static BOOL api_dfs_SetInfo2(pipes_struct *p) return False; } + if (DEBUGLEVEL >= 10) + NDR_PRINT_IN_DEBUG(dfs_SetInfo2, &r); + r.out.result = _dfs_SetInfo2(p); + if (DEBUGLEVEL >= 10) + NDR_PRINT_OUT_DEBUG(dfs_SetInfo2, &r); + push = ndr_push_init_ctx(mem_ctx); if (push == NULL) { talloc_free(mem_ctx); -- cgit From 7cf3a10756a0b462d49235c91099312416319ae6 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 19 Sep 2006 22:47:30 +0000 Subject: r18695: Zero initialize ref ptrs as well. (This used to be commit 3295122173b0794880e68ea60f51d41b9b170ff4) --- source3/librpc/gen_ndr/srv_dfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/librpc/gen_ndr/srv_dfs.c') diff --git a/source3/librpc/gen_ndr/srv_dfs.c b/source3/librpc/gen_ndr/srv_dfs.c index a4da9fbe06..4c16201e9f 100644 --- a/source3/librpc/gen_ndr/srv_dfs.c +++ b/source3/librpc/gen_ndr/srv_dfs.c @@ -35,7 +35,7 @@ static BOOL api_dfs_GetManagerVersion(pipes_struct *p) NDR_PRINT_IN_DEBUG(dfs_GetManagerVersion, &r); ZERO_STRUCT(r.out); - r.out.exist_flag = talloc_size(mem_ctx, sizeof(*r.out.exist_flag)); + r.out.exist_flag = talloc_zero_size(mem_ctx, sizeof(*r.out.exist_flag)); if (r.out.exist_flag == NULL) { talloc_free(mem_ctx); return False; @@ -266,7 +266,7 @@ static BOOL api_dfs_GetInfo(pipes_struct *p) NDR_PRINT_IN_DEBUG(dfs_GetInfo, &r); ZERO_STRUCT(r.out); - r.out.info = talloc_size(mem_ctx, sizeof(*r.out.info)); + r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info)); if (r.out.info == NULL) { talloc_free(mem_ctx); return False; -- cgit From 6b0b563fa43ad4c7de3573dc7962a2698e140f72 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 10 Oct 2006 07:55:46 +0000 Subject: r19221: Monster-Checkin after "make idl" (This used to be commit 416466a16f58ac644baacaa2522c4e98176d0e70) --- source3/librpc/gen_ndr/srv_dfs.c | 276 ++++++++++++++++++++++++++++++++------- 1 file changed, 230 insertions(+), 46 deletions(-) (limited to 'source3/librpc/gen_ndr/srv_dfs.c') diff --git a/source3/librpc/gen_ndr/srv_dfs.c b/source3/librpc/gen_ndr/srv_dfs.c index 4c16201e9f..fe34b6e323 100644 --- a/source3/librpc/gen_ndr/srv_dfs.c +++ b/source3/librpc/gen_ndr/srv_dfs.c @@ -21,8 +21,10 @@ static BOOL api_dfs_GetManagerVersion(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_dfs_GetManagerVersion(pull, NDR_IN, &r); @@ -43,6 +45,12 @@ static BOOL api_dfs_GetManagerVersion(pipes_struct *p) _dfs_GetManagerVersion(p, r.out.exist_flag); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_GetManagerVersion, &r); @@ -59,7 +67,7 @@ static BOOL api_dfs_GetManagerVersion(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -84,8 +92,10 @@ static BOOL api_dfs_Add(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_dfs_Add(pull, NDR_IN, &r); @@ -99,6 +109,12 @@ static BOOL api_dfs_Add(pipes_struct *p) r.out.result = _dfs_Add(p, r.in.path, r.in.server, r.in.share, r.in.comment, r.in.flags); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_Add, &r); @@ -115,7 +131,7 @@ static BOOL api_dfs_Add(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -140,8 +156,10 @@ static BOOL api_dfs_Remove(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_dfs_Remove(pull, NDR_IN, &r); @@ -155,6 +173,12 @@ static BOOL api_dfs_Remove(pipes_struct *p) r.out.result = _dfs_Remove(p, r.in.path, r.in.server, r.in.share); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_Remove, &r); @@ -171,7 +195,7 @@ static BOOL api_dfs_Remove(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -196,8 +220,10 @@ static BOOL api_dfs_SetInfo(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_dfs_SetInfo(pull, NDR_IN, &r); @@ -211,6 +237,12 @@ static BOOL api_dfs_SetInfo(pipes_struct *p) r.out.result = _dfs_SetInfo(p); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_SetInfo, &r); @@ -227,7 +259,7 @@ static BOOL api_dfs_SetInfo(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -252,8 +284,10 @@ static BOOL api_dfs_GetInfo(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_dfs_GetInfo(pull, NDR_IN, &r); @@ -274,6 +308,12 @@ static BOOL api_dfs_GetInfo(pipes_struct *p) r.out.result = _dfs_GetInfo(p, r.in.path, r.in.server, r.in.share, r.in.level, r.out.info); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_GetInfo, &r); @@ -290,7 +330,7 @@ static BOOL api_dfs_GetInfo(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -315,8 +355,10 @@ static BOOL api_dfs_Enum(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_dfs_Enum(pull, NDR_IN, &r); @@ -333,6 +375,12 @@ static BOOL api_dfs_Enum(pipes_struct *p) r.out.total = r.in.total; r.out.result = _dfs_Enum(p, r.in.level, r.in.bufsize, r.in.info, r.in.unknown, r.in.total); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_Enum, &r); @@ -349,7 +397,7 @@ static BOOL api_dfs_Enum(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -374,8 +422,10 @@ static BOOL api_dfs_Rename(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_dfs_Rename(pull, NDR_IN, &r); @@ -389,6 +439,12 @@ static BOOL api_dfs_Rename(pipes_struct *p) r.out.result = _dfs_Rename(p); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_Rename, &r); @@ -405,7 +461,7 @@ static BOOL api_dfs_Rename(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -430,8 +486,10 @@ static BOOL api_dfs_Move(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_dfs_Move(pull, NDR_IN, &r); @@ -445,6 +503,12 @@ static BOOL api_dfs_Move(pipes_struct *p) r.out.result = _dfs_Move(p); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_Move, &r); @@ -461,7 +525,7 @@ static BOOL api_dfs_Move(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -486,8 +550,10 @@ static BOOL api_dfs_ManagerGetConfigInfo(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_dfs_ManagerGetConfigInfo(pull, NDR_IN, &r); @@ -501,6 +567,12 @@ static BOOL api_dfs_ManagerGetConfigInfo(pipes_struct *p) r.out.result = _dfs_ManagerGetConfigInfo(p); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_ManagerGetConfigInfo, &r); @@ -517,7 +589,7 @@ static BOOL api_dfs_ManagerGetConfigInfo(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -542,8 +614,10 @@ static BOOL api_dfs_ManagerSendSiteInfo(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_dfs_ManagerSendSiteInfo(pull, NDR_IN, &r); @@ -557,6 +631,12 @@ static BOOL api_dfs_ManagerSendSiteInfo(pipes_struct *p) r.out.result = _dfs_ManagerSendSiteInfo(p); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_ManagerSendSiteInfo, &r); @@ -573,7 +653,7 @@ static BOOL api_dfs_ManagerSendSiteInfo(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -598,8 +678,10 @@ static BOOL api_dfs_AddFtRoot(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_dfs_AddFtRoot(pull, NDR_IN, &r); @@ -613,6 +695,12 @@ static BOOL api_dfs_AddFtRoot(pipes_struct *p) r.out.result = _dfs_AddFtRoot(p); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_AddFtRoot, &r); @@ -629,7 +717,7 @@ static BOOL api_dfs_AddFtRoot(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -654,8 +742,10 @@ static BOOL api_dfs_RemoveFtRoot(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_dfs_RemoveFtRoot(pull, NDR_IN, &r); @@ -669,6 +759,12 @@ static BOOL api_dfs_RemoveFtRoot(pipes_struct *p) r.out.result = _dfs_RemoveFtRoot(p); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_RemoveFtRoot, &r); @@ -685,7 +781,7 @@ static BOOL api_dfs_RemoveFtRoot(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -710,8 +806,10 @@ static BOOL api_dfs_AddStdRoot(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_dfs_AddStdRoot(pull, NDR_IN, &r); @@ -725,6 +823,12 @@ static BOOL api_dfs_AddStdRoot(pipes_struct *p) r.out.result = _dfs_AddStdRoot(p); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_AddStdRoot, &r); @@ -741,7 +845,7 @@ static BOOL api_dfs_AddStdRoot(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -766,8 +870,10 @@ static BOOL api_dfs_RemoveStdRoot(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_dfs_RemoveStdRoot(pull, NDR_IN, &r); @@ -781,6 +887,12 @@ static BOOL api_dfs_RemoveStdRoot(pipes_struct *p) r.out.result = _dfs_RemoveStdRoot(p); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_RemoveStdRoot, &r); @@ -797,7 +909,7 @@ static BOOL api_dfs_RemoveStdRoot(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -822,8 +934,10 @@ static BOOL api_dfs_ManagerInitialize(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_dfs_ManagerInitialize(pull, NDR_IN, &r); @@ -837,6 +951,12 @@ static BOOL api_dfs_ManagerInitialize(pipes_struct *p) r.out.result = _dfs_ManagerInitialize(p); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_ManagerInitialize, &r); @@ -853,7 +973,7 @@ static BOOL api_dfs_ManagerInitialize(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -878,8 +998,10 @@ static BOOL api_dfs_AddStdRootForced(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_dfs_AddStdRootForced(pull, NDR_IN, &r); @@ -893,6 +1015,12 @@ static BOOL api_dfs_AddStdRootForced(pipes_struct *p) r.out.result = _dfs_AddStdRootForced(p); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_AddStdRootForced, &r); @@ -909,7 +1037,7 @@ static BOOL api_dfs_AddStdRootForced(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -934,8 +1062,10 @@ static BOOL api_dfs_GetDcAddress(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_dfs_GetDcAddress(pull, NDR_IN, &r); @@ -949,6 +1079,12 @@ static BOOL api_dfs_GetDcAddress(pipes_struct *p) r.out.result = _dfs_GetDcAddress(p); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_GetDcAddress, &r); @@ -965,7 +1101,7 @@ static BOOL api_dfs_GetDcAddress(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -990,8 +1126,10 @@ static BOOL api_dfs_SetDcAddress(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_dfs_SetDcAddress(pull, NDR_IN, &r); @@ -1005,6 +1143,12 @@ static BOOL api_dfs_SetDcAddress(pipes_struct *p) r.out.result = _dfs_SetDcAddress(p); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_SetDcAddress, &r); @@ -1021,7 +1165,7 @@ static BOOL api_dfs_SetDcAddress(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -1046,8 +1190,10 @@ static BOOL api_dfs_FlushFtTable(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_dfs_FlushFtTable(pull, NDR_IN, &r); @@ -1061,6 +1207,12 @@ static BOOL api_dfs_FlushFtTable(pipes_struct *p) r.out.result = _dfs_FlushFtTable(p); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_FlushFtTable, &r); @@ -1077,7 +1229,7 @@ static BOOL api_dfs_FlushFtTable(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -1102,8 +1254,10 @@ static BOOL api_dfs_Add2(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_dfs_Add2(pull, NDR_IN, &r); @@ -1117,6 +1271,12 @@ static BOOL api_dfs_Add2(pipes_struct *p) r.out.result = _dfs_Add2(p); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_Add2, &r); @@ -1133,7 +1293,7 @@ static BOOL api_dfs_Add2(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -1158,8 +1318,10 @@ static BOOL api_dfs_Remove2(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_dfs_Remove2(pull, NDR_IN, &r); @@ -1173,6 +1335,12 @@ static BOOL api_dfs_Remove2(pipes_struct *p) r.out.result = _dfs_Remove2(p); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_Remove2, &r); @@ -1189,7 +1357,7 @@ static BOOL api_dfs_Remove2(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -1214,8 +1382,10 @@ static BOOL api_dfs_EnumEx(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_dfs_EnumEx(pull, NDR_IN, &r); @@ -1232,6 +1402,12 @@ static BOOL api_dfs_EnumEx(pipes_struct *p) r.out.total = r.in.total; r.out.result = _dfs_EnumEx(p, r.in.name, r.in.level, r.in.bufsize, r.in.info, r.in.total); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_EnumEx, &r); @@ -1248,7 +1424,7 @@ static BOOL api_dfs_EnumEx(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -1273,8 +1449,10 @@ static BOOL api_dfs_SetInfo2(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_dfs_SetInfo2(pull, NDR_IN, &r); @@ -1288,6 +1466,12 @@ static BOOL api_dfs_SetInfo2(pipes_struct *p) r.out.result = _dfs_SetInfo2(p); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_SetInfo2, &r); @@ -1304,7 +1488,7 @@ static BOOL api_dfs_SetInfo2(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } -- cgit From e2e7ad91a9aa3b8a1270e1148550fee9e3fedc79 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 16 Jan 2007 17:48:59 +0000 Subject: r20837: Use real type name, to fix compilation with -WC++-compat (This used to be commit 840485686d2b3765bd01fbe442f712803d1f4c0f) --- source3/librpc/gen_ndr/srv_dfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/librpc/gen_ndr/srv_dfs.c') diff --git a/source3/librpc/gen_ndr/srv_dfs.c b/source3/librpc/gen_ndr/srv_dfs.c index fe34b6e323..c75c979093 100644 --- a/source3/librpc/gen_ndr/srv_dfs.c +++ b/source3/librpc/gen_ndr/srv_dfs.c @@ -37,7 +37,7 @@ static BOOL api_dfs_GetManagerVersion(pipes_struct *p) NDR_PRINT_IN_DEBUG(dfs_GetManagerVersion, &r); ZERO_STRUCT(r.out); - r.out.exist_flag = talloc_zero_size(mem_ctx, sizeof(*r.out.exist_flag)); + r.out.exist_flag = talloc_zero(mem_ctx, uint32_t); if (r.out.exist_flag == NULL) { talloc_free(mem_ctx); return False; @@ -300,7 +300,7 @@ static BOOL api_dfs_GetInfo(pipes_struct *p) NDR_PRINT_IN_DEBUG(dfs_GetInfo, &r); ZERO_STRUCT(r.out); - r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info)); + r.out.info = talloc_zero(mem_ctx, union dfs_Info); if (r.out.info == NULL) { talloc_free(mem_ctx); return False; -- cgit From d6b3fce078869de35334c0805ff141dc8bcf5f65 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 18 Jan 2007 10:18:59 +0000 Subject: r20875: Pass DCE/RPC server call arguments as a struct rather than as separate arguments. This makes it a bit more similar to the Samba4 code. (This used to be commit 0596badb410a58e7a715e2b17bc0bef0489a2448) --- source3/librpc/gen_ndr/srv_dfs.c | 46 ++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'source3/librpc/gen_ndr/srv_dfs.c') diff --git a/source3/librpc/gen_ndr/srv_dfs.c b/source3/librpc/gen_ndr/srv_dfs.c index c75c979093..8fb5810c9c 100644 --- a/source3/librpc/gen_ndr/srv_dfs.c +++ b/source3/librpc/gen_ndr/srv_dfs.c @@ -43,7 +43,7 @@ static BOOL api_dfs_GetManagerVersion(pipes_struct *p) return False; } - _dfs_GetManagerVersion(p, r.out.exist_flag); + _dfs_GetManagerVersion(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -107,7 +107,7 @@ static BOOL api_dfs_Add(pipes_struct *p) if (DEBUGLEVEL >= 10) NDR_PRINT_IN_DEBUG(dfs_Add, &r); - r.out.result = _dfs_Add(p, r.in.path, r.in.server, r.in.share, r.in.comment, r.in.flags); + r.out.result = _dfs_Add(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -171,7 +171,7 @@ static BOOL api_dfs_Remove(pipes_struct *p) if (DEBUGLEVEL >= 10) NDR_PRINT_IN_DEBUG(dfs_Remove, &r); - r.out.result = _dfs_Remove(p, r.in.path, r.in.server, r.in.share); + r.out.result = _dfs_Remove(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -235,7 +235,7 @@ static BOOL api_dfs_SetInfo(pipes_struct *p) if (DEBUGLEVEL >= 10) NDR_PRINT_IN_DEBUG(dfs_SetInfo, &r); - r.out.result = _dfs_SetInfo(p); + r.out.result = _dfs_SetInfo(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -306,7 +306,7 @@ static BOOL api_dfs_GetInfo(pipes_struct *p) return False; } - r.out.result = _dfs_GetInfo(p, r.in.path, r.in.server, r.in.share, r.in.level, r.out.info); + r.out.result = _dfs_GetInfo(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -373,7 +373,7 @@ static BOOL api_dfs_Enum(pipes_struct *p) ZERO_STRUCT(r.out); r.out.info = r.in.info; r.out.total = r.in.total; - r.out.result = _dfs_Enum(p, r.in.level, r.in.bufsize, r.in.info, r.in.unknown, r.in.total); + r.out.result = _dfs_Enum(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -437,7 +437,7 @@ static BOOL api_dfs_Rename(pipes_struct *p) if (DEBUGLEVEL >= 10) NDR_PRINT_IN_DEBUG(dfs_Rename, &r); - r.out.result = _dfs_Rename(p); + r.out.result = _dfs_Rename(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -501,7 +501,7 @@ static BOOL api_dfs_Move(pipes_struct *p) if (DEBUGLEVEL >= 10) NDR_PRINT_IN_DEBUG(dfs_Move, &r); - r.out.result = _dfs_Move(p); + r.out.result = _dfs_Move(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -565,7 +565,7 @@ static BOOL api_dfs_ManagerGetConfigInfo(pipes_struct *p) if (DEBUGLEVEL >= 10) NDR_PRINT_IN_DEBUG(dfs_ManagerGetConfigInfo, &r); - r.out.result = _dfs_ManagerGetConfigInfo(p); + r.out.result = _dfs_ManagerGetConfigInfo(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -629,7 +629,7 @@ static BOOL api_dfs_ManagerSendSiteInfo(pipes_struct *p) if (DEBUGLEVEL >= 10) NDR_PRINT_IN_DEBUG(dfs_ManagerSendSiteInfo, &r); - r.out.result = _dfs_ManagerSendSiteInfo(p); + r.out.result = _dfs_ManagerSendSiteInfo(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -693,7 +693,7 @@ static BOOL api_dfs_AddFtRoot(pipes_struct *p) if (DEBUGLEVEL >= 10) NDR_PRINT_IN_DEBUG(dfs_AddFtRoot, &r); - r.out.result = _dfs_AddFtRoot(p); + r.out.result = _dfs_AddFtRoot(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -757,7 +757,7 @@ static BOOL api_dfs_RemoveFtRoot(pipes_struct *p) if (DEBUGLEVEL >= 10) NDR_PRINT_IN_DEBUG(dfs_RemoveFtRoot, &r); - r.out.result = _dfs_RemoveFtRoot(p); + r.out.result = _dfs_RemoveFtRoot(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -821,7 +821,7 @@ static BOOL api_dfs_AddStdRoot(pipes_struct *p) if (DEBUGLEVEL >= 10) NDR_PRINT_IN_DEBUG(dfs_AddStdRoot, &r); - r.out.result = _dfs_AddStdRoot(p); + r.out.result = _dfs_AddStdRoot(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -885,7 +885,7 @@ static BOOL api_dfs_RemoveStdRoot(pipes_struct *p) if (DEBUGLEVEL >= 10) NDR_PRINT_IN_DEBUG(dfs_RemoveStdRoot, &r); - r.out.result = _dfs_RemoveStdRoot(p); + r.out.result = _dfs_RemoveStdRoot(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -949,7 +949,7 @@ static BOOL api_dfs_ManagerInitialize(pipes_struct *p) if (DEBUGLEVEL >= 10) NDR_PRINT_IN_DEBUG(dfs_ManagerInitialize, &r); - r.out.result = _dfs_ManagerInitialize(p); + r.out.result = _dfs_ManagerInitialize(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -1013,7 +1013,7 @@ static BOOL api_dfs_AddStdRootForced(pipes_struct *p) if (DEBUGLEVEL >= 10) NDR_PRINT_IN_DEBUG(dfs_AddStdRootForced, &r); - r.out.result = _dfs_AddStdRootForced(p); + r.out.result = _dfs_AddStdRootForced(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -1077,7 +1077,7 @@ static BOOL api_dfs_GetDcAddress(pipes_struct *p) if (DEBUGLEVEL >= 10) NDR_PRINT_IN_DEBUG(dfs_GetDcAddress, &r); - r.out.result = _dfs_GetDcAddress(p); + r.out.result = _dfs_GetDcAddress(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -1141,7 +1141,7 @@ static BOOL api_dfs_SetDcAddress(pipes_struct *p) if (DEBUGLEVEL >= 10) NDR_PRINT_IN_DEBUG(dfs_SetDcAddress, &r); - r.out.result = _dfs_SetDcAddress(p); + r.out.result = _dfs_SetDcAddress(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -1205,7 +1205,7 @@ static BOOL api_dfs_FlushFtTable(pipes_struct *p) if (DEBUGLEVEL >= 10) NDR_PRINT_IN_DEBUG(dfs_FlushFtTable, &r); - r.out.result = _dfs_FlushFtTable(p); + r.out.result = _dfs_FlushFtTable(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -1269,7 +1269,7 @@ static BOOL api_dfs_Add2(pipes_struct *p) if (DEBUGLEVEL >= 10) NDR_PRINT_IN_DEBUG(dfs_Add2, &r); - r.out.result = _dfs_Add2(p); + r.out.result = _dfs_Add2(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -1333,7 +1333,7 @@ static BOOL api_dfs_Remove2(pipes_struct *p) if (DEBUGLEVEL >= 10) NDR_PRINT_IN_DEBUG(dfs_Remove2, &r); - r.out.result = _dfs_Remove2(p); + r.out.result = _dfs_Remove2(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -1400,7 +1400,7 @@ static BOOL api_dfs_EnumEx(pipes_struct *p) ZERO_STRUCT(r.out); r.out.info = r.in.info; r.out.total = r.in.total; - r.out.result = _dfs_EnumEx(p, r.in.name, r.in.level, r.in.bufsize, r.in.info, r.in.total); + r.out.result = _dfs_EnumEx(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); @@ -1464,7 +1464,7 @@ static BOOL api_dfs_SetInfo2(pipes_struct *p) if (DEBUGLEVEL >= 10) NDR_PRINT_IN_DEBUG(dfs_SetInfo2, &r); - r.out.result = _dfs_SetInfo2(p); + r.out.result = _dfs_SetInfo2(p, &r); if (p->rng_fault_state) { talloc_free(mem_ctx); -- cgit From a458211702da5f573f09dde196ca302f2f7cb976 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 27 Jun 2007 09:17:52 +0000 Subject: r23622: regenerate dfs rpc gen_ndr. Guenther (This used to be commit 71b3259962004c278ca2e859d5460ad47c2468d6) --- source3/librpc/gen_ndr/srv_dfs.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source3/librpc/gen_ndr/srv_dfs.c') diff --git a/source3/librpc/gen_ndr/srv_dfs.c b/source3/librpc/gen_ndr/srv_dfs.c index 8fb5810c9c..6a2eb824b7 100644 --- a/source3/librpc/gen_ndr/srv_dfs.c +++ b/source3/librpc/gen_ndr/srv_dfs.c @@ -37,8 +37,8 @@ static BOOL api_dfs_GetManagerVersion(pipes_struct *p) NDR_PRINT_IN_DEBUG(dfs_GetManagerVersion, &r); ZERO_STRUCT(r.out); - r.out.exist_flag = talloc_zero(mem_ctx, uint32_t); - if (r.out.exist_flag == NULL) { + r.out.version = talloc_zero(mem_ctx, enum dfs_ManagerVersion); + if (r.out.version == NULL) { talloc_free(mem_ctx); return False; } @@ -693,6 +693,8 @@ static BOOL api_dfs_AddFtRoot(pipes_struct *p) if (DEBUGLEVEL >= 10) NDR_PRINT_IN_DEBUG(dfs_AddFtRoot, &r); + ZERO_STRUCT(r.out); + r.out.unknown2 = r.in.unknown2; r.out.result = _dfs_AddFtRoot(p, &r); if (p->rng_fault_state) { @@ -757,6 +759,8 @@ static BOOL api_dfs_RemoveFtRoot(pipes_struct *p) if (DEBUGLEVEL >= 10) NDR_PRINT_IN_DEBUG(dfs_RemoveFtRoot, &r); + ZERO_STRUCT(r.out); + r.out.unknown = r.in.unknown; r.out.result = _dfs_RemoveFtRoot(p, &r); if (p->rng_fault_state) { -- cgit From 8da26d3f96ac66e3f0be8aaec209867d3f285e49 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sun, 19 Aug 2007 22:10:11 +0000 Subject: r24561: merge from SAMBA_4_0: rename some DCERPC_ prefixes into NDR_ metze (This used to be commit 8f07b8ab658ae3d63487ca5fb20065318cdd9d0e) --- source3/librpc/gen_ndr/srv_dfs.c | 46 ++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'source3/librpc/gen_ndr/srv_dfs.c') diff --git a/source3/librpc/gen_ndr/srv_dfs.c b/source3/librpc/gen_ndr/srv_dfs.c index 6a2eb824b7..6250508ccd 100644 --- a/source3/librpc/gen_ndr/srv_dfs.c +++ b/source3/librpc/gen_ndr/srv_dfs.c @@ -1506,29 +1506,29 @@ static BOOL api_dfs_SetInfo2(pipes_struct *p) /* Tables */ static struct api_struct api_netdfs_cmds[] = { - {"DFS_GETMANAGERVERSION", DCERPC_DFS_GETMANAGERVERSION, api_dfs_GetManagerVersion}, - {"DFS_ADD", DCERPC_DFS_ADD, api_dfs_Add}, - {"DFS_REMOVE", DCERPC_DFS_REMOVE, api_dfs_Remove}, - {"DFS_SETINFO", DCERPC_DFS_SETINFO, api_dfs_SetInfo}, - {"DFS_GETINFO", DCERPC_DFS_GETINFO, api_dfs_GetInfo}, - {"DFS_ENUM", DCERPC_DFS_ENUM, api_dfs_Enum}, - {"DFS_RENAME", DCERPC_DFS_RENAME, api_dfs_Rename}, - {"DFS_MOVE", DCERPC_DFS_MOVE, api_dfs_Move}, - {"DFS_MANAGERGETCONFIGINFO", DCERPC_DFS_MANAGERGETCONFIGINFO, api_dfs_ManagerGetConfigInfo}, - {"DFS_MANAGERSENDSITEINFO", DCERPC_DFS_MANAGERSENDSITEINFO, api_dfs_ManagerSendSiteInfo}, - {"DFS_ADDFTROOT", DCERPC_DFS_ADDFTROOT, api_dfs_AddFtRoot}, - {"DFS_REMOVEFTROOT", DCERPC_DFS_REMOVEFTROOT, api_dfs_RemoveFtRoot}, - {"DFS_ADDSTDROOT", DCERPC_DFS_ADDSTDROOT, api_dfs_AddStdRoot}, - {"DFS_REMOVESTDROOT", DCERPC_DFS_REMOVESTDROOT, api_dfs_RemoveStdRoot}, - {"DFS_MANAGERINITIALIZE", DCERPC_DFS_MANAGERINITIALIZE, api_dfs_ManagerInitialize}, - {"DFS_ADDSTDROOTFORCED", DCERPC_DFS_ADDSTDROOTFORCED, api_dfs_AddStdRootForced}, - {"DFS_GETDCADDRESS", DCERPC_DFS_GETDCADDRESS, api_dfs_GetDcAddress}, - {"DFS_SETDCADDRESS", DCERPC_DFS_SETDCADDRESS, api_dfs_SetDcAddress}, - {"DFS_FLUSHFTTABLE", DCERPC_DFS_FLUSHFTTABLE, api_dfs_FlushFtTable}, - {"DFS_ADD2", DCERPC_DFS_ADD2, api_dfs_Add2}, - {"DFS_REMOVE2", DCERPC_DFS_REMOVE2, api_dfs_Remove2}, - {"DFS_ENUMEX", DCERPC_DFS_ENUMEX, api_dfs_EnumEx}, - {"DFS_SETINFO2", DCERPC_DFS_SETINFO2, api_dfs_SetInfo2}, + {"DFS_GETMANAGERVERSION", NDR_DFS_GETMANAGERVERSION, api_dfs_GetManagerVersion}, + {"DFS_ADD", NDR_DFS_ADD, api_dfs_Add}, + {"DFS_REMOVE", NDR_DFS_REMOVE, api_dfs_Remove}, + {"DFS_SETINFO", NDR_DFS_SETINFO, api_dfs_SetInfo}, + {"DFS_GETINFO", NDR_DFS_GETINFO, api_dfs_GetInfo}, + {"DFS_ENUM", NDR_DFS_ENUM, api_dfs_Enum}, + {"DFS_RENAME", NDR_DFS_RENAME, api_dfs_Rename}, + {"DFS_MOVE", NDR_DFS_MOVE, api_dfs_Move}, + {"DFS_MANAGERGETCONFIGINFO", NDR_DFS_MANAGERGETCONFIGINFO, api_dfs_ManagerGetConfigInfo}, + {"DFS_MANAGERSENDSITEINFO", NDR_DFS_MANAGERSENDSITEINFO, api_dfs_ManagerSendSiteInfo}, + {"DFS_ADDFTROOT", NDR_DFS_ADDFTROOT, api_dfs_AddFtRoot}, + {"DFS_REMOVEFTROOT", NDR_DFS_REMOVEFTROOT, api_dfs_RemoveFtRoot}, + {"DFS_ADDSTDROOT", NDR_DFS_ADDSTDROOT, api_dfs_AddStdRoot}, + {"DFS_REMOVESTDROOT", NDR_DFS_REMOVESTDROOT, api_dfs_RemoveStdRoot}, + {"DFS_MANAGERINITIALIZE", NDR_DFS_MANAGERINITIALIZE, api_dfs_ManagerInitialize}, + {"DFS_ADDSTDROOTFORCED", NDR_DFS_ADDSTDROOTFORCED, api_dfs_AddStdRootForced}, + {"DFS_GETDCADDRESS", NDR_DFS_GETDCADDRESS, api_dfs_GetDcAddress}, + {"DFS_SETDCADDRESS", NDR_DFS_SETDCADDRESS, api_dfs_SetDcAddress}, + {"DFS_FLUSHFTTABLE", NDR_DFS_FLUSHFTTABLE, api_dfs_FlushFtTable}, + {"DFS_ADD2", NDR_DFS_ADD2, api_dfs_Add2}, + {"DFS_REMOVE2", NDR_DFS_REMOVE2, api_dfs_Remove2}, + {"DFS_ENUMEX", NDR_DFS_ENUMEX, api_dfs_EnumEx}, + {"DFS_SETINFO2", NDR_DFS_SETINFO2, api_dfs_SetInfo2}, }; void netdfs_get_pipe_fns(struct api_struct **fns, int *n_fns) -- cgit From 96567fa3ea92e5447b66a23514df392f1f7d353c Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 21 Aug 2007 14:06:46 +0000 Subject: r24597: - talloc request structure for the samba3 server bindings and make that the primary context for the request which the implementations can also use. - go via functions pointers in the ndr_interface_table instead of calling functions directly. metze (This used to be commit 5c4d998300d0c9836eb3cc6c3cd8ee4f262396b8) --- source3/librpc/gen_ndr/srv_dfs.c | 1025 ++++++++++++++++++++++---------------- 1 file changed, 593 insertions(+), 432 deletions(-) (limited to 'source3/librpc/gen_ndr/srv_dfs.c') diff --git a/source3/librpc/gen_ndr/srv_dfs.c b/source3/librpc/gen_ndr/srv_dfs.c index 6250508ccd..82cb5c8d9a 100644 --- a/source3/librpc/gen_ndr/srv_dfs.c +++ b/source3/librpc/gen_ndr/srv_dfs.c @@ -8,1496 +8,1657 @@ static BOOL api_dfs_GetManagerVersion(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct dfs_GetManagerVersion r; - TALLOC_CTX *mem_ctx = talloc_init("api_dfs_GetManagerVersion"); + struct dfs_GetManagerVersion *r; - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + call = &ndr_table_netdfs.calls[NDR_DFS_GETMANAGERVERSION]; + + r = talloc(NULL, struct dfs_GetManagerVersion); + if (r == NULL) { + return False; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_dfs_GetManagerVersion(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(dfs_GetManagerVersion, &r); + NDR_PRINT_IN_DEBUG(dfs_GetManagerVersion, r); - ZERO_STRUCT(r.out); - r.out.version = talloc_zero(mem_ctx, enum dfs_ManagerVersion); - if (r.out.version == NULL) { - talloc_free(mem_ctx); + ZERO_STRUCT(r->out); + r->out.version = talloc_zero(r, enum dfs_ManagerVersion); + if (r->out.version == NULL) { + talloc_free(r); return False; } - _dfs_GetManagerVersion(p, &r); + _dfs_GetManagerVersion(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(dfs_GetManagerVersion, &r); + NDR_PRINT_OUT_DEBUG(dfs_GetManagerVersion, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_dfs_GetManagerVersion(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_dfs_Add(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct dfs_Add r; - TALLOC_CTX *mem_ctx = talloc_init("api_dfs_Add"); + struct dfs_Add *r; + + call = &ndr_table_netdfs.calls[NDR_DFS_ADD]; + + r = talloc(NULL, struct dfs_Add); + if (r == NULL) { + return False; + } - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_dfs_Add(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(dfs_Add, &r); + NDR_PRINT_IN_DEBUG(dfs_Add, r); - r.out.result = _dfs_Add(p, &r); + r->out.result = _dfs_Add(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(dfs_Add, &r); + NDR_PRINT_OUT_DEBUG(dfs_Add, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_dfs_Add(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_dfs_Remove(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct dfs_Remove r; - TALLOC_CTX *mem_ctx = talloc_init("api_dfs_Remove"); + struct dfs_Remove *r; + + call = &ndr_table_netdfs.calls[NDR_DFS_REMOVE]; + + r = talloc(NULL, struct dfs_Remove); + if (r == NULL) { + return False; + } - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_dfs_Remove(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(dfs_Remove, &r); + NDR_PRINT_IN_DEBUG(dfs_Remove, r); - r.out.result = _dfs_Remove(p, &r); + r->out.result = _dfs_Remove(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(dfs_Remove, &r); + NDR_PRINT_OUT_DEBUG(dfs_Remove, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_dfs_Remove(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_dfs_SetInfo(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct dfs_SetInfo r; - TALLOC_CTX *mem_ctx = talloc_init("api_dfs_SetInfo"); + struct dfs_SetInfo *r; - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + call = &ndr_table_netdfs.calls[NDR_DFS_SETINFO]; + + r = talloc(NULL, struct dfs_SetInfo); + if (r == NULL) { + return False; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_dfs_SetInfo(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(dfs_SetInfo, &r); + NDR_PRINT_IN_DEBUG(dfs_SetInfo, r); - r.out.result = _dfs_SetInfo(p, &r); + r->out.result = _dfs_SetInfo(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(dfs_SetInfo, &r); + NDR_PRINT_OUT_DEBUG(dfs_SetInfo, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_dfs_SetInfo(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_dfs_GetInfo(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct dfs_GetInfo r; - TALLOC_CTX *mem_ctx = talloc_init("api_dfs_GetInfo"); + struct dfs_GetInfo *r; + + call = &ndr_table_netdfs.calls[NDR_DFS_GETINFO]; - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + r = talloc(NULL, struct dfs_GetInfo); + if (r == NULL) { return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return False; + } + + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_dfs_GetInfo(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(dfs_GetInfo, &r); + NDR_PRINT_IN_DEBUG(dfs_GetInfo, r); - ZERO_STRUCT(r.out); - r.out.info = talloc_zero(mem_ctx, union dfs_Info); - if (r.out.info == NULL) { - talloc_free(mem_ctx); + ZERO_STRUCT(r->out); + r->out.info = talloc_zero(r, union dfs_Info); + if (r->out.info == NULL) { + talloc_free(r); return False; } - r.out.result = _dfs_GetInfo(p, &r); + r->out.result = _dfs_GetInfo(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(dfs_GetInfo, &r); + NDR_PRINT_OUT_DEBUG(dfs_GetInfo, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_dfs_GetInfo(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_dfs_Enum(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct dfs_Enum r; - TALLOC_CTX *mem_ctx = talloc_init("api_dfs_Enum"); + struct dfs_Enum *r; + + call = &ndr_table_netdfs.calls[NDR_DFS_ENUM]; + + r = talloc(NULL, struct dfs_Enum); + if (r == NULL) { + return False; + } - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_dfs_Enum(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(dfs_Enum, &r); + NDR_PRINT_IN_DEBUG(dfs_Enum, r); - ZERO_STRUCT(r.out); - r.out.info = r.in.info; - r.out.total = r.in.total; - r.out.result = _dfs_Enum(p, &r); + ZERO_STRUCT(r->out); + r->out.info = r->in.info; + r->out.total = r->in.total; + r->out.result = _dfs_Enum(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(dfs_Enum, &r); + NDR_PRINT_OUT_DEBUG(dfs_Enum, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_dfs_Enum(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_dfs_Rename(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct dfs_Rename r; - TALLOC_CTX *mem_ctx = talloc_init("api_dfs_Rename"); + struct dfs_Rename *r; + + call = &ndr_table_netdfs.calls[NDR_DFS_RENAME]; + + r = talloc(NULL, struct dfs_Rename); + if (r == NULL) { + return False; + } - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_dfs_Rename(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(dfs_Rename, &r); + NDR_PRINT_IN_DEBUG(dfs_Rename, r); - r.out.result = _dfs_Rename(p, &r); + r->out.result = _dfs_Rename(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(dfs_Rename, &r); + NDR_PRINT_OUT_DEBUG(dfs_Rename, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_dfs_Rename(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_dfs_Move(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct dfs_Move r; - TALLOC_CTX *mem_ctx = talloc_init("api_dfs_Move"); + struct dfs_Move *r; + + call = &ndr_table_netdfs.calls[NDR_DFS_MOVE]; - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + r = talloc(NULL, struct dfs_Move); + if (r == NULL) { return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return False; + } + + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_dfs_Move(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(dfs_Move, &r); + NDR_PRINT_IN_DEBUG(dfs_Move, r); - r.out.result = _dfs_Move(p, &r); + r->out.result = _dfs_Move(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(dfs_Move, &r); + NDR_PRINT_OUT_DEBUG(dfs_Move, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_dfs_Move(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_dfs_ManagerGetConfigInfo(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct dfs_ManagerGetConfigInfo r; - TALLOC_CTX *mem_ctx = talloc_init("api_dfs_ManagerGetConfigInfo"); + struct dfs_ManagerGetConfigInfo *r; - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + call = &ndr_table_netdfs.calls[NDR_DFS_MANAGERGETCONFIGINFO]; + + r = talloc(NULL, struct dfs_ManagerGetConfigInfo); + if (r == NULL) { return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return False; + } + + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_dfs_ManagerGetConfigInfo(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(dfs_ManagerGetConfigInfo, &r); + NDR_PRINT_IN_DEBUG(dfs_ManagerGetConfigInfo, r); - r.out.result = _dfs_ManagerGetConfigInfo(p, &r); + r->out.result = _dfs_ManagerGetConfigInfo(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(dfs_ManagerGetConfigInfo, &r); + NDR_PRINT_OUT_DEBUG(dfs_ManagerGetConfigInfo, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_dfs_ManagerGetConfigInfo(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_dfs_ManagerSendSiteInfo(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct dfs_ManagerSendSiteInfo r; - TALLOC_CTX *mem_ctx = talloc_init("api_dfs_ManagerSendSiteInfo"); + struct dfs_ManagerSendSiteInfo *r; + + call = &ndr_table_netdfs.calls[NDR_DFS_MANAGERSENDSITEINFO]; + + r = talloc(NULL, struct dfs_ManagerSendSiteInfo); + if (r == NULL) { + return False; + } - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_dfs_ManagerSendSiteInfo(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(dfs_ManagerSendSiteInfo, &r); + NDR_PRINT_IN_DEBUG(dfs_ManagerSendSiteInfo, r); - r.out.result = _dfs_ManagerSendSiteInfo(p, &r); + r->out.result = _dfs_ManagerSendSiteInfo(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(dfs_ManagerSendSiteInfo, &r); + NDR_PRINT_OUT_DEBUG(dfs_ManagerSendSiteInfo, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_dfs_ManagerSendSiteInfo(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_dfs_AddFtRoot(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct dfs_AddFtRoot r; - TALLOC_CTX *mem_ctx = talloc_init("api_dfs_AddFtRoot"); + struct dfs_AddFtRoot *r; + + call = &ndr_table_netdfs.calls[NDR_DFS_ADDFTROOT]; - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + r = talloc(NULL, struct dfs_AddFtRoot); + if (r == NULL) { return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return False; + } + + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_dfs_AddFtRoot(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(dfs_AddFtRoot, &r); + NDR_PRINT_IN_DEBUG(dfs_AddFtRoot, r); - ZERO_STRUCT(r.out); - r.out.unknown2 = r.in.unknown2; - r.out.result = _dfs_AddFtRoot(p, &r); + ZERO_STRUCT(r->out); + r->out.unknown2 = r->in.unknown2; + r->out.result = _dfs_AddFtRoot(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(dfs_AddFtRoot, &r); + NDR_PRINT_OUT_DEBUG(dfs_AddFtRoot, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_dfs_AddFtRoot(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_dfs_RemoveFtRoot(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct dfs_RemoveFtRoot r; - TALLOC_CTX *mem_ctx = talloc_init("api_dfs_RemoveFtRoot"); + struct dfs_RemoveFtRoot *r; + + call = &ndr_table_netdfs.calls[NDR_DFS_REMOVEFTROOT]; + + r = talloc(NULL, struct dfs_RemoveFtRoot); + if (r == NULL) { + return False; + } - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_dfs_RemoveFtRoot(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(dfs_RemoveFtRoot, &r); + NDR_PRINT_IN_DEBUG(dfs_RemoveFtRoot, r); - ZERO_STRUCT(r.out); - r.out.unknown = r.in.unknown; - r.out.result = _dfs_RemoveFtRoot(p, &r); + ZERO_STRUCT(r->out); + r->out.unknown = r->in.unknown; + r->out.result = _dfs_RemoveFtRoot(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(dfs_RemoveFtRoot, &r); + NDR_PRINT_OUT_DEBUG(dfs_RemoveFtRoot, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_dfs_RemoveFtRoot(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_dfs_AddStdRoot(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct dfs_AddStdRoot r; - TALLOC_CTX *mem_ctx = talloc_init("api_dfs_AddStdRoot"); + struct dfs_AddStdRoot *r; + + call = &ndr_table_netdfs.calls[NDR_DFS_ADDSTDROOT]; + + r = talloc(NULL, struct dfs_AddStdRoot); + if (r == NULL) { + return False; + } - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_dfs_AddStdRoot(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(dfs_AddStdRoot, &r); + NDR_PRINT_IN_DEBUG(dfs_AddStdRoot, r); - r.out.result = _dfs_AddStdRoot(p, &r); + r->out.result = _dfs_AddStdRoot(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(dfs_AddStdRoot, &r); + NDR_PRINT_OUT_DEBUG(dfs_AddStdRoot, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_dfs_AddStdRoot(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_dfs_RemoveStdRoot(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct dfs_RemoveStdRoot r; - TALLOC_CTX *mem_ctx = talloc_init("api_dfs_RemoveStdRoot"); + struct dfs_RemoveStdRoot *r; - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + call = &ndr_table_netdfs.calls[NDR_DFS_REMOVESTDROOT]; + + r = talloc(NULL, struct dfs_RemoveStdRoot); + if (r == NULL) { + return False; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_dfs_RemoveStdRoot(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(dfs_RemoveStdRoot, &r); + NDR_PRINT_IN_DEBUG(dfs_RemoveStdRoot, r); - r.out.result = _dfs_RemoveStdRoot(p, &r); + r->out.result = _dfs_RemoveStdRoot(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(dfs_RemoveStdRoot, &r); + NDR_PRINT_OUT_DEBUG(dfs_RemoveStdRoot, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_dfs_RemoveStdRoot(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_dfs_ManagerInitialize(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct dfs_ManagerInitialize r; - TALLOC_CTX *mem_ctx = talloc_init("api_dfs_ManagerInitialize"); + struct dfs_ManagerInitialize *r; + + call = &ndr_table_netdfs.calls[NDR_DFS_MANAGERINITIALIZE]; - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + r = talloc(NULL, struct dfs_ManagerInitialize); + if (r == NULL) { return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return False; + } + + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_dfs_ManagerInitialize(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(dfs_ManagerInitialize, &r); + NDR_PRINT_IN_DEBUG(dfs_ManagerInitialize, r); - r.out.result = _dfs_ManagerInitialize(p, &r); + r->out.result = _dfs_ManagerInitialize(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(dfs_ManagerInitialize, &r); + NDR_PRINT_OUT_DEBUG(dfs_ManagerInitialize, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_dfs_ManagerInitialize(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_dfs_AddStdRootForced(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct dfs_AddStdRootForced r; - TALLOC_CTX *mem_ctx = talloc_init("api_dfs_AddStdRootForced"); + struct dfs_AddStdRootForced *r; + + call = &ndr_table_netdfs.calls[NDR_DFS_ADDSTDROOTFORCED]; + + r = talloc(NULL, struct dfs_AddStdRootForced); + if (r == NULL) { + return False; + } - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_dfs_AddStdRootForced(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(dfs_AddStdRootForced, &r); + NDR_PRINT_IN_DEBUG(dfs_AddStdRootForced, r); - r.out.result = _dfs_AddStdRootForced(p, &r); + r->out.result = _dfs_AddStdRootForced(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(dfs_AddStdRootForced, &r); + NDR_PRINT_OUT_DEBUG(dfs_AddStdRootForced, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_dfs_AddStdRootForced(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_dfs_GetDcAddress(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct dfs_GetDcAddress r; - TALLOC_CTX *mem_ctx = talloc_init("api_dfs_GetDcAddress"); + struct dfs_GetDcAddress *r; - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + call = &ndr_table_netdfs.calls[NDR_DFS_GETDCADDRESS]; + + r = talloc(NULL, struct dfs_GetDcAddress); + if (r == NULL) { return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return False; + } + + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_dfs_GetDcAddress(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(dfs_GetDcAddress, &r); + NDR_PRINT_IN_DEBUG(dfs_GetDcAddress, r); - r.out.result = _dfs_GetDcAddress(p, &r); + r->out.result = _dfs_GetDcAddress(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(dfs_GetDcAddress, &r); + NDR_PRINT_OUT_DEBUG(dfs_GetDcAddress, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_dfs_GetDcAddress(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_dfs_SetDcAddress(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct dfs_SetDcAddress r; - TALLOC_CTX *mem_ctx = talloc_init("api_dfs_SetDcAddress"); + struct dfs_SetDcAddress *r; + + call = &ndr_table_netdfs.calls[NDR_DFS_SETDCADDRESS]; - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + r = talloc(NULL, struct dfs_SetDcAddress); + if (r == NULL) { return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return False; + } + + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_dfs_SetDcAddress(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(dfs_SetDcAddress, &r); + NDR_PRINT_IN_DEBUG(dfs_SetDcAddress, r); - r.out.result = _dfs_SetDcAddress(p, &r); + r->out.result = _dfs_SetDcAddress(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(dfs_SetDcAddress, &r); + NDR_PRINT_OUT_DEBUG(dfs_SetDcAddress, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_dfs_SetDcAddress(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_dfs_FlushFtTable(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct dfs_FlushFtTable r; - TALLOC_CTX *mem_ctx = talloc_init("api_dfs_FlushFtTable"); + struct dfs_FlushFtTable *r; + + call = &ndr_table_netdfs.calls[NDR_DFS_FLUSHFTTABLE]; + + r = talloc(NULL, struct dfs_FlushFtTable); + if (r == NULL) { + return False; + } - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_dfs_FlushFtTable(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(dfs_FlushFtTable, &r); + NDR_PRINT_IN_DEBUG(dfs_FlushFtTable, r); - r.out.result = _dfs_FlushFtTable(p, &r); + r->out.result = _dfs_FlushFtTable(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(dfs_FlushFtTable, &r); + NDR_PRINT_OUT_DEBUG(dfs_FlushFtTable, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_dfs_FlushFtTable(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_dfs_Add2(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct dfs_Add2 r; - TALLOC_CTX *mem_ctx = talloc_init("api_dfs_Add2"); + struct dfs_Add2 *r; + + call = &ndr_table_netdfs.calls[NDR_DFS_ADD2]; + + r = talloc(NULL, struct dfs_Add2); + if (r == NULL) { + return False; + } - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_dfs_Add2(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(dfs_Add2, &r); + NDR_PRINT_IN_DEBUG(dfs_Add2, r); - r.out.result = _dfs_Add2(p, &r); + r->out.result = _dfs_Add2(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(dfs_Add2, &r); + NDR_PRINT_OUT_DEBUG(dfs_Add2, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_dfs_Add2(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_dfs_Remove2(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct dfs_Remove2 r; - TALLOC_CTX *mem_ctx = talloc_init("api_dfs_Remove2"); + struct dfs_Remove2 *r; + + call = &ndr_table_netdfs.calls[NDR_DFS_REMOVE2]; - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + r = talloc(NULL, struct dfs_Remove2); + if (r == NULL) { return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return False; + } + + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_dfs_Remove2(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(dfs_Remove2, &r); + NDR_PRINT_IN_DEBUG(dfs_Remove2, r); - r.out.result = _dfs_Remove2(p, &r); + r->out.result = _dfs_Remove2(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(dfs_Remove2, &r); + NDR_PRINT_OUT_DEBUG(dfs_Remove2, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_dfs_Remove2(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_dfs_EnumEx(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct dfs_EnumEx r; - TALLOC_CTX *mem_ctx = talloc_init("api_dfs_EnumEx"); + struct dfs_EnumEx *r; - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + call = &ndr_table_netdfs.calls[NDR_DFS_ENUMEX]; + + r = talloc(NULL, struct dfs_EnumEx); + if (r == NULL) { return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return False; + } + + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_dfs_EnumEx(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(dfs_EnumEx, &r); + NDR_PRINT_IN_DEBUG(dfs_EnumEx, r); - ZERO_STRUCT(r.out); - r.out.info = r.in.info; - r.out.total = r.in.total; - r.out.result = _dfs_EnumEx(p, &r); + ZERO_STRUCT(r->out); + r->out.info = r->in.info; + r->out.total = r->in.total; + r->out.result = _dfs_EnumEx(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(dfs_EnumEx, &r); + NDR_PRINT_OUT_DEBUG(dfs_EnumEx, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_dfs_EnumEx(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } static BOOL api_dfs_SetInfo2(pipes_struct *p) { + const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; NTSTATUS status; DATA_BLOB blob; - struct dfs_SetInfo2 r; - TALLOC_CTX *mem_ctx = talloc_init("api_dfs_SetInfo2"); + struct dfs_SetInfo2 *r; + + call = &ndr_table_netdfs.calls[NDR_DFS_SETINFO2]; + + r = talloc(NULL, struct dfs_SetInfo2); + if (r == NULL) { + return False; + } - if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) { - talloc_free(mem_ctx); + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); return False; } - pull = ndr_pull_init_blob(&blob, mem_ctx); + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = ndr_pull_dfs_SetInfo2(pull, NDR_IN, &r); + status = call->ndr_pull(pull, NDR_IN, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } if (DEBUGLEVEL >= 10) - NDR_PRINT_IN_DEBUG(dfs_SetInfo2, &r); + NDR_PRINT_IN_DEBUG(dfs_SetInfo2, r); - r.out.result = _dfs_SetInfo2(p, &r); + r->out.result = _dfs_SetInfo2(p, r); if (p->rng_fault_state) { - talloc_free(mem_ctx); + talloc_free(r); /* Return True here, srv_pipe_hnd.c will take care */ return True; } if (DEBUGLEVEL >= 10) - NDR_PRINT_OUT_DEBUG(dfs_SetInfo2, &r); + NDR_PRINT_OUT_DEBUG(dfs_SetInfo2, r); - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(r); if (push == NULL) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - status = ndr_push_dfs_SetInfo2(push, NDR_OUT, &r); + status = call->ndr_push(push, NDR_OUT, r); if (NT_STATUS_IS_ERR(status)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } blob = ndr_push_blob(push); if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { - talloc_free(mem_ctx); + talloc_free(r); return False; } - talloc_free(mem_ctx); + talloc_free(r); return True; } -- cgit From 30191d1a5704ad2b158386b511558972d539ce47 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 18 Oct 2007 17:40:25 -0700 Subject: RIP BOOL. Convert BOOL -> bool. I found a few interesting bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy. (This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f) --- source3/librpc/gen_ndr/srv_dfs.c | 46 ++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'source3/librpc/gen_ndr/srv_dfs.c') diff --git a/source3/librpc/gen_ndr/srv_dfs.c b/source3/librpc/gen_ndr/srv_dfs.c index 82cb5c8d9a..596449badc 100644 --- a/source3/librpc/gen_ndr/srv_dfs.c +++ b/source3/librpc/gen_ndr/srv_dfs.c @@ -6,7 +6,7 @@ #include "includes.h" #include "librpc/gen_ndr/srv_dfs.h" -static BOOL api_dfs_GetManagerVersion(pipes_struct *p) +static bool api_dfs_GetManagerVersion(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -84,7 +84,7 @@ static BOOL api_dfs_GetManagerVersion(pipes_struct *p) return True; } -static BOOL api_dfs_Add(pipes_struct *p) +static bool api_dfs_Add(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -155,7 +155,7 @@ static BOOL api_dfs_Add(pipes_struct *p) return True; } -static BOOL api_dfs_Remove(pipes_struct *p) +static bool api_dfs_Remove(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -226,7 +226,7 @@ static BOOL api_dfs_Remove(pipes_struct *p) return True; } -static BOOL api_dfs_SetInfo(pipes_struct *p) +static bool api_dfs_SetInfo(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -297,7 +297,7 @@ static BOOL api_dfs_SetInfo(pipes_struct *p) return True; } -static BOOL api_dfs_GetInfo(pipes_struct *p) +static bool api_dfs_GetInfo(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -375,7 +375,7 @@ static BOOL api_dfs_GetInfo(pipes_struct *p) return True; } -static BOOL api_dfs_Enum(pipes_struct *p) +static bool api_dfs_Enum(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -449,7 +449,7 @@ static BOOL api_dfs_Enum(pipes_struct *p) return True; } -static BOOL api_dfs_Rename(pipes_struct *p) +static bool api_dfs_Rename(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -520,7 +520,7 @@ static BOOL api_dfs_Rename(pipes_struct *p) return True; } -static BOOL api_dfs_Move(pipes_struct *p) +static bool api_dfs_Move(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -591,7 +591,7 @@ static BOOL api_dfs_Move(pipes_struct *p) return True; } -static BOOL api_dfs_ManagerGetConfigInfo(pipes_struct *p) +static bool api_dfs_ManagerGetConfigInfo(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -662,7 +662,7 @@ static BOOL api_dfs_ManagerGetConfigInfo(pipes_struct *p) return True; } -static BOOL api_dfs_ManagerSendSiteInfo(pipes_struct *p) +static bool api_dfs_ManagerSendSiteInfo(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -733,7 +733,7 @@ static BOOL api_dfs_ManagerSendSiteInfo(pipes_struct *p) return True; } -static BOOL api_dfs_AddFtRoot(pipes_struct *p) +static bool api_dfs_AddFtRoot(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -806,7 +806,7 @@ static BOOL api_dfs_AddFtRoot(pipes_struct *p) return True; } -static BOOL api_dfs_RemoveFtRoot(pipes_struct *p) +static bool api_dfs_RemoveFtRoot(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -879,7 +879,7 @@ static BOOL api_dfs_RemoveFtRoot(pipes_struct *p) return True; } -static BOOL api_dfs_AddStdRoot(pipes_struct *p) +static bool api_dfs_AddStdRoot(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -950,7 +950,7 @@ static BOOL api_dfs_AddStdRoot(pipes_struct *p) return True; } -static BOOL api_dfs_RemoveStdRoot(pipes_struct *p) +static bool api_dfs_RemoveStdRoot(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -1021,7 +1021,7 @@ static BOOL api_dfs_RemoveStdRoot(pipes_struct *p) return True; } -static BOOL api_dfs_ManagerInitialize(pipes_struct *p) +static bool api_dfs_ManagerInitialize(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -1092,7 +1092,7 @@ static BOOL api_dfs_ManagerInitialize(pipes_struct *p) return True; } -static BOOL api_dfs_AddStdRootForced(pipes_struct *p) +static bool api_dfs_AddStdRootForced(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -1163,7 +1163,7 @@ static BOOL api_dfs_AddStdRootForced(pipes_struct *p) return True; } -static BOOL api_dfs_GetDcAddress(pipes_struct *p) +static bool api_dfs_GetDcAddress(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -1234,7 +1234,7 @@ static BOOL api_dfs_GetDcAddress(pipes_struct *p) return True; } -static BOOL api_dfs_SetDcAddress(pipes_struct *p) +static bool api_dfs_SetDcAddress(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -1305,7 +1305,7 @@ static BOOL api_dfs_SetDcAddress(pipes_struct *p) return True; } -static BOOL api_dfs_FlushFtTable(pipes_struct *p) +static bool api_dfs_FlushFtTable(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -1376,7 +1376,7 @@ static BOOL api_dfs_FlushFtTable(pipes_struct *p) return True; } -static BOOL api_dfs_Add2(pipes_struct *p) +static bool api_dfs_Add2(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -1447,7 +1447,7 @@ static BOOL api_dfs_Add2(pipes_struct *p) return True; } -static BOOL api_dfs_Remove2(pipes_struct *p) +static bool api_dfs_Remove2(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -1518,7 +1518,7 @@ static BOOL api_dfs_Remove2(pipes_struct *p) return True; } -static BOOL api_dfs_EnumEx(pipes_struct *p) +static bool api_dfs_EnumEx(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; @@ -1592,7 +1592,7 @@ static BOOL api_dfs_EnumEx(pipes_struct *p) return True; } -static BOOL api_dfs_SetInfo2(pipes_struct *p) +static bool api_dfs_SetInfo2(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; -- cgit From 08ace73dbbcef5543bbaee9ba7ee16a0bd42a395 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 9 Nov 2007 14:38:47 +0100 Subject: rerun make idl metze (This used to be commit 53a636828d2ba01603401086f4a5f72f9b5ea214) --- source3/librpc/gen_ndr/srv_dfs.c | 230 +++++++++++++++++++-------------------- 1 file changed, 115 insertions(+), 115 deletions(-) (limited to 'source3/librpc/gen_ndr/srv_dfs.c') diff --git a/source3/librpc/gen_ndr/srv_dfs.c b/source3/librpc/gen_ndr/srv_dfs.c index 596449badc..4c92c438f0 100644 --- a/source3/librpc/gen_ndr/srv_dfs.c +++ b/source3/librpc/gen_ndr/srv_dfs.c @@ -11,7 +11,7 @@ static bool api_dfs_GetManagerVersion(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_GetManagerVersion *r; @@ -34,8 +34,8 @@ static bool api_dfs_GetManagerVersion(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -67,8 +67,8 @@ static bool api_dfs_GetManagerVersion(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -89,7 +89,7 @@ static bool api_dfs_Add(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_Add *r; @@ -112,8 +112,8 @@ static bool api_dfs_Add(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -138,8 +138,8 @@ static bool api_dfs_Add(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -160,7 +160,7 @@ static bool api_dfs_Remove(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_Remove *r; @@ -183,8 +183,8 @@ static bool api_dfs_Remove(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -209,8 +209,8 @@ static bool api_dfs_Remove(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -231,7 +231,7 @@ static bool api_dfs_SetInfo(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_SetInfo *r; @@ -254,8 +254,8 @@ static bool api_dfs_SetInfo(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -280,8 +280,8 @@ static bool api_dfs_SetInfo(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -302,7 +302,7 @@ static bool api_dfs_GetInfo(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_GetInfo *r; @@ -325,8 +325,8 @@ static bool api_dfs_GetInfo(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -358,8 +358,8 @@ static bool api_dfs_GetInfo(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -380,7 +380,7 @@ static bool api_dfs_Enum(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_Enum *r; @@ -403,8 +403,8 @@ static bool api_dfs_Enum(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -432,8 +432,8 @@ static bool api_dfs_Enum(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -454,7 +454,7 @@ static bool api_dfs_Rename(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_Rename *r; @@ -477,8 +477,8 @@ static bool api_dfs_Rename(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -503,8 +503,8 @@ static bool api_dfs_Rename(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -525,7 +525,7 @@ static bool api_dfs_Move(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_Move *r; @@ -548,8 +548,8 @@ static bool api_dfs_Move(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -574,8 +574,8 @@ static bool api_dfs_Move(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -596,7 +596,7 @@ static bool api_dfs_ManagerGetConfigInfo(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_ManagerGetConfigInfo *r; @@ -619,8 +619,8 @@ static bool api_dfs_ManagerGetConfigInfo(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -645,8 +645,8 @@ static bool api_dfs_ManagerGetConfigInfo(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -667,7 +667,7 @@ static bool api_dfs_ManagerSendSiteInfo(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_ManagerSendSiteInfo *r; @@ -690,8 +690,8 @@ static bool api_dfs_ManagerSendSiteInfo(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -716,8 +716,8 @@ static bool api_dfs_ManagerSendSiteInfo(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -738,7 +738,7 @@ static bool api_dfs_AddFtRoot(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_AddFtRoot *r; @@ -761,8 +761,8 @@ static bool api_dfs_AddFtRoot(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -789,8 +789,8 @@ static bool api_dfs_AddFtRoot(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -811,7 +811,7 @@ static bool api_dfs_RemoveFtRoot(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_RemoveFtRoot *r; @@ -834,8 +834,8 @@ static bool api_dfs_RemoveFtRoot(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -862,8 +862,8 @@ static bool api_dfs_RemoveFtRoot(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -884,7 +884,7 @@ static bool api_dfs_AddStdRoot(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_AddStdRoot *r; @@ -907,8 +907,8 @@ static bool api_dfs_AddStdRoot(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -933,8 +933,8 @@ static bool api_dfs_AddStdRoot(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -955,7 +955,7 @@ static bool api_dfs_RemoveStdRoot(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_RemoveStdRoot *r; @@ -978,8 +978,8 @@ static bool api_dfs_RemoveStdRoot(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1004,8 +1004,8 @@ static bool api_dfs_RemoveStdRoot(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1026,7 +1026,7 @@ static bool api_dfs_ManagerInitialize(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_ManagerInitialize *r; @@ -1049,8 +1049,8 @@ static bool api_dfs_ManagerInitialize(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1075,8 +1075,8 @@ static bool api_dfs_ManagerInitialize(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1097,7 +1097,7 @@ static bool api_dfs_AddStdRootForced(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_AddStdRootForced *r; @@ -1120,8 +1120,8 @@ static bool api_dfs_AddStdRootForced(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1146,8 +1146,8 @@ static bool api_dfs_AddStdRootForced(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1168,7 +1168,7 @@ static bool api_dfs_GetDcAddress(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_GetDcAddress *r; @@ -1191,8 +1191,8 @@ static bool api_dfs_GetDcAddress(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1217,8 +1217,8 @@ static bool api_dfs_GetDcAddress(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1239,7 +1239,7 @@ static bool api_dfs_SetDcAddress(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_SetDcAddress *r; @@ -1262,8 +1262,8 @@ static bool api_dfs_SetDcAddress(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1288,8 +1288,8 @@ static bool api_dfs_SetDcAddress(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1310,7 +1310,7 @@ static bool api_dfs_FlushFtTable(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_FlushFtTable *r; @@ -1333,8 +1333,8 @@ static bool api_dfs_FlushFtTable(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1359,8 +1359,8 @@ static bool api_dfs_FlushFtTable(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1381,7 +1381,7 @@ static bool api_dfs_Add2(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_Add2 *r; @@ -1404,8 +1404,8 @@ static bool api_dfs_Add2(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1430,8 +1430,8 @@ static bool api_dfs_Add2(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1452,7 +1452,7 @@ static bool api_dfs_Remove2(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_Remove2 *r; @@ -1475,8 +1475,8 @@ static bool api_dfs_Remove2(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1501,8 +1501,8 @@ static bool api_dfs_Remove2(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1523,7 +1523,7 @@ static bool api_dfs_EnumEx(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_EnumEx *r; @@ -1546,8 +1546,8 @@ static bool api_dfs_EnumEx(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1575,8 +1575,8 @@ static bool api_dfs_EnumEx(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1597,7 +1597,7 @@ static bool api_dfs_SetInfo2(pipes_struct *p) const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; - NTSTATUS status; + enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_SetInfo2 *r; @@ -1620,8 +1620,8 @@ static bool api_dfs_SetInfo2(pipes_struct *p) } pull->flags |= LIBNDR_FLAG_REF_ALLOC; - status = call->ndr_pull(pull, NDR_IN, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } @@ -1646,8 +1646,8 @@ static bool api_dfs_SetInfo2(pipes_struct *p) return False; } - status = call->ndr_push(push, NDR_OUT, r); - if (NT_STATUS_IS_ERR(status)) { + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); return False; } -- cgit From 3d87cba590b714e95c4e02946bdba8588c3d3700 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 9 Jan 2008 12:28:44 +0100 Subject: Re-run make idl to get even nicer pidl generated server code. Guenther (This used to be commit 6169dea4dc3c4fc5eb1caefde828ed896cf048c5) --- source3/librpc/gen_ndr/srv_dfs.c | 1296 ++++++++++++++++++++------------------ 1 file changed, 671 insertions(+), 625 deletions(-) (limited to 'source3/librpc/gen_ndr/srv_dfs.c') diff --git a/source3/librpc/gen_ndr/srv_dfs.c b/source3/librpc/gen_ndr/srv_dfs.c index 4c92c438f0..384c2ba940 100644 --- a/source3/librpc/gen_ndr/srv_dfs.c +++ b/source3/librpc/gen_ndr/srv_dfs.c @@ -14,74 +14,76 @@ static bool api_dfs_GetManagerVersion(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_GetManagerVersion *r; - + call = &ndr_table_netdfs.calls[NDR_DFS_GETMANAGERVERSION]; - + r = talloc(NULL, struct dfs_GetManagerVersion); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(dfs_GetManagerVersion, r); - + } + ZERO_STRUCT(r->out); r->out.version = talloc_zero(r, enum dfs_ManagerVersion); if (r->out.version == NULL) { talloc_free(r); - return False; + return false; } - + _dfs_GetManagerVersion(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(dfs_GetManagerVersion, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_dfs_Add(pipes_struct *p) @@ -92,67 +94,69 @@ static bool api_dfs_Add(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_Add *r; - + call = &ndr_table_netdfs.calls[NDR_DFS_ADD]; - + r = talloc(NULL, struct dfs_Add); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(dfs_Add, r); - + } + r->out.result = _dfs_Add(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(dfs_Add, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_dfs_Remove(pipes_struct *p) @@ -163,67 +167,69 @@ static bool api_dfs_Remove(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_Remove *r; - + call = &ndr_table_netdfs.calls[NDR_DFS_REMOVE]; - + r = talloc(NULL, struct dfs_Remove); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(dfs_Remove, r); - + } + r->out.result = _dfs_Remove(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(dfs_Remove, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_dfs_SetInfo(pipes_struct *p) @@ -234,67 +240,69 @@ static bool api_dfs_SetInfo(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_SetInfo *r; - + call = &ndr_table_netdfs.calls[NDR_DFS_SETINFO]; - + r = talloc(NULL, struct dfs_SetInfo); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(dfs_SetInfo, r); - + } + r->out.result = _dfs_SetInfo(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(dfs_SetInfo, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_dfs_GetInfo(pipes_struct *p) @@ -305,74 +313,76 @@ static bool api_dfs_GetInfo(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_GetInfo *r; - + call = &ndr_table_netdfs.calls[NDR_DFS_GETINFO]; - + r = talloc(NULL, struct dfs_GetInfo); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(dfs_GetInfo, r); - + } + ZERO_STRUCT(r->out); r->out.info = talloc_zero(r, union dfs_Info); if (r->out.info == NULL) { talloc_free(r); - return False; + return false; } - + r->out.result = _dfs_GetInfo(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(dfs_GetInfo, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_dfs_Enum(pipes_struct *p) @@ -383,70 +393,72 @@ static bool api_dfs_Enum(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_Enum *r; - + call = &ndr_table_netdfs.calls[NDR_DFS_ENUM]; - + r = talloc(NULL, struct dfs_Enum); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(dfs_Enum, r); - + } + ZERO_STRUCT(r->out); r->out.info = r->in.info; r->out.total = r->in.total; r->out.result = _dfs_Enum(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(dfs_Enum, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_dfs_Rename(pipes_struct *p) @@ -457,67 +469,69 @@ static bool api_dfs_Rename(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_Rename *r; - + call = &ndr_table_netdfs.calls[NDR_DFS_RENAME]; - + r = talloc(NULL, struct dfs_Rename); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(dfs_Rename, r); - + } + r->out.result = _dfs_Rename(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(dfs_Rename, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_dfs_Move(pipes_struct *p) @@ -528,67 +542,69 @@ static bool api_dfs_Move(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_Move *r; - + call = &ndr_table_netdfs.calls[NDR_DFS_MOVE]; - + r = talloc(NULL, struct dfs_Move); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(dfs_Move, r); - + } + r->out.result = _dfs_Move(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(dfs_Move, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_dfs_ManagerGetConfigInfo(pipes_struct *p) @@ -599,67 +615,69 @@ static bool api_dfs_ManagerGetConfigInfo(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_ManagerGetConfigInfo *r; - + call = &ndr_table_netdfs.calls[NDR_DFS_MANAGERGETCONFIGINFO]; - + r = talloc(NULL, struct dfs_ManagerGetConfigInfo); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(dfs_ManagerGetConfigInfo, r); - + } + r->out.result = _dfs_ManagerGetConfigInfo(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(dfs_ManagerGetConfigInfo, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_dfs_ManagerSendSiteInfo(pipes_struct *p) @@ -670,67 +688,69 @@ static bool api_dfs_ManagerSendSiteInfo(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_ManagerSendSiteInfo *r; - + call = &ndr_table_netdfs.calls[NDR_DFS_MANAGERSENDSITEINFO]; - + r = talloc(NULL, struct dfs_ManagerSendSiteInfo); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(dfs_ManagerSendSiteInfo, r); - + } + r->out.result = _dfs_ManagerSendSiteInfo(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(dfs_ManagerSendSiteInfo, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_dfs_AddFtRoot(pipes_struct *p) @@ -741,69 +761,71 @@ static bool api_dfs_AddFtRoot(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_AddFtRoot *r; - + call = &ndr_table_netdfs.calls[NDR_DFS_ADDFTROOT]; - + r = talloc(NULL, struct dfs_AddFtRoot); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(dfs_AddFtRoot, r); - + } + ZERO_STRUCT(r->out); r->out.unknown2 = r->in.unknown2; r->out.result = _dfs_AddFtRoot(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(dfs_AddFtRoot, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_dfs_RemoveFtRoot(pipes_struct *p) @@ -814,69 +836,71 @@ static bool api_dfs_RemoveFtRoot(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_RemoveFtRoot *r; - + call = &ndr_table_netdfs.calls[NDR_DFS_REMOVEFTROOT]; - + r = talloc(NULL, struct dfs_RemoveFtRoot); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(dfs_RemoveFtRoot, r); - + } + ZERO_STRUCT(r->out); r->out.unknown = r->in.unknown; r->out.result = _dfs_RemoveFtRoot(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(dfs_RemoveFtRoot, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_dfs_AddStdRoot(pipes_struct *p) @@ -887,67 +911,69 @@ static bool api_dfs_AddStdRoot(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_AddStdRoot *r; - + call = &ndr_table_netdfs.calls[NDR_DFS_ADDSTDROOT]; - + r = talloc(NULL, struct dfs_AddStdRoot); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(dfs_AddStdRoot, r); - + } + r->out.result = _dfs_AddStdRoot(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(dfs_AddStdRoot, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_dfs_RemoveStdRoot(pipes_struct *p) @@ -958,67 +984,69 @@ static bool api_dfs_RemoveStdRoot(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_RemoveStdRoot *r; - + call = &ndr_table_netdfs.calls[NDR_DFS_REMOVESTDROOT]; - + r = talloc(NULL, struct dfs_RemoveStdRoot); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(dfs_RemoveStdRoot, r); - + } + r->out.result = _dfs_RemoveStdRoot(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(dfs_RemoveStdRoot, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_dfs_ManagerInitialize(pipes_struct *p) @@ -1029,67 +1057,69 @@ static bool api_dfs_ManagerInitialize(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_ManagerInitialize *r; - + call = &ndr_table_netdfs.calls[NDR_DFS_MANAGERINITIALIZE]; - + r = talloc(NULL, struct dfs_ManagerInitialize); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(dfs_ManagerInitialize, r); - + } + r->out.result = _dfs_ManagerInitialize(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(dfs_ManagerInitialize, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_dfs_AddStdRootForced(pipes_struct *p) @@ -1100,67 +1130,69 @@ static bool api_dfs_AddStdRootForced(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_AddStdRootForced *r; - + call = &ndr_table_netdfs.calls[NDR_DFS_ADDSTDROOTFORCED]; - + r = talloc(NULL, struct dfs_AddStdRootForced); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(dfs_AddStdRootForced, r); - + } + r->out.result = _dfs_AddStdRootForced(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(dfs_AddStdRootForced, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_dfs_GetDcAddress(pipes_struct *p) @@ -1171,67 +1203,69 @@ static bool api_dfs_GetDcAddress(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_GetDcAddress *r; - + call = &ndr_table_netdfs.calls[NDR_DFS_GETDCADDRESS]; - + r = talloc(NULL, struct dfs_GetDcAddress); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(dfs_GetDcAddress, r); - + } + r->out.result = _dfs_GetDcAddress(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(dfs_GetDcAddress, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_dfs_SetDcAddress(pipes_struct *p) @@ -1242,67 +1276,69 @@ static bool api_dfs_SetDcAddress(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_SetDcAddress *r; - + call = &ndr_table_netdfs.calls[NDR_DFS_SETDCADDRESS]; - + r = talloc(NULL, struct dfs_SetDcAddress); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(dfs_SetDcAddress, r); - + } + r->out.result = _dfs_SetDcAddress(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(dfs_SetDcAddress, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_dfs_FlushFtTable(pipes_struct *p) @@ -1313,67 +1349,69 @@ static bool api_dfs_FlushFtTable(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_FlushFtTable *r; - + call = &ndr_table_netdfs.calls[NDR_DFS_FLUSHFTTABLE]; - + r = talloc(NULL, struct dfs_FlushFtTable); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(dfs_FlushFtTable, r); - + } + r->out.result = _dfs_FlushFtTable(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(dfs_FlushFtTable, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_dfs_Add2(pipes_struct *p) @@ -1384,67 +1422,69 @@ static bool api_dfs_Add2(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_Add2 *r; - + call = &ndr_table_netdfs.calls[NDR_DFS_ADD2]; - + r = talloc(NULL, struct dfs_Add2); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(dfs_Add2, r); - + } + r->out.result = _dfs_Add2(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(dfs_Add2, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_dfs_Remove2(pipes_struct *p) @@ -1455,67 +1495,69 @@ static bool api_dfs_Remove2(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_Remove2 *r; - + call = &ndr_table_netdfs.calls[NDR_DFS_REMOVE2]; - + r = talloc(NULL, struct dfs_Remove2); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(dfs_Remove2, r); - + } + r->out.result = _dfs_Remove2(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(dfs_Remove2, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_dfs_EnumEx(pipes_struct *p) @@ -1526,70 +1568,72 @@ static bool api_dfs_EnumEx(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_EnumEx *r; - + call = &ndr_table_netdfs.calls[NDR_DFS_ENUMEX]; - + r = talloc(NULL, struct dfs_EnumEx); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(dfs_EnumEx, r); - + } + ZERO_STRUCT(r->out); r->out.info = r->in.info; r->out.total = r->in.total; r->out.result = _dfs_EnumEx(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(dfs_EnumEx, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_dfs_SetInfo2(pipes_struct *p) @@ -1600,67 +1644,69 @@ static bool api_dfs_SetInfo2(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct dfs_SetInfo2 *r; - + call = &ndr_table_netdfs.calls[NDR_DFS_SETINFO2]; - + r = talloc(NULL, struct dfs_SetInfo2); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(dfs_SetInfo2, r); - + } + r->out.result = _dfs_SetInfo2(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(dfs_SetInfo2, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } -- cgit From 5e86ac9e6d2eb7ff0f6f8461dcfc230e2d87c42c Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 17 Jan 2008 13:00:12 +0100 Subject: idl: Update DFS IDL from Samba 4. (This used to be commit a6677b2e186212f723b24775293682ce5b94952e) --- source3/librpc/gen_ndr/srv_dfs.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/librpc/gen_ndr/srv_dfs.c') diff --git a/source3/librpc/gen_ndr/srv_dfs.c b/source3/librpc/gen_ndr/srv_dfs.c index 384c2ba940..ad6e0af059 100644 --- a/source3/librpc/gen_ndr/srv_dfs.c +++ b/source3/librpc/gen_ndr/srv_dfs.c @@ -1233,6 +1233,10 @@ static bool api_dfs_GetDcAddress(pipes_struct *p) NDR_PRINT_IN_DEBUG(dfs_GetDcAddress, r); } + ZERO_STRUCT(r->out); + r->out.server_fullname = r->in.server_fullname; + r->out.is_root = r->in.is_root; + r->out.ttl = r->in.ttl; r->out.result = _dfs_GetDcAddress(p, r); if (p->rng_fault_state) { -- cgit From 485cb23b16e62a37180b95bd5c409de6ee162084 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 11 Feb 2008 09:15:30 +0100 Subject: rerun 'make idl' metze (This used to be commit 55c74832f3a4052d8b15f01b233aab97f7001bbe) --- source3/librpc/gen_ndr/srv_dfs.c | 46 ++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'source3/librpc/gen_ndr/srv_dfs.c') diff --git a/source3/librpc/gen_ndr/srv_dfs.c b/source3/librpc/gen_ndr/srv_dfs.c index ad6e0af059..1ecd687e3a 100644 --- a/source3/librpc/gen_ndr/srv_dfs.c +++ b/source3/librpc/gen_ndr/srv_dfs.c @@ -17,7 +17,7 @@ static bool api_dfs_GetManagerVersion(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_GETMANAGERVERSION]; - r = talloc(NULL, struct dfs_GetManagerVersion); + r = talloc(talloc_tos(), struct dfs_GetManagerVersion); if (r == NULL) { return false; } @@ -97,7 +97,7 @@ static bool api_dfs_Add(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_ADD]; - r = talloc(NULL, struct dfs_Add); + r = talloc(talloc_tos(), struct dfs_Add); if (r == NULL) { return false; } @@ -170,7 +170,7 @@ static bool api_dfs_Remove(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_REMOVE]; - r = talloc(NULL, struct dfs_Remove); + r = talloc(talloc_tos(), struct dfs_Remove); if (r == NULL) { return false; } @@ -243,7 +243,7 @@ static bool api_dfs_SetInfo(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_SETINFO]; - r = talloc(NULL, struct dfs_SetInfo); + r = talloc(talloc_tos(), struct dfs_SetInfo); if (r == NULL) { return false; } @@ -316,7 +316,7 @@ static bool api_dfs_GetInfo(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_GETINFO]; - r = talloc(NULL, struct dfs_GetInfo); + r = talloc(talloc_tos(), struct dfs_GetInfo); if (r == NULL) { return false; } @@ -396,7 +396,7 @@ static bool api_dfs_Enum(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_ENUM]; - r = talloc(NULL, struct dfs_Enum); + r = talloc(talloc_tos(), struct dfs_Enum); if (r == NULL) { return false; } @@ -472,7 +472,7 @@ static bool api_dfs_Rename(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_RENAME]; - r = talloc(NULL, struct dfs_Rename); + r = talloc(talloc_tos(), struct dfs_Rename); if (r == NULL) { return false; } @@ -545,7 +545,7 @@ static bool api_dfs_Move(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_MOVE]; - r = talloc(NULL, struct dfs_Move); + r = talloc(talloc_tos(), struct dfs_Move); if (r == NULL) { return false; } @@ -618,7 +618,7 @@ static bool api_dfs_ManagerGetConfigInfo(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_MANAGERGETCONFIGINFO]; - r = talloc(NULL, struct dfs_ManagerGetConfigInfo); + r = talloc(talloc_tos(), struct dfs_ManagerGetConfigInfo); if (r == NULL) { return false; } @@ -691,7 +691,7 @@ static bool api_dfs_ManagerSendSiteInfo(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_MANAGERSENDSITEINFO]; - r = talloc(NULL, struct dfs_ManagerSendSiteInfo); + r = talloc(talloc_tos(), struct dfs_ManagerSendSiteInfo); if (r == NULL) { return false; } @@ -764,7 +764,7 @@ static bool api_dfs_AddFtRoot(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_ADDFTROOT]; - r = talloc(NULL, struct dfs_AddFtRoot); + r = talloc(talloc_tos(), struct dfs_AddFtRoot); if (r == NULL) { return false; } @@ -839,7 +839,7 @@ static bool api_dfs_RemoveFtRoot(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_REMOVEFTROOT]; - r = talloc(NULL, struct dfs_RemoveFtRoot); + r = talloc(talloc_tos(), struct dfs_RemoveFtRoot); if (r == NULL) { return false; } @@ -914,7 +914,7 @@ static bool api_dfs_AddStdRoot(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_ADDSTDROOT]; - r = talloc(NULL, struct dfs_AddStdRoot); + r = talloc(talloc_tos(), struct dfs_AddStdRoot); if (r == NULL) { return false; } @@ -987,7 +987,7 @@ static bool api_dfs_RemoveStdRoot(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_REMOVESTDROOT]; - r = talloc(NULL, struct dfs_RemoveStdRoot); + r = talloc(talloc_tos(), struct dfs_RemoveStdRoot); if (r == NULL) { return false; } @@ -1060,7 +1060,7 @@ static bool api_dfs_ManagerInitialize(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_MANAGERINITIALIZE]; - r = talloc(NULL, struct dfs_ManagerInitialize); + r = talloc(talloc_tos(), struct dfs_ManagerInitialize); if (r == NULL) { return false; } @@ -1133,7 +1133,7 @@ static bool api_dfs_AddStdRootForced(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_ADDSTDROOTFORCED]; - r = talloc(NULL, struct dfs_AddStdRootForced); + r = talloc(talloc_tos(), struct dfs_AddStdRootForced); if (r == NULL) { return false; } @@ -1206,7 +1206,7 @@ static bool api_dfs_GetDcAddress(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_GETDCADDRESS]; - r = talloc(NULL, struct dfs_GetDcAddress); + r = talloc(talloc_tos(), struct dfs_GetDcAddress); if (r == NULL) { return false; } @@ -1283,7 +1283,7 @@ static bool api_dfs_SetDcAddress(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_SETDCADDRESS]; - r = talloc(NULL, struct dfs_SetDcAddress); + r = talloc(talloc_tos(), struct dfs_SetDcAddress); if (r == NULL) { return false; } @@ -1356,7 +1356,7 @@ static bool api_dfs_FlushFtTable(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_FLUSHFTTABLE]; - r = talloc(NULL, struct dfs_FlushFtTable); + r = talloc(talloc_tos(), struct dfs_FlushFtTable); if (r == NULL) { return false; } @@ -1429,7 +1429,7 @@ static bool api_dfs_Add2(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_ADD2]; - r = talloc(NULL, struct dfs_Add2); + r = talloc(talloc_tos(), struct dfs_Add2); if (r == NULL) { return false; } @@ -1502,7 +1502,7 @@ static bool api_dfs_Remove2(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_REMOVE2]; - r = talloc(NULL, struct dfs_Remove2); + r = talloc(talloc_tos(), struct dfs_Remove2); if (r == NULL) { return false; } @@ -1575,7 +1575,7 @@ static bool api_dfs_EnumEx(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_ENUMEX]; - r = talloc(NULL, struct dfs_EnumEx); + r = talloc(talloc_tos(), struct dfs_EnumEx); if (r == NULL) { return false; } @@ -1651,7 +1651,7 @@ static bool api_dfs_SetInfo2(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_SETINFO2]; - r = talloc(NULL, struct dfs_SetInfo2); + r = talloc(talloc_tos(), struct dfs_SetInfo2); if (r == NULL) { return false; } -- cgit From e0f3ea2cbeb61cb02be85d2b315948985bac27a8 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 12 Jul 2008 23:17:23 +0200 Subject: In api_pipe_bind_req(), check for the iface id, not the pipe name This requires to store the rpc_interface in "struct rpc_table" (This used to be commit 654f8de8497aff29f9b1f1822b6a8e734ff329e0) --- source3/librpc/gen_ndr/srv_dfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/librpc/gen_ndr/srv_dfs.c') diff --git a/source3/librpc/gen_ndr/srv_dfs.c b/source3/librpc/gen_ndr/srv_dfs.c index 1ecd687e3a..54b2184829 100644 --- a/source3/librpc/gen_ndr/srv_dfs.c +++ b/source3/librpc/gen_ndr/srv_dfs.c @@ -1750,5 +1750,5 @@ void netdfs_get_pipe_fns(struct api_struct **fns, int *n_fns) NTSTATUS rpc_netdfs_init(void) { - return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "netdfs", "netdfs", api_netdfs_cmds, sizeof(api_netdfs_cmds) / sizeof(struct api_struct)); + return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "netdfs", "netdfs", &ndr_table_netdfs.syntax_id, api_netdfs_cmds, sizeof(api_netdfs_cmds) / sizeof(struct api_struct)); } -- cgit