diff options
author | Neil Brown <neilb@cse.unsw.edu.au> | 2005-03-30 17:00:03 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-03-30 17:00:03 -0800 |
commit | b8f610b63dbd01e83fa7c5569f28eabcae6774ab (patch) | |
tree | cae7b06e05f1b6b199002d5fe3486800ee77f3eb | |
parent | 0f33f4432826b4777ae5de2ba86de31ddef6874d (diff) | |
download | history-b8f610b63dbd01e83fa7c5569f28eabcae6774ab.tar.gz |
[PATCH] nfsd4: don't set WRITE_OWNER in either allow or deny bits
WRITE_OWNER should be neither allowed nor denied.
This improves interoperability with Solaris clients and represents our
permissions more accurately.
It breaks compatibility with clients using the old version of the
NFSv4<->POSIX mapping. I believe the only code that did that was older
versions of experimental client-side code available only from our website, so
I prefer not to introduce a hack just to continue support the old mapping.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | fs/nfsd/nfs4acl.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4acl.c b/fs/nfsd/nfs4acl.c index 919891bba8f073..ff52c752351f2e 100644 --- a/fs/nfsd/nfs4acl.c +++ b/fs/nfsd/nfs4acl.c @@ -55,6 +55,9 @@ #define NFS4_ANYONE_MODE (NFS4_ACE_READ_ATTRIBUTES | NFS4_ACE_READ_ACL | NFS4_ACE_SYNCHRONIZE) #define NFS4_OWNER_MODE (NFS4_ACE_WRITE_ATTRIBUTES | NFS4_ACE_WRITE_ACL) +/* We don't support these bits; insist they be neither allowed nor denied */ +#define NFS4_MASK_UNSUPP (NFS4_ACE_DELETE | NFS4_ACE_WRITE_OWNER) + /* flags used to simulate posix default ACLs */ #define NFS4_INHERITANCE_FLAGS (NFS4_ACE_FILE_INHERIT_ACE \ | NFS4_ACE_DIRECTORY_INHERIT_ACE | NFS4_ACE_INHERIT_ONLY_ACE) @@ -83,7 +86,7 @@ mask_from_posix(unsigned short perm, unsigned int flags) static u32 deny_mask(u32 allow_mask, unsigned int flags) { - u32 ret = ~allow_mask & ~NFS4_ACE_DELETE; + u32 ret = ~allow_mask & ~NFS4_MASK_UNSUPP; if (!(flags & NFS4_ACL_DIR)) ret &= ~NFS4_ACE_DELETE_CHILD; return ret; |