Skip to content

Commit

Permalink
[CIFS] Turn off Unicode during session establishment for plaintext au…
Browse files Browse the repository at this point in the history
…thentication

LANMAN session setup did not support Unicode (after session setup, unicode can
still be used though).

Fixes samba bug# 5319

CC: Jeff Layton <jlayton@redhat.com>
CC: Stable Kernel <stable@vger.kernel.org>
Signed-off-by: Steve French <sfrench@us.ibm.com>
  • Loading branch information
Steve French committed Aug 28, 2008
1 parent 2e65502 commit c76da9d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/cifs/sess.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,8 @@ CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, int first_time,
#ifdef CONFIG_CIFS_WEAK_PW_HASH
char lnm_session_key[CIFS_SESS_KEY_SIZE];

pSMB->req.hdr.Flags2 &= ~SMBFLG2_UNICODE;

/* no capabilities flags in old lanman negotiation */

pSMB->old_req.PasswordLength = cpu_to_le16(CIFS_SESS_KEY_SIZE);
Expand Down

0 comments on commit c76da9d

Please sign in to comment.