From: NeilBrown 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 Signed-off-by: Neil Brown Signed-off-by: Andrew Morton --- 25-akpm/fs/nfsd/nfs4acl.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletion(-) diff -puN fs/nfsd/nfs4acl.c~nfsd4-dont-set-write_owner-in-either-allow-or-deny-bits fs/nfsd/nfs4acl.c --- 25/fs/nfsd/nfs4acl.c~nfsd4-dont-set-write_owner-in-either-allow-or-deny-bits 2005-03-21 22:50:02.000000000 -0800 +++ 25-akpm/fs/nfsd/nfs4acl.c 2005-03-21 22:50:02.000000000 -0800 @@ -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, uns 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; _