Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1407490 > unrolled thread

[PATCH 1/2] cifs: use CIFS_MAX_DOMAINNAME_LEN when converting the domain name

Started by"Jerome Marchand" <jmarchan@redhat.com>
First post2016-05-26 12:00 +0200
Last post2016-05-26 12:00 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/2] cifs: use CIFS_MAX_DOMAINNAME_LEN when converting the domain name "Jerome Marchand" <jmarchan@redhat.com> - 2016-05-26 12:00 +0200

#1407490 — [PATCH 1/2] cifs: use CIFS_MAX_DOMAINNAME_LEN when converting the domain name

From"Jerome Marchand" <jmarchan@redhat.com>
Date2016-05-26 12:00 +0200
Subject[PATCH 1/2] cifs: use CIFS_MAX_DOMAINNAME_LEN when converting the domain name
Message-ID<rD0f7-4Ml-3@gated-at.bofh.it>
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>
---
 fs/cifs/sess.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
index af0ec2d..c3d086e 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);
-- 
2.5.5

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web