From: "J. Bruce Fields" <bfields@fieldses.org>
To: Frank Filz <ffilzlnx@us.ibm.com>
Cc: NFS List <linux-nfs@vger.kernel.org>,
NFS V4 Mailing List <nfsv4@linux-nfs.org>,
Frank S Filz <ffilz@us.ibm.com>
Subject: Re: [PATCH] nfsd: Fix sort_pacl in fs/nfsd/nf4acl.c to actually sort groups
Date: Tue, 27 Oct 2009 19:32:44 -0400 [thread overview]
Message-ID: <20091027233244.GD14471@fieldses.org> (raw)
In-Reply-To: <1256168703.31791.14.camel@dyn9047022153>
On Wed, Oct 21, 2009 at 04:45:02PM -0700, Frank Filz wrote:
> 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.
Good grief, I'm embarassed--OK, thanks for catching that! Do you have
any regression tests that'd be easy for someone else to run?
Applied.
--b.
>
> Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com>
> ---
> fs/nfsd/nfs4acl.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/nfsd/nfs4acl.c b/fs/nfsd/nfs4acl.c
> index 725d02f..6d9c6aa 100644
> --- a/fs/nfsd/nfs4acl.c
> +++ b/fs/nfsd/nfs4acl.c
> @@ -389,7 +389,7 @@ sort_pacl(struct posix_acl *pacl)
> sort_pacl_range(pacl, 1, i-1);
>
> BUG_ON(pacl->a_entries[i].e_tag != ACL_GROUP_OBJ);
> - j = i++;
> + j = ++i;
> while (pacl->a_entries[j].e_tag == ACL_GROUP)
> j++;
> sort_pacl_range(pacl, i, j-1);
> --
> 1.5.2.2
>
>
>
> _______________________________________________
> NFSv4 mailing list
> NFSv4@linux-nfs.org
> http://linux-nfs.org/cgi-bin/mailman/listinfo/nfsv4
next prev parent reply other threads:[~2009-10-27 23:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-21 23:45 [PATCH] nfsd: Fix sort_pacl in fs/nfsd/nf4acl.c to actually sort groups Frank Filz
2009-10-27 23:32 ` J. Bruce Fields [this message]
2009-10-28 3:12 ` Frank Filz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091027233244.GD14471@fieldses.org \
--to=bfields@fieldses.org \
--cc=ffilz@us.ibm.com \
--cc=ffilzlnx@us.ibm.com \
--cc=linux-nfs@vger.kernel.org \
--cc=nfsv4@linux-nfs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox