From 03b153ce54fdae77694577f33453a19928225d00 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 18 Jul 2011 13:10:30 +1000 Subject: s3-rpc_server remove per-element copies of auth_session_info This is not required any more now that they are the same structure, and shows the value in having a common structure across the codebase. In particular, now any additional state that needs to be added to the auth_session_info will be transparently available across the named pipe proxy, without a need to modify the mapping layer. Andrew Bartlett Signed-off-by: Andrew Tridgell --- source3/rpc_server/rpc_ncacn_np.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'source3/rpc_server/rpc_ncacn_np.c') diff --git a/source3/rpc_server/rpc_ncacn_np.c b/source3/rpc_server/rpc_ncacn_np.c index b57e0be1f6..a8d9608670 100644 --- a/source3/rpc_server/rpc_ncacn_np.c +++ b/source3/rpc_server/rpc_ncacn_np.c @@ -628,8 +628,6 @@ struct np_proxy_state *make_external_rpc_pipe_p(TALLOC_CTX *mem_ctx, struct tevent_context *ev; struct tevent_req *subreq; struct auth_session_info_transport *session_info_t; - struct auth_session_info *session_info_npa; - NTSTATUS status; bool ok; int ret; int sys_errno; @@ -671,27 +669,13 @@ struct np_proxy_state *make_external_rpc_pipe_p(TALLOC_CTX *mem_ctx, goto fail; } - session_info_npa = talloc_zero(talloc_tos(), struct auth_session_info); - if (session_info_npa == NULL) { - DEBUG(0, ("talloc failed\n")); - goto fail; - } - - /* Send the named_pipe_auth server the user's full token */ - session_info_npa->security_token = session_info->security_token; - session_info_npa->session_key = session_info->session_key; - session_info_npa->unix_token = session_info->unix_token; - session_info_npa->unix_info = session_info->unix_info; - - session_info_npa->info = session_info->info; - session_info_t = talloc_zero(talloc_tos(), struct auth_session_info_transport); - if (session_info_npa == NULL) { + if (session_info_t == NULL) { DEBUG(0, ("talloc failed\n")); goto fail; } - session_info_t->session_info = talloc_steal(session_info_t, session_info_npa); + session_info_t->session_info = session_info; become_root(); subreq = tstream_npa_connect_send(talloc_tos(), ev, -- cgit