mirror of
https://github.com/samba-team/samba.git
synced 2025-02-25 17:57:42 +03:00
rpc_server: Make dcerpc_ncacn_accept() take tsocket_address **
dcerpc_ncacn_accept() talloc_move's the addresses away from the caller's talloc hierarchy. Don't leave pointers around in the caller. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Samuel Cabrero <scabrero@samba.org>
This commit is contained in:
parent
51f5631bbb
commit
33f7aac871
@ -430,8 +430,8 @@ static void spoolss_handle_client(struct tevent_req *req)
|
||||
data->msg_ctx,
|
||||
data->dce_ctx,
|
||||
ep,
|
||||
cli_addr,
|
||||
srv_addr,
|
||||
&cli_addr,
|
||||
&srv_addr,
|
||||
sd,
|
||||
spoolss_client_terminated,
|
||||
data);
|
||||
|
@ -439,8 +439,8 @@ static void lsasd_handle_client(struct tevent_req *req)
|
||||
data->msg_ctx,
|
||||
data->dce_ctx,
|
||||
ep,
|
||||
cli_addr,
|
||||
srv_addr,
|
||||
&cli_addr,
|
||||
&srv_addr,
|
||||
sd,
|
||||
term_fn,
|
||||
term_fn_data);
|
||||
|
@ -389,8 +389,8 @@ static void mdssd_handle_client(struct tevent_req *req)
|
||||
data->msg_ctx,
|
||||
data->dce_ctx,
|
||||
ep,
|
||||
cli_addr,
|
||||
srv_addr,
|
||||
&cli_addr,
|
||||
&srv_addr,
|
||||
sd,
|
||||
term_fn,
|
||||
term_fn_data);
|
||||
|
@ -435,8 +435,8 @@ static void dcesrv_ncacn_ip_tcp_listener(struct tevent_context *ev,
|
||||
state->msg_ctx,
|
||||
state->dce_ctx,
|
||||
state->endpoint,
|
||||
cli_addr,
|
||||
srv_addr,
|
||||
&cli_addr,
|
||||
&srv_addr,
|
||||
s,
|
||||
state->termination_fn,
|
||||
state->termination_data);
|
||||
@ -660,7 +660,9 @@ static void dcesrv_ncalrpc_listener(struct tevent_context *ev,
|
||||
state->msg_ctx,
|
||||
state->dce_ctx,
|
||||
state->endpoint,
|
||||
cli_addr, srv_addr, sd,
|
||||
&cli_addr,
|
||||
&srv_addr,
|
||||
sd,
|
||||
state->termination_fn,
|
||||
state->termination_data);
|
||||
}
|
||||
@ -717,8 +719,8 @@ void dcerpc_ncacn_accept(struct tevent_context *ev_ctx,
|
||||
struct messaging_context *msg_ctx,
|
||||
struct dcesrv_context *dce_ctx,
|
||||
struct dcesrv_endpoint *e,
|
||||
struct tsocket_address *cli_addr,
|
||||
struct tsocket_address *srv_addr,
|
||||
struct tsocket_address **cli_addr,
|
||||
struct tsocket_address **srv_addr,
|
||||
int s,
|
||||
dcerpc_ncacn_termination_fn termination_fn,
|
||||
void *termination_data)
|
||||
@ -748,8 +750,9 @@ void dcerpc_ncacn_accept(struct tevent_context *ev_ctx,
|
||||
|
||||
ncacn_conn->sock = s;
|
||||
|
||||
if (cli_addr != NULL) {
|
||||
ncacn_conn->remote_client_addr = talloc_move(ncacn_conn, &cli_addr);
|
||||
if ((cli_addr != NULL) && (*cli_addr != NULL)) {
|
||||
ncacn_conn->remote_client_addr = talloc_move(
|
||||
ncacn_conn, cli_addr);
|
||||
|
||||
if (tsocket_address_is_inet(ncacn_conn->remote_client_addr, "ip")) {
|
||||
ncacn_conn->remote_client_name =
|
||||
@ -769,8 +772,9 @@ void dcerpc_ncacn_accept(struct tevent_context *ev_ctx,
|
||||
}
|
||||
}
|
||||
|
||||
if (srv_addr != NULL) {
|
||||
ncacn_conn->local_server_addr = talloc_move(ncacn_conn, &srv_addr);
|
||||
if ((srv_addr != NULL) && (*srv_addr != NULL)) {
|
||||
ncacn_conn->local_server_addr = talloc_move(
|
||||
ncacn_conn, srv_addr);
|
||||
|
||||
if (tsocket_address_is_inet(ncacn_conn->local_server_addr, "ip")) {
|
||||
ncacn_conn->local_server_name =
|
||||
|
@ -98,8 +98,8 @@ void dcerpc_ncacn_accept(struct tevent_context *ev_ctx,
|
||||
struct messaging_context *msg_ctx,
|
||||
struct dcesrv_context *dce_ctx,
|
||||
struct dcesrv_endpoint *e,
|
||||
struct tsocket_address *cli_addr,
|
||||
struct tsocket_address *srv_addr,
|
||||
struct tsocket_address **cli_addr,
|
||||
struct tsocket_address **srv_addr,
|
||||
int s,
|
||||
dcerpc_ncacn_termination_fn termination_fn,
|
||||
void *termination_data);
|
||||
|
Loading…
x
Reference in New Issue
Block a user