Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1227236

Re: [RFC v7 10/41] richacl: Permission check algorithm

From "J. Bruce Fields" <bfields@fieldses.org>
Newsgroups linux.kernel
Subject Re: [RFC v7 10/41] richacl: Permission check algorithm
Date 2015-09-17 19:40 +0200
Message-ID <q9Lk5-286-1@gated-at.bofh.it> (permalink)
References <q5iTn-686-5@gated-at.bofh.it> <q5j34-6jH-27@gated-at.bofh.it> <q7DTI-57T-15@gated-at.bofh.it> <q7EPM-6xj-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sat, Sep 12, 2015 at 12:12:16AM +0200, Andreas Grünbacher wrote:
> 2015-09-11 23:16 GMT+02:00 J. Bruce Fields <bfields@fieldses.org>:
> > On Sat, Sep 05, 2015 at 12:27:05PM +0200, Andreas Gruenbacher wrote:
> >> +             /*
> >> +              * Apply the group file mask to entries other than owner@ and
> >> +              * everyone@ or user entries matching the owner.  This ensures
> >> +              * that we grant the same permissions as the acl computed by
> >> +              * richacl_apply_masks().
> >> +              *
> >> +              * Without this restriction, the following richacl would grant
> >> +              * rw access to processes which are both the owner and in the
> >> +              * owning group, but not to other users in the owning group,
> >> +              * which could not be represented without masks:
> >> +              *
> >> +              *  owner:rw::mask
> >> +              *  group@:rw::allow
> >> +              */
> >> +             if ((acl->a_flags & RICHACL_MASKED) && richace_is_allow(ace))
> >> +                     ace_mask &= acl->a_group_mask;
> >
> > I'm having trouble understanding this.  I think the problem is that I
> > don't really understand the notation in your example.  Is a_group_mask
> > zero in that example?  I think it must be, in which case, OK I think I
> > get it.
> 
> Yes. I'm not sure if the example becomes easier to understand when the
> empty group mask and perhaps also the other mask is included.

I think it would have been for me.

In general I find it confusing to present the mask bits as additional
ACEs--they're really pretty different.

> > (Though I still have to think about it a little more to convince myself
> > that richacl_apply_masks() always gets the same result.)
> 
> I have tried to break the algorithm into digestible pieces. Do you see
> another way to make things easier to understand?

I just haven't reread those carefully enough yet, working on it....

--b.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [RFC v7 10/41] richacl: Permission check algorithm bfields@fieldses.org (J. Bruce Fields) - 2015-09-11 23:20 +0200
  Re: [RFC v7 10/41] richacl: Permission check algorithm Andreas Grünbacher <andreas.gruenbacher@gmail.com> - 2015-09-12 00:20 +0200
    Re: [RFC v7 10/41] richacl: Permission check algorithm "J. Bruce Fields" <bfields@fieldses.org> - 2015-09-17 19:40 +0200

csiph-web