summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-07-15 14:31:01 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-07-19 04:04:20 +0200
commit11d7f7762dc943418d46cf1958a71701e58620c0 (patch)
tree30451094d6b8203104fcec614cc69fac69f7f7ef /source3/rpc_server
parentcbc30833d60ad36129cfbf3924086a7e4592a82a (diff)
downloadsamba-11d7f7762dc943418d46cf1958a71701e58620c0.tar.gz
samba-11d7f7762dc943418d46cf1958a71701e58620c0.tar.bz2
samba-11d7f7762dc943418d46cf1958a71701e58620c0.zip
s3-rpc_server: Remove make_server_info_info3() call from make_server_pipes_struct()
This codepath would only be executed if we provided a partial session_info token across the named pipe forwarding code. The smbd file server always fills this in, and if the ntvfs file server ever wants to use an smbd hosted pipe, it can do the same. Calling create_local_token is always the wrong thing to do. Andrew Bartlett
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/rpc_server.c55
1 files changed, 3 insertions, 52 deletions
diff --git a/source3/rpc_server/rpc_server.c b/source3/rpc_server/rpc_server.c
index 675d0d5e93..5e51f52a76 100644
--- a/source3/rpc_server/rpc_server.c
+++ b/source3/rpc_server/rpc_server.c
@@ -81,58 +81,9 @@ static int make_server_pipes_struct(TALLOC_CTX *mem_ctx,
p->session_info = talloc_steal(p, session_info);
} else {
- struct auth_user_info_dc *auth_user_info_dc;
- struct auth_serversupplied_info *server_info;
- struct netr_SamInfo3 *info3;
-
- /* Fake up an auth_user_info_dc for now, to make an info3, to make the session_info structure */
- auth_user_info_dc = talloc_zero(p, struct auth_user_info_dc);
- if (!auth_user_info_dc) {
- TALLOC_FREE(p);
- *perrno = ENOMEM;
- return -1;
- }
-
- auth_user_info_dc->num_sids = session_info->security_token->num_sids;
- auth_user_info_dc->sids = session_info->security_token->sids;
- auth_user_info_dc->info = session_info->info;
- auth_user_info_dc->user_session_key = session_info->session_key;
-
- /* This creates the input structure that make_server_info_info3 is looking for */
- status = auth_convert_user_info_dc_saminfo3(p, auth_user_info_dc,
- &info3);
-
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(1, ("Failed to convert auth_user_info_dc into netr_SamInfo3\n"));
- TALLOC_FREE(p);
- *perrno = EINVAL;
- return -1;
- }
-
- status = make_server_info_info3(p,
- info3->base.account_name.string,
- info3->base.logon_domain.string,
- &server_info, info3);
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(1, ("Failed to init server info\n"));
- TALLOC_FREE(p);
- *perrno = EINVAL;
- return -1;
- }
-
- /*
- * Some internal functions need a local token to determine access to
- * resources.
- */
- status = create_local_token(p, server_info, &session_info->session_key, info3->base.account_name.string,
- &p->session_info);
- talloc_free(server_info);
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(1, ("Failed to init local auth token\n"));
- TALLOC_FREE(p);
- *perrno = EINVAL;
- return -1;
- }
+ DEBUG(0, ("Supplied session_info in make_server_pipes_struct was incomplete!"));
+ *perrno = EINVAL;
+ return -1;
}
*_p = p;