lkml.org 
[lkml]   [2015]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC v7 22/41] richacl: Propagate everyone@ permissions to other aces
From
2015-09-18 23:36 GMT+02:00 J. Bruce Fields <bfields@fieldses.org>:
> On Sat, Sep 05, 2015 at 12:27:17PM +0200, Andreas Gruenbacher wrote:
>> + if (!richace_is_owner(who) &&
>> + richace_is_everyone(ace) && richace_is_allow(ace) &&
>
> That richace_is_allow(ace) check is redundant at this point, isn't it?

Yes, I'll change that.

>> + !(allow & ~(ace->e_mask & acl->a_other_mask)))
>
> Uh, I wish C had a subset-of operator, that construct took me longer to
> work out than I should admit.
>
>> + allow = 0;
>> +
>> + if (allow) {
>> + if (allow_last)
>> + return richace_change_mask(alloc, &allow_last,
>> + allow_last->e_mask | allow);
>> + else {
>> + struct richace who_copy;
>> +
>> + richace_copy(&who_copy, who);
>> + ace = acl->a_entries + acl->a_count - 1;
>
> Isn't ace already set to the last ace?

Yes indeed, that line can also go.

Thanks,
Andreas


\
 
 \ /
  Last update: 2015-09-22 02:01    [W:0.084 / U:0.516 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site