lkml.org 
[lkml]   [2015]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] Implement ambient capability set.
On Wed, 4 Feb 2015, Andy Lutomirski wrote:

> >> Christoph, would your code run ok under NNP?
> >
> > There are still binaries invoked that need more priviledges. Does not
> > work.
>
> What do you mean by "need more privileges"? Are they setuid-root or
> do they use fP?

Both.

> > Well I'd rather have a way to avoid writing a tool. The best would be if
> > you could just set some caps and that would do it.
>
> However this ends up working, I'll add support to setpriv for it, so
> you'll be spared writing the tool if that's acceptable. :)

Sure.

> > __u32 inheritable = caps->inheritable.cap[i];
> >
> > /*
> > - * pP' = (X & fP) | (pI & fI)
> > + * pP' = (fA & fP) | (X & fP) | (pI & fI)
>
> pA & pP?

Ok.

> > + else if (rc != -ENODATA)
> > + goto out;
> > + rc = 0;
> > + if (!cap_isclear(current_cred()->cap_ambient))
> > + goto out;
>
> Confused. What about effective? Don't we still need to address that?

Seems that the caps do not take effect unless I set them. Is there a
better way to do this? Logic is wrong. It must be

if (cap_isclear(..)) goto out


> > + return -EPERM;
>
> I don't see why this is necessary given the change above.

I guess I should repost the whole patch.


\
 
 \ /
  Last update: 2015-02-04 23:21    [W:0.423 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site