linux-stable-rt/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
..
Kconfig
Makefile
acl.h
auth.c
auth.h
cache.h
export.c
idmap.h
lockd.c nfsd: fix auth_domain reference leak on nlm operations 2011-03-24 23:11:27 -04:00
nfs2acl.c
nfs3acl.c
nfs3proc.c
nfs3xdr.c Fix common misspellings 2011-03-31 11:26:23 -03:00
nfs4acl.c
nfs4callback.c
nfs4idmap.c
nfs4proc.c
nfs4recover.c
nfs4state.c nfsd4: Fix filp leak 2011-04-19 17:31:13 -04:00
nfs4xdr.c
nfscache.c
nfsctl.c
nfsd.h
nfsfh.c
nfsfh.h
nfsproc.c
nfssvc.c
nfsxdr.c Fix common misspellings 2011-03-31 11:26:23 -03:00
state.h
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
xdr.h
xdr3.h
xdr4.h