[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Acl-devel] typo in acl_get_perm?
From: |
Corinna Vinschen |
Subject: |
Re: [Acl-devel] typo in acl_get_perm? |
Date: |
Sun, 27 Dec 2015 20:51:44 +0100 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
On Dec 26 17:58, Mike Frysinger wrote:
> On 26 Dec 2015 16:08, Corinna Vinschen wrote:
> > On Dec 26 15:46, Andreas Grünbacher wrote:
> > > 2015-12-26 14:34 GMT+01:00 Corinna Vinschen <address@hidden>:
> > > > On Dec 26 11:57, Andreas Grünbacher wrote:
> > > >> 2015-12-25 15:36 GMT+01:00 Corinna Vinschen <address@hidden>:
> > > > [...]
> > > > The man page doesn't make it clear that only a single permission bit is
> > > > allowed as input.
> > >
> > > "The [...] function tests if the permission [...] is contained in the
> > > [...] set."
> > >
> > > So again, what's unclear about that?
> >
> > Not trying to put too fine a point on it, but isn't the fact that I
> > misunderstood an indicator that, perhaps, more than a single person
> > might misunderstand it? I'm not the only dumb person out there ;)
>
> he asked what's unclear in the quoted statement. what's unclear about that ?
> ;)
> -mike
Ok, sorry if my mail was unclear on that point. Let me try again:
Perm is an acl_perm_t, which consists of any combination of ACL_READ|
ACL_WRITE|ACL_EXECUTE. It's not clear from the man page that only a
single permission bit is allowed here, rather than an arbitrary
combination of the above bits.
And then the code neither actually tests that only a single bit is set,
returning EINVAL if not, nor would its behaviour match the behaviour of
acl_add_perm and acl_delete_perm, both of which allow any combination of
valid acl_perm_t bits.
Alternatively, if a bit combination is allowed as in acl_add_perm and
acl_delete_perm, the test in the code is ok, but the evaluation of the
return value is not (a&b!=0 vs. ~a&b==0).
Corinna
signature.asc
Description: PGP signature
- [Acl-devel] typo in acl_get_perm?, Corinna Vinschen, 2015/12/25
- Re: [Acl-devel] typo in acl_get_perm?, Andreas Grünbacher, 2015/12/26
- Re: [Acl-devel] typo in acl_get_perm?, Corinna Vinschen, 2015/12/26
- Re: [Acl-devel] typo in acl_get_perm?, Andreas Grünbacher, 2015/12/26
- Re: [Acl-devel] typo in acl_get_perm?, Corinna Vinschen, 2015/12/26
- Re: [Acl-devel] typo in acl_get_perm?, Mike Frysinger, 2015/12/26
- Re: [Acl-devel] typo in acl_get_perm?,
Corinna Vinschen <=
- Re: [Acl-devel] typo in acl_get_perm?, Andreas Grünbacher, 2015/12/27
- Re: [Acl-devel] typo in acl_get_perm?, Mike Frysinger, 2015/12/29