]> git.hungrycats.org Git - linux/commitdiff
[PATCH] knfsd: fix server permission handling
authorNeil Brown <neilb@cse.unsw.edu.au>
Mon, 23 Aug 2004 06:02:52 +0000 (23:02 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 23 Aug 2004 06:02:52 +0000 (23:02 -0700)
Fix a problem wherein device nodes on a ro-exported mount cannot be opened
read/write.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/nfsd/vfs.c

index 8e242a54676cc90b98dffd6cb081424324bd4c8c..be03b2734ef5a8e5c22fb31af4e0ceccbbac2dc2 100644 (file)
@@ -559,12 +559,13 @@ static struct accessmap   nfs3_anyaccess[] = {
         * to the server to check for access for things like /dev/null
         * (which really, the server doesn't care about).  So
         * We provide simple access checking for them, looking
-        * mainly at mode bits
+        * mainly at mode bits, and we make sure to ignore read-only
+        * filesystem checks
         */
     {  NFS3_ACCESS_READ,       MAY_READ                        },
     {  NFS3_ACCESS_EXECUTE,    MAY_EXEC                        },
-    {  NFS3_ACCESS_MODIFY,     MAY_WRITE                       },
-    {  NFS3_ACCESS_EXTEND,     MAY_WRITE                       },
+    {  NFS3_ACCESS_MODIFY,     MAY_WRITE|MAY_LOCAL_ACCESS      },
+    {  NFS3_ACCESS_EXTEND,     MAY_WRITE|MAY_LOCAL_ACCESS      },
 
     {  0,                      0                               }
 };