diff options
author | Sachin Prabhu <sprabhu@redhat.com> | 2014-12-03 07:26:36 -0500 |
---|---|---|
committer | Steve French <steve.french@primarydata.com> | 2014-12-08 00:43:02 -0500 |
commit | ee9bbf465d8bb82ff2081834cb53a0ea7574c423 (patch) | |
tree | 70249e88b971ed2a70cc4fb788c7b86d4a37cc40 /fs/cifs | |
parent | 0b456f04bcdf5b1151136adaada158bfc26f1be7 (diff) |
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 <sprabhu@redhat.com>
Signed-off-by: Steve French <steve.french@primarydata.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r-- | fs/cifs/sess.c | 5 |
1 files changed, 5 insertions, 0 deletions
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 | |||
@@ -1303,6 +1303,11 @@ sess_auth_rawntlmssp_authenticate(struct sess_data *sess_data) | |||
1303 | if (le16_to_cpu(pSMB->resp.Action) & GUEST_LOGIN) | 1303 | if (le16_to_cpu(pSMB->resp.Action) & GUEST_LOGIN) |
1304 | cifs_dbg(FYI, "Guest login\n"); /* BB mark SesInfo struct? */ | 1304 | cifs_dbg(FYI, "Guest login\n"); /* BB mark SesInfo struct? */ |
1305 | 1305 | ||
1306 | if (ses->Suid != smb_buf->Uid) { | ||
1307 | ses->Suid = smb_buf->Uid; | ||
1308 | cifs_dbg(FYI, "UID changed! new UID = %llu\n", ses->Suid); | ||
1309 | } | ||
1310 | |||
1306 | bytes_remaining = get_bcc(smb_buf); | 1311 | bytes_remaining = get_bcc(smb_buf); |
1307 | bcc_ptr = pByteArea(smb_buf); | 1312 | bcc_ptr = pByteArea(smb_buf); |
1308 | blob_len = le16_to_cpu(pSMB->resp.SecurityBlobLength); | 1313 | blob_len = le16_to_cpu(pSMB->resp.SecurityBlobLength); |