nfsd4: don't continue "under" mounts in V4ROOT case
authorJ. Bruce Fields <bfields@citi.umich.edu>
Mon, 26 Oct 2009 01:18:19 +0000 (21:18 -0400)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Tue, 15 Dec 2009 19:07:23 +0000 (14:07 -0500)
commit3b6cee7bc4b2f7858e9202293104acda8826bb68
tree52a1775073ef330a307ec6d81bc2da4d419a71b4
parenteb4c86c6a5adec423c9e615d4937fdddd06a16c5
nfsd4: don't continue "under" mounts in V4ROOT case

If /A/mount/point/ has filesystem "B" mounted on top of it, and if "A"
is exported, but not "B", then the nfs server has always returned to the
client a filehandle for the mountpoint, instead of for the root of "B",
allowing the client to see the subtree of "A" that would otherwise be
hidden by B.

Disable this behavior in the case of V4ROOT exports; we implement the
path restrictions of V4ROOT exports by treating *every* directory as if
it were a mountpoint, and allowing traversal *only* if the new directory
is exported.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
fs/nfsd/vfs.c