aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJerome Marchand <jmarchan@redhat.com>2016-05-26 11:52:24 +0200
committerSteve French <smfrench@gmail.com>2016-06-23 23:44:56 -0500
commit202d772ba02b1deb8835a631cd8255943d1906a0 (patch)
treeb75d9bb01a6ee28c30d75d0bbac4f9837a38c135 /fs
parentcifs: stuff the fl_owner into "pid" field in the lock request (diff)
downloadlinux-dev-202d772ba02b1deb8835a631cd8255943d1906a0.tar.xz
linux-dev-202d772ba02b1deb8835a631cd8255943d1906a0.zip
cifs: use CIFS_MAX_DOMAINNAME_LEN when converting the domain name
Currently in build_ntlmssp_auth_blob(), when converting the domain name to UTF16, CIFS_MAX_USERNAME_LEN limit is used. It should be CIFS_MAX_DOMAINNAME_LEN. This patch fixes this. Signed-off-by: Jerome Marchand <jmarchan@redhat.com> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/sess.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
index af0ec2d5ad0e..c3d086e2bd56 100644
--- a/fs/cifs/sess.c
+++ b/fs/cifs/sess.c
@@ -430,7 +430,7 @@ int build_ntlmssp_auth_blob(unsigned char *pbuffer,
} else {
int len;
len = cifs_strtoUTF16((__le16 *)tmp, ses->domainName,
- CIFS_MAX_USERNAME_LEN, nls_cp);
+ CIFS_MAX_DOMAINNAME_LEN, nls_cp);
len *= 2; /* unicode is 2 bytes each */
sec_blob->DomainName.BufferOffset = cpu_to_le32(tmp - pbuffer);
sec_blob->DomainName.Length = cpu_to_le16(len);