linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] cifs: use CIFS_MAX_DOMAINNAME_LEN when converting the domain name
@ 2016-05-26  9:52 Jerome Marchand
  2016-05-26  9:52 ` [PATCH 2/2] cifs: dynamic allocation of ntlmssp blob Jerome Marchand
  0 siblings, 1 reply; 4+ messages in thread
From: Jerome Marchand @ 2016-05-26  9:52 UTC (permalink / raw)
  To: Steve French
  Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA,
	samba-technical-w/Ol4Ecudpl8XjKLYN78aQ,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

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-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-05-26 18:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-26  9:52 [PATCH 1/2] cifs: use CIFS_MAX_DOMAINNAME_LEN when converting the domain name Jerome Marchand
2016-05-26  9:52 ` [PATCH 2/2] cifs: dynamic allocation of ntlmssp blob Jerome Marchand
     [not found]   ` <1464256345-26131-2-git-send-email-jmarchan-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-05-26 18:30     ` Steve French
     [not found]       ` <CAH2r5mtCoqUWfRz9CF5jg6QdFy_sFgd5-2ZomLs_xaDDC_uydg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-05-26 18:31         ` Steve French

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).