diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-07-18 13:10:30 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-07-20 09:17:13 +1000 |
commit | 03b153ce54fdae77694577f33453a19928225d00 (patch) | |
tree | e65f47aa5f0ef754e8a79073daa97ed727e6d36f /source3/rpc_server/rpc_ncacn_np.c | |
parent | 9fcc617ff5a216cc4ff1a587786522d28d84c7f2 (diff) | |
download | samba-03b153ce54fdae77694577f33453a19928225d00.tar.gz samba-03b153ce54fdae77694577f33453a19928225d00.tar.bz2 samba-03b153ce54fdae77694577f33453a19928225d00.zip |
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 <tridge@samba.org>
Diffstat (limited to 'source3/rpc_server/rpc_ncacn_np.c')
-rw-r--r-- | source3/rpc_server/rpc_ncacn_np.c | 20 |
1 files changed, 2 insertions, 18 deletions
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, |