aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/vfs.c
diff options
context:
space:
mode:
authorSteve Dickson <SteveD@redhat.com>2009-09-09 15:06:05 -0400
committerJ. Bruce Fields <bfields@citi.umich.edu>2009-12-15 14:07:24 -0500
commit03a816b46d7eba78da11e4025f0af195b32fa464 (patch)
tree5069e9183dd5535c61bc7eff8a8a03202a19568d /fs/nfsd/vfs.c
parentf2ca7153ca49a407ea1c7232c9fa7e9849f03f9c (diff)
nfsd: restrict filehandles accepted in V4ROOT case
On V4ROOT exports, only accept filehandles that are the *root* of some export. This allows mountd to allow or deny access to individual directories and symlinks on the pseudofilesystem. Note that the checks in readdir and lookup are not enough, since a malicious host with access to the network could guess filehandles that they weren't able to obtain through lookup or readdir. Signed-off-by: Steve Dickson <steved@redhat.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'fs/nfsd/vfs.c')
-rw-r--r--fs/nfsd/vfs.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index a0015a958aef..f6ca32b07e11 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -72,12 +72,6 @@ struct raparm_hbucket {
72#define RAPARM_HASH_MASK (RAPARM_HASH_SIZE-1) 72#define RAPARM_HASH_MASK (RAPARM_HASH_SIZE-1)
73static struct raparm_hbucket raparm_hash[RAPARM_HASH_SIZE]; 73static struct raparm_hbucket raparm_hash[RAPARM_HASH_SIZE];
74 74
75static inline int
76nfsd_v4client(struct svc_rqst *rq)
77{
78 return rq->rq_prog == NFS_PROGRAM && rq->rq_vers == 4;
79}
80
81/* 75/*
82 * Called from nfsd_lookup and encode_dirent. Check if we have crossed 76 * Called from nfsd_lookup and encode_dirent. Check if we have crossed
83 * a mount point. 77 * a mount point.