Jeff Layton
1ccdd6c6e9
nfsd: do nfs4_check_fh in nfs4_check_file instead of nfs4_check_olstateid
...
commit 8fcd461db7 upstream.
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 >
[bfields: moved fh check to avoid NULL deref in special stateid case]
Signed-off-by: J. Bruce Fields <bfields@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2015-08-16 20:52:27 -07:00
..
2015-08-03 09:29:18 -07:00
2015-04-26 17:22:07 -07:00
2015-04-26 17:22:07 -07:00
2015-04-15 15:06:57 -04:00
2015-04-15 15:06:57 -04:00
2015-04-26 17:22:07 -07:00
2015-04-26 17:22:07 -07:00
2015-08-03 09:29:14 -07:00
2015-04-15 15:06:59 -04:00
2015-04-26 17:22:07 -07:00
2015-05-20 13:25:55 -05:00
2015-04-15 15:06:57 -04:00
2015-07-21 10:10:01 -07:00
2015-07-21 10:10:01 -07:00
2015-04-15 15:06:57 -04:00
2015-04-15 15:06:57 -04:00
2015-05-06 10:57:37 -07:00
2015-04-15 15:06:57 -04:00
2015-04-15 15:06:57 -04:00
2015-04-26 17:22:07 -07:00
2015-04-26 17:22:07 -07:00
2015-08-03 09:29:00 -07:00
2015-05-04 14:15:16 -07:00
2015-04-26 17:22:07 -07:00
2015-04-15 15:06:57 -04:00
2015-08-03 09:29:14 -07:00
2015-04-26 17:22:07 -07:00
2015-04-26 17:22:07 -07:00
2015-04-26 17:22:07 -07:00
2015-05-04 14:50:29 +02:00
2015-08-03 09:29:19 -07:00
2015-04-15 15:06:57 -04:00
2015-04-26 17:22:07 -07:00
2015-04-15 15:06:57 -04:00
2015-08-03 09:29:00 -07:00
2015-04-26 17:22:07 -07:00
2015-04-26 17:22:07 -07:00
2015-07-21 10:10:00 -07:00
2015-04-21 16:16:02 -04:00
2015-04-15 15:06:57 -04:00
2015-04-15 15:06:57 -04:00
2015-04-15 15:06:57 -04:00
2015-08-10 12:21:58 -07:00
2015-08-16 20:52:27 -07:00
2015-05-05 17:10:11 -07:00
2015-08-16 20:52:09 -07:00
2015-04-15 15:06:57 -04:00
2015-08-16 20:52:22 -07:00
2015-05-28 18:25:19 -07:00
2015-08-03 09:29:16 -07:00
2015-07-21 10:10:01 -07:00
2015-07-21 10:10:01 -07:00
2015-04-15 15:06:57 -04:00
2015-04-26 17:22:07 -07:00
2015-04-15 15:06:57 -04:00
2015-04-26 17:22:07 -07:00
2015-04-11 22:29:40 -04:00
2015-04-15 15:06:57 -04:00
2015-07-21 10:10:01 -07:00
2015-04-15 15:06:57 -04:00
2015-07-21 10:10:01 -07:00
2015-04-26 17:22:07 -07:00
2015-04-26 17:22:07 -07:00
2015-07-10 09:49:39 -07:00
2015-08-10 12:21:59 -07:00
2015-04-16 23:27:56 -04:00
2015-05-28 18:25:18 -07:00
2015-04-26 17:22:07 -07:00
2015-04-24 15:45:28 -04:00
2015-04-14 16:49:01 -07:00
2015-04-03 23:21:34 +02:00
2015-04-11 22:29:39 -04:00
2015-04-26 17:22:07 -07:00
2015-08-10 12:21:51 -07:00
2015-04-24 15:45:28 -04:00
2015-05-12 22:03:44 +02:00
2015-06-02 10:29:07 -07:00
2015-04-11 22:29:43 -04:00
2015-04-17 09:04:07 -04:00
2015-04-09 11:39:55 -05:00
2015-03-17 12:23:32 -04:00
2015-07-10 09:49:37 -07:00
2015-04-10 15:08:35 -07:00
2015-04-14 16:49:05 -07:00
2015-07-21 10:10:00 -07:00
2015-04-17 09:04:12 -04:00
2015-04-14 10:22:29 -07:00
2015-05-09 00:12:48 -04:00
2015-08-10 12:21:55 -07:00
2015-04-15 15:06:58 -04:00
2015-04-24 07:08:41 -07:00
2015-04-15 15:06:58 -04:00
2015-04-02 20:34:20 -05:00
2015-08-10 12:21:54 -07:00
2015-04-15 15:06:59 -04:00
2015-04-11 22:29:46 -04:00
2015-08-16 20:52:25 -07:00
2015-05-06 09:27:41 -06:00
2015-04-15 15:06:59 -04:00
2015-04-14 16:49:03 -07:00