aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorNeil Brown <neilb@cse.unsw.edu.au>2004-08-22 23:02:52 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-08-22 23:02:52 -0700
commit180faf508c96317bd8e4a971f9242f4f3d96713c (patch)
tree5a6506b0cd4a3a94998e4296496e66a7021f81ab /fs
parent29b7010fcb6dcaac642394d8f55afe21a1eea12a (diff)
downloadhistory-180faf508c96317bd8e4a971f9242f4f3d96713c.tar.gz
[PATCH] knfsd: fix server permission handling
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfsd/vfs.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index 8e242a54676cc9..be03b2734ef5a8 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -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 }
};