svn commit: linux-cifs-client r97 - in branches/linux-converged-for-old-kernels/fs/cifs: .

sfrench at samba.org sfrench at samba.org
Tue Feb 6 04:09:39 GMT 2007


Author: sfrench
Date: 2007-02-06 04:09:38 +0000 (Tue, 06 Feb 2007)
New Revision: 97

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=97

Log:
Merge with cifs backport-for old kernels - getting closer

Modified:
   branches/linux-converged-for-old-kernels/fs/cifs/CHANGES
   branches/linux-converged-for-old-kernels/fs/cifs/cifsencrypt.c
   branches/linux-converged-for-old-kernels/fs/cifs/cifsglob.h
   branches/linux-converged-for-old-kernels/fs/cifs/cifspdu.h
   branches/linux-converged-for-old-kernels/fs/cifs/inode.c
   branches/linux-converged-for-old-kernels/fs/cifs/readdir.c


Changeset:
Modified: branches/linux-converged-for-old-kernels/fs/cifs/CHANGES
===================================================================
--- branches/linux-converged-for-old-kernels/fs/cifs/CHANGES	2007-02-06 03:20:54 UTC (rev 96)
+++ branches/linux-converged-for-old-kernels/fs/cifs/CHANGES	2007-02-06 04:09:38 UTC (rev 97)
@@ -5,7 +5,8 @@
 EINVAL on readdir when filldir fails due to overwritten blocksize
 (fixes FC problem).  Return error in rename 2nd attempt retry (ie report
 if rename by handle also fails, after rename by path fails, we were
-not reporting whether the retry worked or not).
+not reporting whether the retry worked or not). Fix NTLMv2 to
+work to Windows servers (mount with option "sec=ntlmv2").
 
 Version 1.45
 ------------

Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifsencrypt.c
===================================================================
--- branches/linux-converged-for-old-kernels/fs/cifs/cifsencrypt.c	2007-02-06 03:20:54 UTC (rev 96)
+++ branches/linux-converged-for-old-kernels/fs/cifs/cifsencrypt.c	2007-02-06 04:09:38 UTC (rev 97)
@@ -372,8 +372,10 @@
 	buf->time = cpu_to_le64(cifs_UnixTimeToNT(CURRENT_TIME));
 	get_random_bytes(&buf->client_chal, sizeof(buf->client_chal));
 	buf->reserved2 = 0;
-	buf->names[0].type = 0;
+	buf->names[0].type = cpu_to_le16(NTLMSSP_DOMAIN_TYPE);
 	buf->names[0].length = 0;
+	buf->names[1].type = 0;
+	buf->names[1].length = 0;
 
 	/* calculate buf->ntlmv2_hash */
 	rc = calc_ntlmv2_hash(ses, nls_cp);

Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifsglob.h
===================================================================
--- branches/linux-converged-for-old-kernels/fs/cifs/cifsglob.h	2007-02-06 03:20:54 UTC (rev 96)
+++ branches/linux-converged-for-old-kernels/fs/cifs/cifsglob.h	2007-02-06 04:09:38 UTC (rev 97)
@@ -69,6 +69,14 @@
 #define XATTR_DOS_ATTRIB "user.DOSATTRIB"
 #endif
 
+#ifndef SLAB_NOFS
+#define SLAB_NOFS GFP_NOFS
+#endif
+
+#ifndef SLAB_KERNEL
+#define SLAB_KERNEL GFP_KERNEL
+#endif
+
 /*
  * This information is kept on every Server we know about.
  *

Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifspdu.h
===================================================================
--- branches/linux-converged-for-old-kernels/fs/cifs/cifspdu.h	2007-02-06 03:20:54 UTC (rev 96)
+++ branches/linux-converged-for-old-kernels/fs/cifs/cifspdu.h	2007-02-06 04:09:38 UTC (rev 97)
@@ -589,6 +589,12 @@
 
 /* format of NLTMv2 Response ie "case sensitive password" hash when NTLMv2 */
 
+#define NTLMSSP_SERVER_TYPE	1
+#define NTLMSSP_DOMAIN_TYPE	2
+#define NTLMSSP_FQ_DOMAIN_TYPE	3
+#define NTLMSSP_DNS_DOMAIN_TYPE	4
+#define NTLMSSP_DNS_PARENT_TYPE	5
+
 struct ntlmssp2_name {
 	__le16 type;
 	__le16 length;
@@ -602,7 +608,7 @@
 	__le64  time;
 	__u64  client_chal; /* random */
 	__u32  reserved2;
-	struct ntlmssp2_name names[1];
+	struct ntlmssp2_name names[2];
 	/* array of name entries could follow ending in minimum 4 byte struct */
 } __attribute__((packed));
 

Modified: branches/linux-converged-for-old-kernels/fs/cifs/inode.c
===================================================================
--- branches/linux-converged-for-old-kernels/fs/cifs/inode.c	2007-02-06 03:20:54 UTC (rev 96)
+++ branches/linux-converged-for-old-kernels/fs/cifs/inode.c	2007-02-06 04:09:38 UTC (rev 97)
@@ -164,9 +164,9 @@
 
 		if (num_of_bytes < end_of_file)
 			cFYI(1, ("allocation size less than end of file"));
-		cFYI(1,
-		     ("Size %ld and blocks %ld",
-		      (unsigned long) inode->i_size, inode->i_blocks));
+		cFYI(1, ("Size %ld and blocks %llu",
+			(unsigned long) inode->i_size,
+			(unsigned long long)inode->i_blocks));
 		if (S_ISREG(inode->i_mode)) {
 			cFYI(1, ("File inode"));
 			inode->i_op = &cifs_file_inode_ops;

Modified: branches/linux-converged-for-old-kernels/fs/cifs/readdir.c
===================================================================
--- branches/linux-converged-for-old-kernels/fs/cifs/readdir.c	2007-02-06 03:20:54 UTC (rev 96)
+++ branches/linux-converged-for-old-kernels/fs/cifs/readdir.c	2007-02-06 04:09:38 UTC (rev 97)
@@ -245,10 +245,9 @@
 
 	if (allocation_size < end_of_file)
 		cFYI(1, ("May be sparse file, allocation less than file size"));
-	cFYI(1,
-	     ("File Size %ld and blocks %ld and blocksize %ld",
-	      (unsigned long)tmp_inode->i_size, tmp_inode->i_blocks,
-	      tmp_inode->i_blksize));
+	cFYI(1, ("File Size %ld and blocks %llu",
+			(unsigned long)tmp_inode->i_size,
+			(unsigned long long)tmp_inode->i_blocks));
 	if (S_ISREG(tmp_inode->i_mode)) {
 		cFYI(1, ("File inode"));
 		tmp_inode->i_op = &cifs_file_inode_ops;



More information about the samba-cvs mailing list