summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2018-11-21 19:08:59 +0100
committerJeremy Allison <jra@samba.org>2019-01-12 03:13:38 +0100
commit1f348d077b25eb674c099c9b3a7776750b39f4a2 (patch)
tree9d0e835bdf785a5290caeddbe49d3ac71d735b7c /source4
parent965abe8e1a55b2631ea3e8bf03134a567f02ac5c (diff)
downloadsamba-1f348d077b25eb674c099c9b3a7776750b39f4a2.tar.gz
s4:rpc_server/remote: remote_op_bind already has the table available
BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113 BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/rpc_server/remote/dcesrv_remote.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/source4/rpc_server/remote/dcesrv_remote.c b/source4/rpc_server/remote/dcesrv_remote.c
index 17177096c29..a3611adcb91 100644
--- a/source4/rpc_server/remote/dcesrv_remote.c
+++ b/source4/rpc_server/remote/dcesrv_remote.c
@@ -42,7 +42,8 @@ static NTSTATUS remote_op_reply(struct dcesrv_call_state *dce_call, TALLOC_CTX *
static NTSTATUS remote_op_bind(struct dcesrv_call_state *dce_call, const struct dcesrv_interface *iface, uint32_t if_version)
{
NTSTATUS status;
- const struct ndr_interface_table *table;
+ const struct ndr_interface_table *table =
+ (const struct ndr_interface_table *)dce_call->context->iface->private_data;
struct dcesrv_remote_private *priv;
const char *binding = lpcfg_parm_string(dce_call->conn->dce_ctx->lp_ctx, NULL, "dcerpc_remote", "binding");
const char *user, *pass, *domain;
@@ -72,12 +73,6 @@ static NTSTATUS remote_op_bind(struct dcesrv_call_state *dce_call, const struct
pass = lpcfg_parm_string(dce_call->conn->dce_ctx->lp_ctx, NULL, "dcerpc_remote", "password");
domain = lpcfg_parm_string(dce_call->conn->dce_ctx->lp_ctx, NULL, "dceprc_remote", "domain");
- table = ndr_table_by_syntax(&iface->syntax_id);
- if (!table) {
- dce_call->fault_code = DCERPC_NCA_S_UNKNOWN_IF;
- return NT_STATUS_NET_WRITE_FAULT;
- }
-
credentials = dcesrv_call_credentials(dce_call);
if (user && pass) {
@@ -133,7 +128,7 @@ static NTSTATUS remote_op_bind(struct dcesrv_call_state *dce_call, const struct
}
}
- status = dcerpc_binding_set_abstract_syntax(b, &iface->syntax_id);
+ status = dcerpc_binding_set_abstract_syntax(b, &table->syntax_id);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("dcerpc_binding_set_abstract_syntax() - %s'\n",
nt_errstr(status)));