mirror of
https://github.com/samba-team/samba.git
synced 2025-02-04 17:47:26 +03:00
r6604: solved a memory hierarchy ordering problem that led to crashes on
ncacn_ip_tcp and ncalrpc for the standard process model. Thanks to Jelmer for noticing this bug! (This used to be commit 81863cdd8bba0d4e39a1b4dc7e6dd7e6cafb38cf)
This commit is contained in:
parent
35a05d1dc0
commit
2b5a7a4e1e
@ -151,7 +151,7 @@ static NTSTATUS add_socket_rpc_unix(struct dcesrv_context *dce_ctx, struct dcesr
|
||||
uint16_t port = 1;
|
||||
NTSTATUS status;
|
||||
|
||||
dcesrv_sock = talloc(dce_ctx, struct dcesrv_socket_context);
|
||||
dcesrv_sock = talloc(event_ctx, struct dcesrv_socket_context);
|
||||
NT_STATUS_HAVE_NO_MEMORY(dcesrv_sock);
|
||||
|
||||
/* remember the endpoint of this socket */
|
||||
@ -186,12 +186,12 @@ static NTSTATUS add_socket_rpc_ncalrpc(struct dcesrv_context *dce_ctx, struct dc
|
||||
|
||||
full_path = talloc_asprintf(dce_ctx, "%s/%s", lp_ncalrpc_dir(), e->ep_description->endpoint);
|
||||
|
||||
dcesrv_sock = talloc(dce_ctx, struct dcesrv_socket_context);
|
||||
dcesrv_sock = talloc(event_ctx, struct dcesrv_socket_context);
|
||||
NT_STATUS_HAVE_NO_MEMORY(dcesrv_sock);
|
||||
|
||||
/* remember the endpoint of this socket */
|
||||
dcesrv_sock->endpoint = e;
|
||||
dcesrv_sock->dcesrv_ctx = dce_ctx;
|
||||
dcesrv_sock->dcesrv_ctx = talloc_reference(dcesrv_sock, dce_ctx);
|
||||
|
||||
status = stream_setup_socket(event_ctx, model_ops, &dcesrv_stream_ops,
|
||||
"unix", full_path, &port, dcesrv_sock);
|
||||
@ -217,12 +217,12 @@ static NTSTATUS add_socket_rpc_tcp_iface(struct dcesrv_context *dce_ctx, struct
|
||||
port = atoi(e->ep_description->endpoint);
|
||||
}
|
||||
|
||||
dcesrv_sock = talloc(dce_ctx, struct dcesrv_socket_context);
|
||||
dcesrv_sock = talloc(event_ctx, struct dcesrv_socket_context);
|
||||
NT_STATUS_HAVE_NO_MEMORY(dcesrv_sock);
|
||||
|
||||
/* remember the endpoint of this socket */
|
||||
dcesrv_sock->endpoint = e;
|
||||
dcesrv_sock->dcesrv_ctx = dce_ctx;
|
||||
dcesrv_sock->dcesrv_ctx = talloc_reference(dcesrv_sock, dce_ctx);
|
||||
|
||||
status = stream_setup_socket(event_ctx, model_ops, &dcesrv_stream_ops,
|
||||
"ipv4", address, &port, dcesrv_sock);
|
||||
|
Loading…
x
Reference in New Issue
Block a user