android_kernel_xiaomi_sm8350/fs/nfsd
J. Bruce Fields dc730e1737 [PATCH] knfsd: nfsd4: fix owner-override on open
If a client creates a file using an open which sets the mode to 000, or if a
chmod changes permissions after a file is opened, then situations may arise
where an NFS client knows that some IO is permitted (because a process holds
the file open), but the NFS server does not (because it doesn't know about the
open, and only sees that the IO conflicts with the current mode of the file).

As a hack to solve this problem, NFS servers normally allow the owner to
override permissions on IO.  The client can still enforce correct
permissions-checking on open by performing an explicit access check.

In NFSv4 the client can rely on the explicit on-the-wire open instead of an
access check.

Therefore we should not be allowing the owner to override permissions on an
over-the-wire open!

However, we should still allow the owner to override permissions in the case
where the client is claiming an open that it already made either before a
reboot, or while it was holding a delegation.

Thanks to Jim Rees for reporting the bug.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-17 08:18:45 -07:00
..
auth.c
export.c [PATCH] knfsd: nfsd4: fslocations data structures 2006-10-04 07:55:22 -07:00
lockd.c
Makefile
nfs2acl.c [PATCH] knfsd: register all RPC programs with portmapper by default 2006-10-04 07:55:19 -07:00
nfs3acl.c [PATCH] knfsd: register all RPC programs with portmapper by default 2006-10-04 07:55:19 -07:00
nfs3proc.c [PATCH] knfsd: Prepare knfsd for support of rsize/wsize of up to 1MB, over TCP 2006-10-04 07:55:16 -07:00
nfs3xdr.c [PATCH] knfsd: Prepare knfsd for support of rsize/wsize of up to 1MB, over TCP 2006-10-04 07:55:16 -07:00
nfs4acl.c [PATCH] knfsd: nfsd4: acls: fix handling of zero-length acls 2006-10-04 07:55:20 -07:00
nfs4callback.c [PATCH] knfsd: add some missing newlines in printks 2006-10-02 07:57:17 -07:00
nfs4idmap.c
nfs4proc.c [PATCH] knfsd: nfsd4: fix owner-override on open 2006-10-17 08:18:45 -07:00
nfs4recover.c [PATCH] VFS: Make filldir_t and struct kstat deal in 64-bit inode numbers 2006-10-03 08:03:40 -07:00
nfs4state.c [PATCH] Really ignore kmem_cache_destroy return value 2006-09-27 08:26:10 -07:00
nfs4xdr.c [PATCH] knfsd: nfsd4: actually use all the pieces to implement referrals 2006-10-04 07:55:23 -07:00
nfscache.c
nfsctl.c [PATCH] knfsd: Allow max size of NFSd payload to be configured 2006-10-04 07:55:16 -07:00
nfsfh.c
nfsproc.c [PATCH] knfsd: Prepare knfsd for support of rsize/wsize of up to 1MB, over TCP 2006-10-04 07:55:16 -07:00
nfssvc.c [PATCH] knfsd: tidy up up meaning of 'buffer size' in nfsd/sunrpc 2006-10-06 08:53:41 -07:00
nfsxdr.c [PATCH] knfsd: Prepare knfsd for support of rsize/wsize of up to 1MB, over TCP 2006-10-04 07:55:16 -07:00
stats.c
vfs.c [PATCH] knfsd: nfsd4: acls: fix handling of zero-length acls 2006-10-04 07:55:20 -07:00