nfsd: Fix sort_pacl in fs/nfsd/nf4acl.c to actually sort groups
authorFrank Filz <ffilzlnx@us.ibm.com>
Wed, 21 Oct 2009 23:45:02 +0000 (16:45 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 28 Jan 2010 23:01:13 +0000 (15:01 -0800)
commit34911bf2037c212644cc6b3e2e3207af4e763df7
tree97329fb802deadfc6e772a30e9d8c03510b62d2f
parenta9238ce3bb0fda6e760780b702c6cbd3793087d3
nfsd: Fix sort_pacl in fs/nfsd/nf4acl.c to actually sort groups

commit aba24d71580180dfdf6a1a83a5858a1c048fd785 upstream.

We have been doing some extensive testing of Linux support for ACLs on
NFDS v4. We have noticed that the server rejects ACLs where the groups
are out of order, for example, the following ACL is rejected:

A::OWNER@:rwaxtTcCy
A::user101@domain:rwaxtcy
A::GROUP@:rwaxtcy
A:g:group102@domain:rwaxtcy
A:g:group101@domain:rwaxtcy
A::EVERYONE@:rwaxtcy

Examining the server code, I found that after converting an NFS v4 ACL
to POSIX, sort_pacl is called to sort the user ACEs and group ACEs.
Unfortunately, a minor bug causes the group sort to be skipped.

Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/nfsd/nfs4acl.c