diff options
author | Neil Brown <neilb@suse.de> | 2008-05-08 13:03:09 +1000 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2008-06-30 15:24:11 -0400 |
commit | 496d6c32d4d057cb44272d9bd587ff97d023ee92 (patch) | |
tree | 5cfe2928782d5c58eab88f7b439b617858618b3f /fs/afs | |
parent | 863a24882ed0a57ff25daaf39885f3a47b706e4b (diff) | |
download | blackbird-op-linux-496d6c32d4d057cb44272d9bd587ff97d023ee92.tar.gz blackbird-op-linux-496d6c32d4d057cb44272d9bd587ff97d023ee92.zip |
nfsd: fix spurious EACCESS in reconnect_path()
Thanks to Frank Van Maarseveen for the original problem report: "A
privileged process on an NFS client which drops privileges after using
them to change the current working directory, will experience incorrect
EACCES after an NFS server reboot. This problem can also occur after
memory pressure on the server, particularly when the client side is
quiet for some time."
This occurs because the filehandle points to a directory whose parents
are no longer in the dentry cache, and we're attempting to reconnect the
directory to its parents without adequate permissions to perform lookups
in the parent directories.
We can therefore fix the problem by acquiring the necessary capabilities
before attempting the reconnection. We do this only in the
no_subtree_check case, since the documented behavior of the
subtree_check export option requires the server to check that the user
has lookup permissions on all parents.
The subtree_check case still has a problem, since reconnect_path()
unnecessarily requires both read and lookup permissions on all parent
directories. However, a fix in that case would be more delicate, and
use of subtree_check is already discouraged for other reasons.
Signed-off-by: Neil Brown <neilb@suse.de>
Cc: Frank van Maarseveen <frankvm@frankvm.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'fs/afs')
0 files changed, 0 insertions, 0 deletions