diff -uNr linux-2.6.18.x86_64/fs/cifs/cifsencrypt.c linux-2.6.18.x86_64.new/fs/cifs/cifsencrypt.c --- linux-2.6.18.x86_64/fs/cifs/cifsencrypt.c 2009-01-27 12:52:48.000000000 +0100 +++ linux-2.6.18.x86_64.new/fs/cifs/cifsencrypt.c 2009-01-27 13:20:20.000000000 +0100 @@ -293,6 +293,10 @@ if ((ses->server->secMode & SECMODE_PW_ENCRYPT) == 0) if (extended_security & CIFSSEC_MAY_PLNTXT) { +/* https://bugzilla.samba.org/attachment.cgi?id=3511&action=view + from https://bugzilla.samba.org/show_bug.cgi?id=5319 + Tru 2009/01/27 */ + memset(lnm_session_key, 0, CIFS_SESS_KEY_SIZE); memcpy(lnm_session_key, password_with_pad, CIFS_ENCPWD_SIZE); return; diff -uNr linux-2.6.18.x86_64/fs/cifs/sess.c linux-2.6.18.x86_64.new/fs/cifs/sess.c --- linux-2.6.18.x86_64/fs/cifs/sess.c 2009-01-27 12:52:48.000000000 +0100 +++ linux-2.6.18.x86_64.new/fs/cifs/sess.c 2009-01-27 13:21:07.000000000 +0100 @@ -385,6 +385,10 @@ if (type == LANMAN) { #ifdef CONFIG_CIFS_WEAK_PW_HASH char lnm_session_key[CIFS_SESS_KEY_SIZE]; +/* https://bugzilla.samba.org/attachment.cgi?id=3511&action=view + from https://bugzilla.samba.org/show_bug.cgi?id=5319 + Tru 2009/01/27 */ + pSMB->req.hdr.Flags2 &= ~SMBFLG2_UNICODE; /* no capabilities flags in old lanman negotiation */