mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-21 11:13:30 +00:00
Map VAPPEND to VWRITE in nfsspec_access() - VAPPEND is never set in the
mode returned by VOP_GETATTR. This fixes incorrect "Permission denied" errors when trying to append to a file on an NFSv2 mount.
This commit is contained in:
parent
ea0d04f36e
commit
9ba703c024
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=112455
@ -2983,6 +2983,13 @@ nfsspec_access(struct vop_access_args *ap)
|
||||
int i;
|
||||
int error;
|
||||
|
||||
/*
|
||||
* Map VAPPEND to VWRITE; NFSv2 does not understand the concept
|
||||
* of append-only files. XXX What about VADMIN and VSTAT?
|
||||
*/
|
||||
if (mode & VAPPEND)
|
||||
mode = (mode & ~VAPPEND) | VWRITE;
|
||||
|
||||
/*
|
||||
* Disallow write attempts on filesystems mounted read-only;
|
||||
* unless the file is a socket, fifo, or a block or character
|
||||
|
Loading…
Reference in New Issue
Block a user