mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Lameter <cl@linux.com>
To: Andy Lutomirski <luto@amacapital.net>
Cc: "Serge E. Hallyn" <serge@hallyn.com>,
	"Andrew G. Morgan" <morgan@kernel.org>,
	Serge Hallyn <serge.hallyn@ubuntu.com>,
	Serge Hallyn <serge.hallyn@canonical.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Aaron Jones <aaronmdjones@gmail.com>, "Ted Ts'o" <tytso@mit.edu>,
	LSM List <linux-security-module@vger.kernel.org>,
	lkml <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linuxfoundation.org>
Subject: Re: [RFC] Implement ambient capability set.
Date: Wed, 4 Feb 2015 16:01:05 -0600 (CST)	[thread overview]
Message-ID: <alpine.DEB.2.11.1502041558290.26492@gentwo.org> (raw)
In-Reply-To: <CALCETrVqVt8kK1AG6YxQbTrNnrRJ0YAZdUzBqPcCxELiO6Ez-g@mail.gmail.com>

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.

  reply	other threads:[~2015-02-04 22:01 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-04 18:49 Christoph Lameter
2015-02-04 20:44 ` Andy Lutomirski
2015-02-04 21:16   ` Serge E. Hallyn
2015-02-04 21:24     ` Andy Lutomirski
2015-02-04 21:27       ` Serge E. Hallyn
2015-02-04 21:31         ` Andy Lutomirski
2015-02-04 21:51           ` Serge E. Hallyn
2015-02-04 22:02             ` Serge E. Hallyn
2015-02-04 22:32               ` Andy Lutomirski
2015-02-05  0:03                 ` Serge E. Hallyn
2015-02-04 21:57       ` Christoph Lameter
2015-02-04 22:29         ` Andy Lutomirski
2015-02-04 21:51     ` Christoph Lameter
2015-02-04 21:56       ` Andy Lutomirski
2015-02-04 22:01         ` Christoph Lameter [this message]
2015-02-04 22:02           ` [RFC] Implement ambient capability set V2 Christoph Lameter
2015-02-05  7:20 ` [RFC] Implement ambient capability set Michael Kerrisk

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=alpine.DEB.2.11.1502041558290.26492@gentwo.org \
    --to=cl@linux.com \
    --cc=aaronmdjones@gmail.com \
    --cc=akpm@linuxfoundation.org \
    --cc=corbet@lwn.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=morgan@kernel.org \
    --cc=serge.hallyn@canonical.com \
    --cc=serge.hallyn@ubuntu.com \
    --cc=serge@hallyn.com \
    --cc=tytso@mit.edu \
    /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

all inboxes | Powered by JetHome®