1 From: Frank Filz <ffilzlnx@us.ibm.com>
2 Date: Wed, 21 Oct 2009 23:45:02 +0000 (-0700)
3 Subject: nfsd: Fix sort_pacl in fs/nfsd/nf4acl.c to actually sort groups
4 X-git-url: http://git.linux-nfs.org/?p=bfields%2Flinux.git;a=commitdiff_plain;h=aba24d71580180dfdf6a1a83a5858a1c048fd785
5 Patch-mainline: not yet
8 Nfsd: Fix sort_pacl in fs/nfsd/nf4acl.c to actually sort groups
10 We have been doing some extensive testing of Linux support for ACLs on
11 NFDS v4. We have noticed that the server rejects ACLs where the groups
12 are out of order, for example, the following ACL is rejected:
15 A::user101@domain:rwaxtcy
17 A:g:group102@domain:rwaxtcy
18 A:g:group101@domain:rwaxtcy
21 Examining the server code, I found that after converting an NFS v4 ACL
22 to POSIX, sort_pacl is called to sort the user ACEs and group ACEs.
23 Unfortunately, a minor bug causes the group sort to be skipped.
25 Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com>
26 Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
27 Acked-by: NeilBrown <neilb@suse.de>
32 fs/nfsd/nfs4acl.c | 2 +-
33 1 file changed, 1 insertion(+), 1 deletion(-)
35 --- linux-2.6.27-SLE11_BRANCH.orig/fs/nfsd/nfs4acl.c
36 +++ linux-2.6.27-SLE11_BRANCH/fs/nfsd/nfs4acl.c
37 @@ -389,7 +389,7 @@ sort_pacl(struct posix_acl *pacl)
38 sort_pacl_range(pacl, 1, i-1);
40 BUG_ON(pacl->a_entries[i].e_tag != ACL_GROUP_OBJ);
43 while (pacl->a_entries[j].e_tag == ACL_GROUP)
45 sort_pacl_range(pacl, i, j-1);