-
Notifications
You must be signed in to change notification settings - Fork 0
/
Set-UID-in-sess_auth_rawntlmssp_authenticate-too.patch
47 lines (40 loc) · 1.58 KB
/
Set-UID-in-sess_auth_rawntlmssp_authenticate-too.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
From: Sachin Prabhu <[email protected]>
Date: Wed, 3 Dec 2014 12:26:36 +0000
Subject: [PATCH] Set UID in sess_auth_rawntlmssp_authenticate too
A user complained that they were unable to login to their cifs share
after a kernel update. From the wiretrace we can see that the server
returns different UIDs as response to NTLMSSP_NEGOTIATE and NTLMSSP_AUTH
phases.
With changes in the authentication code, we no longer set the
cifs_sess->Suid returned in response to the NTLM_AUTH phase and continue
to use the UID sent in response to the NTLMSSP_NEGOTIATE phase. This
results in the server denying access to the user when the user attempts
to do a tcon connect.
See https://bugzilla.redhat.com/show_bug.cgi?id=1163927
A test kernel containing patch was tested successfully by the user.
Signed-off-by: Sachin Prabhu <[email protected]>
Signed-off-by: Steve French <[email protected]>
---
fs/cifs/sess.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
index 57db63ff88da..446cb7fb3f58 100644
--- a/fs/cifs/sess.c
+++ b/fs/cifs/sess.c
@@ -902,8 +902,12 @@
action = le16_to_cpu(pSMB->resp.Action);
if (action & GUEST_LOGIN)
cFYI(1, "Guest login"); /* BB mark SesInfo struct? */
- ses->Suid = smb_buf->Uid; /* UID left in wire format (le) */
- cFYI(1, "UID = %d ", ses->Suid);
+
+ if (ses->Suid != smb_buf->Uid) {
+ ses->Suid = smb_buf->Uid;
+ cFYI(1, "UID changed! new UID = %d ", ses->Suid);
+ }
+
/* response can have either 3 or 4 word count - Samba sends 3 */
/* and lanman response is 3 */
bytes_remaining = get_bcc(smb_buf);
--
2.1.0