android_kernel_xiaomi_sm8350/fs/nfsd
Sachin Prabhu 1574dff899 Open with O_CREAT flag set fails to open existing files on non writable directories
An open on a NFS4 share using the O_CREAT flag on an existing file for
which we have permissions to open but contained in a directory with no
write permissions will fail with EACCES.

A tcpdump shows that the client had set the open mode to UNCHECKED which
indicates that the file should be created if it doesn't exist and
encountering an existing flag is not an error. Since in this case the
file exists and can be opened by the user, the NFS server is wrong in
attempting to check create permissions on the parent directory.

The patch adds a conditional statement to check for create permissions
only if the file doesn't exist.

Signed-off-by: Sachin S. Prabhu <sprabhu@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
2011-04-20 11:03:01 -04:00
..
acl.h nfsd4: remove outdated pathname-comments 2011-01-04 18:22:10 -05:00
auth.c
auth.h
cache.h
export.c nfsd: kill unused macro definition 2011-03-07 12:05:09 -05:00
idmap.h nfsd4: return nfs errno from name_to_id functions 2011-01-04 18:22:11 -05:00
Kconfig lockd: push lock_flocks down 2010-10-27 21:39:39 +02:00
lockd.c nfsd: fix auth_domain reference leak on nlm operations 2011-03-24 23:11:27 -04:00
Makefile
nfs2acl.c
nfs3acl.c
nfs3proc.c nfsd: fix offset printk's in nfsd3 read/write 2010-12-17 15:48:18 -05:00
nfs3xdr.c Fix common misspellings 2011-03-31 11:26:23 -03:00
nfs4acl.c nfsd4: move idmap and acl header files into fs/nfsd 2011-01-04 18:22:09 -05:00
nfs4callback.c NFSD: fix decode_cb_sequence4resok 2011-02-22 15:55:09 -08:00
nfs4idmap.c nfsd: kill unused macro definition 2011-03-07 12:05:09 -05:00
nfs4proc.c nfsd41: modify the members value of nfsd4_op_flags 2011-03-07 12:10:33 -05:00
nfs4recover.c nfsd4: fix mixed 4.0/4.1 handling, 4.1 reboot 2010-12-17 15:48:01 -05:00
nfs4state.c nfsd4: Fix filp leak 2011-04-19 17:31:13 -04:00
nfs4xdr.c nfsd: wrong index used in inner loop 2011-03-17 13:09:19 -04:00
nfscache.c
nfsctl.c nfsd: fix compile error 2011-03-14 20:57:44 -04:00
nfsd.h nfsd4: name->id mapping should fail with BADOWNER not BADNAME 2011-01-04 18:21:36 -05:00
nfsfh.c
nfsfh.h nfsd: fix BUG at fs/nfsd/nfsfh.h:199 on unlink 2010-10-13 15:48:55 -04:00
nfsproc.c nfsd4: return nfs errno from name_to_id functions 2011-01-04 18:22:11 -05:00
nfssvc.c svcrpc: simpler request dropping 2011-01-04 16:49:22 -05:00
nfsxdr.c Fix common misspellings 2011-03-31 11:26:23 -03:00
state.h nfsd4: fix comment and remove unused nfsd4_file fields 2011-03-17 12:52:33 -04:00
stats.c
vfs.c Open with O_CREAT flag set fails to open existing files on non writable directories 2011-04-20 11:03:01 -04:00
vfs.h nfsd: minor nfsd read api cleanup 2010-07-30 12:54:54 -04:00
xdr3.h
xdr4.h nfsd4: set sequence flag when backchannel is down 2011-01-11 15:04:10 -05:00
xdr.h