]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/samba/samba-3.6.99-fix_member_auth_after_changed_secret.patch
samba: add current RHEL6 patches
[ipfire-2.x.git] / src / patches / samba / samba-3.6.99-fix_member_auth_after_changed_secret.patch
CommitLineData
1d13e637
AF
1From 51fbcb75007faddfbea29ef78a3857ba878a2327 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?G=C3=BCnther=20Deschner?= <gd@samba.org>
3Date: Thu, 6 Dec 2012 14:54:25 +0100
4Subject: [PATCH] s3-rpc_server: Remove obsolete process_creds boolean in
5 samlogon server.
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10Guenther
11
12Signed-off-by: Günther Deschner <gd@samba.org>
13Reviewed-by: Stefan Metzmacher <metze@samba.org>
14
15(cherry picked from commit c1fb595081c2b0bf66bce06c09750f53e8031311)
16---
17 source3/rpc_server/netlogon/srv_netlog_nt.c | 27 +++------------------------
18 1 file changed, 3 insertions(+), 24 deletions(-)
19
20diff --git a/source3/rpc_server/netlogon/srv_netlog_nt.c b/source3/rpc_server/netlogon/srv_netlog_nt.c
21index 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;
30 const char *fn;
31
32 switch (p->opnum) {
33 case NDR_NETR_LOGONSAMLOGON:
34- process_creds = true;
35 fn = "_netr_LogonSamLogon";
36 break;
37 case NDR_NETR_LOGONSAMLOGONWITHFLAGS:
38- process_creds = true;
39 fn = "_netr_LogonSamLogonWithFlags";
40 break;
41 case NDR_NETR_LOGONSAMLOGONEX:
42- process_creds = false;
43 fn = "_netr_LogonSamLogonEx";
44 break;
45 default:
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. */
49
50- if (process_creds) {
51- /* Get the pipe session key from the creds. */
52- memcpy(pipe_session_key, creds->session_key, 16);
53- } else {
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;
59- }
60-
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);
64- }
65-
66 switch (r->in.validation_level) {
67 case 2:
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);
71 break;
72 case 3:
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);
76 break;
77 case 6:
78@@ -1655,7 +1634,7 @@ static NTSTATUS _netr_LogonSamLogon_base(struct pipes_struct *p,
79 break;
80 }
81
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);
85 break;
86 }
87--
882.9.3
89