diff options
Diffstat (limited to 'source4/rpc_server/dcerpc_server.c')
-rw-r--r-- | source4/rpc_server/dcerpc_server.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c index cd079da5c9..cbba5e2408 100644 --- a/source4/rpc_server/dcerpc_server.c +++ b/source4/rpc_server/dcerpc_server.c @@ -366,7 +366,7 @@ _PUBLIC_ NTSTATUS dcesrv_endpoint_connect(struct dcesrv_context *dce_ctx, const struct dcesrv_endpoint *ep, struct auth_session_info *session_info, struct tevent_context *event_ctx, - struct messaging_context *msg_ctx, + struct imessaging_context *msg_ctx, struct server_id server_id, uint32_t state_flags, struct dcesrv_connection **_p) @@ -1235,7 +1235,7 @@ void dcerpc_server_init(struct loadparm_context *lp_ctx) } initialized = true; - shared_init = load_samba_modules(NULL, lp_ctx, "dcerpc_server"); + shared_init = load_samba_modules(NULL, "dcerpc_server"); run_init_functions(static_init); run_init_functions(shared_init); @@ -1353,7 +1353,7 @@ static void dcesrv_sock_reply_done(struct tevent_req *subreq) ret = tstream_writev_queue_recv(subreq, &sys_errno); TALLOC_FREE(subreq); if (ret == -1) { - status = map_nt_error_from_unix(sys_errno); + status = map_nt_error_from_unix_common(sys_errno); dcesrv_terminate_connection(substate->dce_conn, nt_errstr(status)); return; } @@ -1436,7 +1436,7 @@ static void dcesrv_sock_accept(struct stream_connection *srv_conn) socket_get_fd(srv_conn->socket), &dcesrv_conn->stream); if (ret == -1) { - status = map_nt_error_from_unix(errno); + status = map_nt_error_from_unix_common(errno); DEBUG(0, ("dcesrv_sock_accept: " "failed to setup tstream: %s\n", nt_errstr(status))); @@ -1648,7 +1648,7 @@ static NTSTATUS add_socket_rpc_tcp_iface(struct dcesrv_context *dce_ctx, struct status = stream_setup_socket(dcesrv_sock, event_ctx, dce_ctx->lp_ctx, model_ops, &dcesrv_stream_ops, - "ipv4", address, &port, + "ip", address, &port, lpcfg_socket_options(dce_ctx->lp_ctx), dcesrv_sock); if (!NT_STATUS_IS_OK(status)) { @@ -1678,18 +1678,24 @@ static NTSTATUS dcesrv_add_ep_tcp(struct dcesrv_context *dce_ctx, int i; struct interface *ifaces; - load_interfaces(dce_ctx, lpcfg_interfaces(lp_ctx), &ifaces); + load_interface_list(dce_ctx, lp_ctx, &ifaces); - num_interfaces = iface_count(ifaces); + num_interfaces = iface_list_count(ifaces); for(i = 0; i < num_interfaces; i++) { - const char *address = iface_n_ip(ifaces, i); + const char *address = iface_list_n_ip(ifaces, i); status = add_socket_rpc_tcp_iface(dce_ctx, e, event_ctx, model_ops, address); NT_STATUS_NOT_OK_RETURN(status); } } else { - status = add_socket_rpc_tcp_iface(dce_ctx, e, event_ctx, model_ops, - lpcfg_socket_address(lp_ctx)); - NT_STATUS_NOT_OK_RETURN(status); + const char **wcard; + int i; + wcard = iface_list_wildcard(dce_ctx, lp_ctx); + NT_STATUS_HAVE_NO_MEMORY(wcard); + for (i=0; wcard[i]; i++) { + status = add_socket_rpc_tcp_iface(dce_ctx, e, event_ctx, model_ops, wcard[i]); + NT_STATUS_NOT_OK_RETURN(status); + } + talloc_free(wcard); } return NT_STATUS_OK; |