s3:rpc_server: pass the full ndr_interface_table to rpc_pipe_open_internal()
authorStefan Metzmacher <metze@samba.org>
Sat, 24 Sep 2016 00:08:47 +0000 (02:08 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 26 Oct 2016 09:20:18 +0000 (11:20 +0200)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/rpc_server/rpc_ncacn_np.c
source3/rpc_server/rpc_ncacn_np.h
source3/winbindd/winbindd_cm.c

index 083cbbeb4540cb39d256126813b7bad74fb13d50..14014ef7e8d85545b1cc660f67480bdc4590b61c 100644 (file)
@@ -579,8 +579,7 @@ NTSTATUS rpcint_binding_handle(TALLOC_CTX *mem_ctx,
  *
  * @param[in]  mem_ctx  The memory context to use.
  *
- * @param[in]  abstract_syntax Normally the syntax_id of the autogenerated
- *                             ndr_table_<name>.
+ * @param[in]  ndr_table the ndr_table_<name> structure.
  *
  * @param[in]  serversupplied_info The server supplied authentication function.
  *
@@ -594,7 +593,7 @@ NTSTATUS rpcint_binding_handle(TALLOC_CTX *mem_ctx,
  *                      error occured.
  */
 NTSTATUS rpc_pipe_open_internal(TALLOC_CTX *mem_ctx,
-                               const struct ndr_syntax_id *abstract_syntax,
+                               const struct ndr_interface_table *ndr_table,
                                const struct auth_session_info *session_info,
                                const struct tsocket_address *remote_address,
                                struct messaging_context *msg_ctx,
@@ -608,7 +607,7 @@ NTSTATUS rpc_pipe_open_internal(TALLOC_CTX *mem_ctx,
                return NT_STATUS_NO_MEMORY;
        }
 
-       result->abstract_syntax = *abstract_syntax;
+       result->abstract_syntax = ndr_table->syntax_id;
        result->transfer_syntax = ndr_transfer_syntax_ndr;
 
        if (remote_address == NULL) {
@@ -630,13 +629,12 @@ NTSTATUS rpc_pipe_open_internal(TALLOC_CTX *mem_ctx,
 
        result->max_xmit_frag = -1;
 
-       status = rpcint_binding_handle_ex(result,
-                                         abstract_syntax,
-                                         NULL,
-                                         remote_address,
-                                         session_info,
-                                         msg_ctx,
-                                         &result->binding_handle);
+       status = rpcint_binding_handle(result,
+                                      ndr_table,
+                                      remote_address,
+                                      session_info,
+                                      msg_ctx,
+                                      &result->binding_handle);
        if (!NT_STATUS_IS_OK(status)) {
                TALLOC_FREE(result);
                return status;
@@ -1075,7 +1073,7 @@ NTSTATUS rpc_pipe_open_interface(TALLOC_CTX *mem_ctx,
        switch (pipe_mode) {
        case RPC_SERVICE_MODE_EMBEDDED:
                status = rpc_pipe_open_internal(tmp_ctx,
-                                               &table->syntax_id, session_info,
+                                               table, session_info,
                                                remote_address, msg_ctx,
                                                &cli);
                if (!NT_STATUS_IS_OK(status)) {
index b8426e07ac6f0ccc1d903ab951e824eaec378a82..59b9d5a787eb9b7deb5628da9ba0520a46c4b7e7 100644 (file)
@@ -86,7 +86,7 @@ NTSTATUS rpc_pipe_open_interface(TALLOC_CTX *mem_ctx,
                                 struct rpc_pipe_client **cli_pipe);
 
 NTSTATUS rpc_pipe_open_internal(TALLOC_CTX *mem_ctx,
-                               const struct ndr_syntax_id *abstract_syntax,
+                               const struct ndr_interface_table *ndr_table,
                                const struct auth_session_info *session_info,
                                const struct tsocket_address *remote_address,
                                struct messaging_context *msg_ctx,
index e18f6382519a5b7afe69a83fe4e68c50703bb54a..94c5124ad97c998f8c4a3e4badaaa2184a61007f 100644 (file)
@@ -1838,7 +1838,7 @@ NTSTATUS wb_open_internal_pipe(TALLOC_CTX *mem_ctx,
                                                 &cli);
        } else {
                status = rpc_pipe_open_internal(mem_ctx,
-                                               &table->syntax_id,
+                                               table,
                                                session_info,
                                                NULL,
                                                winbind_messaging_context(),