diff options
author | Jeff Layton <jlayton@poochiereds.net> | 2015-07-30 06:57:46 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2015-07-31 16:30:26 -0400 |
commit | 8fcd461db7c09337b6d2e22d25eb411123f379e3 (patch) | |
tree | 85e3bea7f6c723cb1bc1a2d0deca9bca98a83fd0 /fs/mbcache.c | |
parent | 1ca4b88e7de23f6f86d2009101fe42d5b9dbf3de (diff) | |
download | linux-8fcd461db7c09337b6d2e22d25eb411123f379e3.tar.bz2 |
nfsd: do nfs4_check_fh in nfs4_check_file instead of nfs4_check_olstateid
Currently, preprocess_stateid_op calls nfs4_check_olstateid which
verifies that the open stateid corresponds to the current filehandle in the
call by calling nfs4_check_fh.
If the stateid is a NFS4_DELEG_STID however, then no such check is done.
This could cause incorrect enforcement of permissions, because the
nfsd_permission() call in nfs4_check_file uses current the current
filehandle, but any subsequent IO operation will use the file descriptor
in the stateid.
Move the call to nfs4_check_fh into nfs4_check_file instead so that it
can be done for all stateid types.
Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
Cc: stable@vger.kernel.org
[bfields: moved fh check to avoid NULL deref in special stateid case]
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/mbcache.c')
0 files changed, 0 insertions, 0 deletions