diff options
-rw-r--r-- | source3/include/ntdomain.h | 2 | ||||
-rw-r--r-- | source3/rpc_server/rpc_ncacn_np.c | 4 | ||||
-rw-r--r-- | source3/rpc_server/srv_pipe.c | 13 |
3 files changed, 3 insertions, 16 deletions
diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h index b0a462399f..ba4f3928d6 100644 --- a/source3/include/ntdomain.h +++ b/source3/include/ntdomain.h @@ -107,8 +107,6 @@ struct pipe_auth_data { char *domain; char *user_name; DATA_BLOB user_session_key; - - void (*auth_data_free_func)(struct pipe_auth_data *); }; /* diff --git a/source3/rpc_server/rpc_ncacn_np.c b/source3/rpc_server/rpc_ncacn_np.c index ea65e042ab..cbf5248e82 100644 --- a/source3/rpc_server/rpc_ncacn_np.c +++ b/source3/rpc_server/rpc_ncacn_np.c @@ -95,9 +95,7 @@ int close_internal_rpc_pipe_hnd(struct pipes_struct *p) return False; } - if (p->auth.auth_data_free_func) { - (*p->auth.auth_data_free_func)(&p->auth); - } + TALLOC_FREE(p->auth.auth_ctx); free_pipe_rpc_context_internal( p->contexts ); diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c index e5d2a1c6da..1e369154af 100644 --- a/source3/rpc_server/srv_pipe.c +++ b/source3/rpc_server/srv_pipe.c @@ -86,11 +86,6 @@ static void dump_pdu_region(const char *name, int v, TALLOC_FREE(fname); } -static void free_pipe_auth_data(struct pipe_auth_data *auth) -{ - TALLOC_FREE(auth->auth_ctx); -} - static DATA_BLOB generic_session_key(void) { return data_blob("SystemLibraryDTC", 16); @@ -269,7 +264,7 @@ static bool setup_bind_nak(struct pipes_struct *p, struct ncacn_packet *pkt) p->out_data.data_sent_length = 0; p->out_data.current_pdu_sent = 0; - free_pipe_auth_data(&p->auth); + TALLOC_FREE(p->auth.auth_ctx); p->auth.auth_level = DCERPC_AUTH_LEVEL_NONE; p->auth.auth_type = DCERPC_AUTH_TYPE_NONE; p->pipe_bound = False; @@ -444,7 +439,6 @@ static bool pipe_spnego_auth_bind(struct pipes_struct *p, talloc_steal(mem_ctx, response->data); p->auth.auth_ctx = spnego_ctx; - p->auth.auth_data_free_func = &free_pipe_auth_data; p->auth.auth_type = DCERPC_AUTH_TYPE_SPNEGO; DEBUG(10, ("SPNEGO auth started\n")); @@ -565,7 +559,6 @@ static bool pipe_schannel_auth_bind(struct pipes_struct *p, /* We're finished with this bind - no more packets. */ p->auth.auth_ctx = schannel_auth; - p->auth.auth_data_free_func = &free_pipe_auth_data; p->auth.auth_type = DCERPC_AUTH_TYPE_SCHANNEL; p->pipe_bound = True; @@ -610,7 +603,6 @@ static bool pipe_ntlmssp_auth_bind(struct pipes_struct *p, talloc_steal(mem_ctx, response->data); p->auth.auth_ctx = ntlmssp_state; - p->auth.auth_data_free_func = &free_pipe_auth_data; p->auth.auth_type = DCERPC_AUTH_TYPE_NTLMSSP; DEBUG(10, (__location__ ": NTLMSSP auth started\n")); @@ -722,7 +714,6 @@ static bool pipe_gssapi_auth_bind(struct pipes_struct *p, talloc_steal(mem_ctx, response->data); p->auth.auth_ctx = gse_ctx; - p->auth.auth_data_free_func = &free_pipe_auth_data; p->auth.auth_type = DCERPC_AUTH_TYPE_KRB5; DEBUG(10, ("KRB5 auth started\n")); @@ -1263,7 +1254,7 @@ bool api_pipe_bind_auth3(struct pipes_struct *p, struct ncacn_packet *pkt) err: - free_pipe_auth_data(&p->auth); + TALLOC_FREE(p->auth.auth_ctx); return false; } |