]> git.ipfire.org Git - ipfire-2.x.git/blob - src/patches/suse-2.6.27.39/patches.fixes/nfsd-acl.patch
Fix oinkmaster patch.
[ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.fixes / nfsd-acl.patch
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
6 References: bnc#549748
7
8 Nfsd: Fix sort_pacl in fs/nfsd/nf4acl.c to actually sort groups
9
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:
13
14 A::OWNER@:rwaxtTcCy
15 A::user101@domain:rwaxtcy
16 A::GROUP@:rwaxtcy
17 A:g:group102@domain:rwaxtcy
18 A:g:group101@domain:rwaxtcy
19 A::EVERYONE@:rwaxtcy
20
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.
24
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>
28
29 ---
30
31 ---
32 fs/nfsd/nfs4acl.c | 2 +-
33 1 file changed, 1 insertion(+), 1 deletion(-)
34
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);
39
40 BUG_ON(pacl->a_entries[i].e_tag != ACL_GROUP_OBJ);
41 - j = i++;
42 + j = ++i;
43 while (pacl->a_entries[j].e_tag == ACL_GROUP)
44 j++;
45 sort_pacl_range(pacl, i, j-1);