nfsd: restrict filehandles accepted in V4ROOT case
authorSteve Dickson <SteveD@redhat.com>
Wed, 9 Sep 2009 19:06:05 +0000 (15:06 -0400)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Tue, 15 Dec 2009 19:07:24 +0000 (14:07 -0500)
commit03a816b46d7eba78da11e4025f0af195b32fa464
tree5069e9183dd5535c61bc7eff8a8a03202a19568d
parentf2ca7153ca49a407ea1c7232c9fa7e9849f03f9c
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>
fs/nfsd/nfsd.h
fs/nfsd/nfsfh.c
fs/nfsd/vfs.c