diff options
author | Ross Lagerwall <rosslagerwall@gmail.com> | 2014-08-09 15:44:00 +0200 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2014-08-17 18:00:14 +0200 |
commit | 63bab0651be0ba857200219a08644e6a99f448b6 (patch) | |
tree | 17fd443e8c826a601742d107e81d90e5b1be5940 /fs/nfsd/nfs4xdr.c | |
parent | nfsd: call nfs4_put_deleg_lease outside of state_lock (diff) | |
download | linux-63bab0651be0ba857200219a08644e6a99f448b6.tar.xz linux-63bab0651be0ba857200219a08644e6a99f448b6.zip |
nfsd3: Check write permission after checking existence
When creating a file that already exists in a read-only directory with
O_EXCL, the NFSv3 server returns EACCES rather than EEXIST (which local
files and the NFSv4 server return). Fix this by checking the MAY_CREATE
permission only if the file does not exist. Since this already happens
in do_nfsd_create, the check in nfsd3_proc_create can simply be removed.
Signed-off-by: Ross Lagerwall <rosslagerwall@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4xdr.c')
0 files changed, 0 insertions, 0 deletions