1 From 51fbcb75007faddfbea29ef78a3857ba878a2327 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?G=C3=BCnther=20Deschner?= <gd@samba.org>
3 Date: Thu, 6 Dec 2012 14:54:25 +0100
4 Subject: [PATCH] s3-rpc_server: Remove obsolete process_creds boolean in
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
12 Signed-off-by: Günther Deschner <gd@samba.org>
13 Reviewed-by: Stefan Metzmacher <metze@samba.org>
15 (cherry picked from commit c1fb595081c2b0bf66bce06c09750f53e8031311)
17 source3/rpc_server/netlogon/srv_netlog_nt.c | 27 +++------------------------
18 1 file changed, 3 insertions(+), 24 deletions(-)
20 diff --git a/source3/rpc_server/netlogon/srv_netlog_nt.c b/source3/rpc_server/netlogon/srv_netlog_nt.c
21 index 8079b3a..d14d0ed 100644
22 --- a/source3/rpc_server/netlogon/srv_netlog_nt.c
23 +++ b/source3/rpc_server/netlogon/srv_netlog_nt.c
24 @@ -1416,21 +1416,16 @@ static NTSTATUS _netr_LogonSamLogon_base(struct pipes_struct *p,
25 struct auth_usersupplied_info *user_info = NULL;
26 struct auth_serversupplied_info *server_info = NULL;
27 struct auth_context *auth_context = NULL;
28 - uint8_t pipe_session_key[16];
29 - bool process_creds = true;
33 case NDR_NETR_LOGONSAMLOGON:
34 - process_creds = true;
35 fn = "_netr_LogonSamLogon";
37 case NDR_NETR_LOGONSAMLOGONWITHFLAGS:
38 - process_creds = true;
39 fn = "_netr_LogonSamLogonWithFlags";
41 case NDR_NETR_LOGONSAMLOGONEX:
42 - process_creds = false;
43 fn = "_netr_LogonSamLogonEx";
46 @@ -1621,29 +1616,13 @@ static NTSTATUS _netr_LogonSamLogon_base(struct pipes_struct *p,
47 the SAM Local Security Authority should record that the user is
48 logged in to the domain. */
50 - if (process_creds) {
51 - /* Get the pipe session key from the creds. */
52 - memcpy(pipe_session_key, creds->session_key, 16);
54 - struct schannel_state *schannel_auth;
55 - /* Get the pipe session key from the schannel. */
56 - if ((p->auth.auth_type != DCERPC_AUTH_TYPE_SCHANNEL)
57 - || (p->auth.auth_ctx == NULL)) {
58 - return NT_STATUS_INVALID_HANDLE;
61 - schannel_auth = talloc_get_type_abort(p->auth.auth_ctx,
62 - struct schannel_state);
63 - memcpy(pipe_session_key, schannel_auth->creds->session_key, 16);
66 switch (r->in.validation_level) {
68 - status = serverinfo_to_SamInfo2(server_info, pipe_session_key, 16,
69 + status = serverinfo_to_SamInfo2(server_info, creds->session_key, 16,
70 r->out.validation->sam2);
73 - status = serverinfo_to_SamInfo3(server_info, pipe_session_key, 16,
74 + status = serverinfo_to_SamInfo3(server_info, creds->session_key, 16,
75 r->out.validation->sam3);
78 @@ -1655,7 +1634,7 @@ static NTSTATUS _netr_LogonSamLogon_base(struct pipes_struct *p,
82 - status = serverinfo_to_SamInfo6(server_info, pipe_session_key, 16,
83 + status = serverinfo_to_SamInfo6(server_info, creds->session_key, 16,
84 r->out.validation->sam6);