aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorFrank Filz <ffilzlnx@us.ibm.com>2009-10-21 19:45:02 -0400
committerJ. Bruce Fields <bfields@citi.umich.edu>2009-10-27 19:34:44 -0400
commitaba24d71580180dfdf6a1a83a5858a1c048fd785 (patch)
treefc96b617d4ec4b92965513cab2a1bdfc8298fec5 /fs/nfsd
parentdc83d6e27fa80babe31c80aa8568f125f72edf57 (diff)
nfsd: Fix sort_pacl in fs/nfsd/nf4acl.c to actually sort groups
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>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfs4acl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4acl.c b/fs/nfsd/nfs4acl.c
index 725d02f210e2..6d9c6aabc85e 100644
--- a/fs/nfsd/nfs4acl.c
+++ b/fs/nfsd/nfs4acl.c
@@ -389,7 +389,7 @@ sort_pacl(struct posix_acl *pacl)
389 sort_pacl_range(pacl, 1, i-1); 389 sort_pacl_range(pacl, 1, i-1);
390 390
391 BUG_ON(pacl->a_entries[i].e_tag != ACL_GROUP_OBJ); 391 BUG_ON(pacl->a_entries[i].e_tag != ACL_GROUP_OBJ);
392 j = i++; 392 j = ++i;
393 while (pacl->a_entries[j].e_tag == ACL_GROUP) 393 while (pacl->a_entries[j].e_tag == ACL_GROUP)
394 j++; 394 j++;
395 sort_pacl_range(pacl, i, j-1); 395 sort_pacl_range(pacl, i, j-1);