[PATCH] nfsacl: Solaris VxFS compatibility fix
commit22c1ea44f0d33eda532883858b6cdabc5f265b66
authorAndreas Gruenbacher <agruen@suse.de>
Tue, 11 Oct 2005 15:29:05 +0000 (11 08:29 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 11 Oct 2005 16:46:54 +0000 (11 09:46 -0700)
tree8af9c20a09e9ce9d497ec3db078d872b74a9c3ab
parent19cba8abd6ca09527c194864ae651db65cbacfe1
[PATCH] nfsacl: Solaris VxFS compatibility fix

Here is a compatibility fix between Linux and Solaris when used with VxFS
filesystems: Solaris usually accepts acl entries in any order, but with
VxFS it replies with NFSERR_INVAL when it sees a four-entry acl that is not
in canonical form.  It may also fail with other non-canonical acls -- I
can't tell, because that case never triggers: We only send non-canonical
acls when we fake up an ACL_MASK entry.

Instead of adding fake ACL_MASK entries at the end, inserting them in the
correct position makes Solaris+VxFS happy.  The Linux client and server
sides don't care about entry order.  The three-entry-acl special case in
which we need a fake ACL_MASK entry was handled in xdr_nfsace_encode.  The
patch moves this into nfsacl_encode.

Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Acked-by: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/nfs_common/nfsacl.c