summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2010-09-03 16:33:45 -0400
committerGünther Deschner <gd@samba.org>2010-09-23 10:54:24 -0700
commitb11fff1f481a21d84b713421cfbfd42ef1e73f4b (patch)
tree7505ca825834c1a6b2792fecaeec257ddcfbe60d /source3/rpc_server
parent3453bc7b1108390354c0825ee6b2b0bb28fca2f3 (diff)
downloadsamba-b11fff1f481a21d84b713421cfbfd42ef1e73f4b.tar.gz
samba-b11fff1f481a21d84b713421cfbfd42ef1e73f4b.tar.bz2
samba-b11fff1f481a21d84b713421cfbfd42ef1e73f4b.zip
s3-dcerpc: remove auth_data_free_func
Everything is using a talloc pointer now, no need to have an accessor function to free data anymore. Signed-off-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/rpc_ncacn_np.c4
-rw-r--r--source3/rpc_server/srv_pipe.c13
2 files changed, 3 insertions, 14 deletions
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;
}