Commit fa8f3a35 authored by Stefan Metzmacher's avatar Stefan Metzmacher Committed by Steve French

fs/cifs: correctly to anonymous authentication for the LANMAN authentication

Only server which map unknown users to guest will allow
access using a non-null LMChallengeResponse.

For Samba it's the "map to guest = bad user" option.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11913Signed-off-by: default avatarStefan Metzmacher <metze@samba.org>
CC: Stable <stable@vger.kernel.org>
Signed-off-by: default avatarSteve French <smfrench@gmail.com>
parent cfda35d9
...@@ -678,6 +678,7 @@ sess_auth_lanman(struct sess_data *sess_data) ...@@ -678,6 +678,7 @@ sess_auth_lanman(struct sess_data *sess_data)
pSMB->req.hdr.Flags2 &= ~SMBFLG2_UNICODE; pSMB->req.hdr.Flags2 &= ~SMBFLG2_UNICODE;
if (ses->user_name != NULL) {
/* no capabilities flags in old lanman negotiation */ /* no capabilities flags in old lanman negotiation */
pSMB->old_req.PasswordLength = cpu_to_le16(CIFS_AUTH_RESP_SIZE); pSMB->old_req.PasswordLength = cpu_to_le16(CIFS_AUTH_RESP_SIZE);
...@@ -692,6 +693,9 @@ sess_auth_lanman(struct sess_data *sess_data) ...@@ -692,6 +693,9 @@ sess_auth_lanman(struct sess_data *sess_data)
memcpy(bcc_ptr, (char *)lnm_session_key, CIFS_AUTH_RESP_SIZE); memcpy(bcc_ptr, (char *)lnm_session_key, CIFS_AUTH_RESP_SIZE);
bcc_ptr += CIFS_AUTH_RESP_SIZE; bcc_ptr += CIFS_AUTH_RESP_SIZE;
} else {
pSMB->old_req.PasswordLength = 0;
}
/* /*
* can not sign if LANMAN negotiated so no need * can not sign if LANMAN negotiated so no need
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment