r1306 - in trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian: . patches

Christoph Hellwig hch-guest@haydn.debian.org
Wed, 25 Aug 2004 04:28:38 -0600


Author: hch-guest
Date: 2004-08-25 04:28:25 -0600 (Wed, 25 Aug 2004)
New Revision: 1306

Added:
   trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/nfsd-subtreecheck-nostale.dpatch
Modified:
   trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog
   trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/00list-3
Log:

  * Fix nfsd to not errornously return ESTALE on failed permission check
    (closes: #255931) (Christoph Hellwig).



Modified: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog	2004-08-25 10:24:43 UTC (rev 1305)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog	2004-08-25 10:28:25 UTC (rev 1306)
@@ -36,6 +36,9 @@
 
   * Add minix block accounting fix (Christoph Hellwig).
 
+  * Fix nfsd to not errornously return ESTALE on failed permission check
+    (closes: #255931) (Christoph Hellwig).
+
  -- Andres Salomon <dilinger@voxel.net>  Wed, 18 Aug 2004 02:13:56 -0400
 
 kernel-source-2.6.8 (2.6.8-2) unstable; urgency=high

Modified: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/00list-3
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/00list-3	2004-08-25 10:24:43 UTC (rev 1305)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/00list-3	2004-08-25 10:28:25 UTC (rev 1306)
@@ -40,3 +40,4 @@
 drivers-scsi-sym_2-dv-hang
 cciss-update
 minix-block-accounting-fix
+nfsd-subtreecheck-nostale

Added: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/nfsd-subtreecheck-nostale.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/nfsd-subtreecheck-nostale.dpatch	2004-08-25 10:24:43 UTC (rev 1305)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/nfsd-subtreecheck-nostale.dpatch	2004-08-25 10:28:25 UTC (rev 1306)
@@ -0,0 +1,32 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR@EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: don't return ESTALE for wrong permissions on NFS server
+## DP: Patch author: Olaf Kirch <okir@suse.de>
+## DP: Upstream status: upstream wants a better fix
+## DP: Discussion URL: http://marc.theaimsgroup.com/?t=109286045700001&r=1&w=2
+## DP: BTS: #255931
+
+. $(dirname $0)/DPATCH
+
+@DPATCH@
+--- linux-2.6.5/fs/exportfs/expfs.c.nostale	2004-04-04 05:37:44.000000000 +0200
++++ linux-2.6.5/fs/exportfs/expfs.c	2004-04-30 10:32:19.000000000 +0200
+@@ -278,7 +278,15 @@
+ 
+ 	/* drat - I just cannot find anything acceptable */
+ 	dput(result);
+-	return ERR_PTR(-ESTALE);
++
++	/* Originally, we would return ESTALE here. This is not
++	 * correct, however, as the file handle is valid; it just
++	 * failed our acceptance test.
++	 * This will lead to unexpected results in the client if
++	 * there are two processes accessing the same file; one
++	 * with proper permissions and one without.
++	 */
++	return ERR_PTR(-EACCES);
+ 
+  err_target:
+ 	dput(target_dir);