[kernel] r6658 - dists/sarge-security/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches

Dann Frazier dannf at costa.debian.org
Sun May 21 06:14:45 UTC 2006


Author: dannf
Date: Sun May 21 06:14:44 2006
New Revision: 6658

Modified:
   dists/sarge-security/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/cifs-chroot-escape.dpatch

Log:
hopefully fix a build issue due to backporting a cifs fix to a cifs version
w/o posix compliance


Modified: dists/sarge-security/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/cifs-chroot-escape.dpatch
==============================================================================
--- dists/sarge-security/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/cifs-chroot-escape.dpatch	(original)
+++ dists/sarge-security/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/cifs-chroot-escape.dpatch	Sun May 21 06:14:44 2006
@@ -13,24 +13,32 @@
 Signed-off-by: Steve French  <sfrench at us.ibm.com>
 ---
 
---- a/fs/cifs/dir.c
-+++ b/fs/cifs/dir.c
-@@ -436,6 +436,20 @@ cifs_lookup(struct inode *parent_dir_ino
+# backported to Debian's 2.6.8 by dann frazier <dannf at debian.org>
+
+diff -urpN kernel-source-2.6.8.orig/fs/cifs/dir.c kernel-source-2.6.8/fs/cifs/dir.c
+--- kernel-source-2.6.8.orig/fs/cifs/dir.c	2004-08-14 00:37:15.000000000 -0500
++++ kernel-source-2.6.8/fs/cifs/dir.c	2006-05-21 01:12:24.809254736 -0500
+@@ -386,7 +386,7 @@ int cifs_mknod(struct inode *inode, stru
+ struct dentry *
+ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry, struct nameidata *nd)
+ {
+-	int xid;
++	int i, xid;
+ 	int rc = 0; /* to get around spurious gcc warning, set to zero here */
+ 	struct cifs_sb_info *cifs_sb;
+ 	struct cifsTconInfo *pTcon;
+@@ -409,6 +409,16 @@ cifs_lookup(struct inode *parent_dir_ino
  	cifs_sb = CIFS_SB(parent_dir_inode->i_sb);
  	pTcon = cifs_sb->tcon;
  
 +	/*
 +	 * Don't allow the separator character in a path component.
-+	 * The VFS will not allow "/", but "\" is allowed by posix.
 +	 */
-+	if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS)) {
-+		int i;
-+		for (i = 0; i < direntry->d_name.len; i++)
-+			if (direntry->d_name.name[i] == '\\') {
-+				cFYI(1, ("Invalid file name"));
-+				FreeXid(xid);
-+				return ERR_PTR(-EINVAL);
-+			}
++	for (i = 0; i < direntry->d_name.len; i++)
++	       if (direntry->d_name.name[i] == '\\') {
++	               cFYI(1, ("Invalid file name"));
++		       FreeXid(xid);
++		       return ERR_PTR(-EINVAL);
 +	}
 +
  	/* can not grab the rename sem here since it would



More information about the Kernel-svn-changes mailing list