From: Lukasz Pawelczyk <l.pawelczyk@samsung.com>
To: Andy Lutomirski <luto@kernel.org>
Cc: Serge Hallyn <serge.hallyn@ubuntu.com>,
Andrew Morton <akpm@linuxfoundation.org>,
Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>,
"Ted Ts'o" <tytso@mit.edu>,
"Andrew G. Morgan" <morgan@kernel.org>,
Linux API <linux-api@vger.kernel.org>,
Mimi Zohar <zohar@linux.vnet.ibm.com>,
Michael Kerrisk <mtk.manpages@gmail.com>,
Austin S Hemmelgarn <ahferroin7@gmail.com>,
linux-security-module <linux-security-module@vger.kernel.org>,
Aaron Jones <aaronmdjones@gmail.com>,
Serge Hallyn <serge.hallyn@canonical.com>,
LKML <linux-kernel@vger.kernel.org>,
Markku Savela <msa@moth.iki.fi>,
Kees Cook <keescook@chromium.org>,
Jonathan Corbet <corbet@lwn.net>,
Christoph Lameter <cl@linux.com>,
Andy Lutomirski <luto@amacapital.net>
Subject: Re: [PATCH v2 1/2] capabilities: Ambient capabilities
Date: Fri, 15 May 2015 13:32:03 +0200 [thread overview]
Message-ID: <1431689523.1769.1.camel@samsung.com> (raw)
In-Reply-To: <cc4749638a21079cce12f9f30c806170558e56e5.1431671529.git.luto@kernel.org>
On czw, 2015-05-14 at 23:39 -0700, Andy Lutomirski wrote:
> @@ -696,10 +729,18 @@ static inline void cap_emulate_setxuid(struct cred *new, const struct cred *old)
> uid_eq(old->suid, root_uid)) &&
> (!uid_eq(new->uid, root_uid) &&
> !uid_eq(new->euid, root_uid) &&
> - !uid_eq(new->suid, root_uid)) &&
> - !issecure(SECURE_KEEP_CAPS)) {
> - cap_clear(new->cap_permitted);
> - cap_clear(new->cap_effective);
> + !uid_eq(new->suid, root_uid))) {
> + if (!issecure(SECURE_KEEP_CAPS)) {
> + cap_clear(new->cap_permitted);
> + cap_clear(new->cap_effective);
> + }
> +
> + /*
> + * Pre-ambient programs except setresuid to nonroot followed
I think you meant "expect". This typo changes the meaning of the
sentence.
> + * by exec to drop capabilities. We should make sure that
> + * this remains the case.
> + */
> + cap_clear(new->cap_ambient);
> }
--
Lukasz Pawelczyk
next prev parent reply other threads:[~2015-05-15 11:32 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-15 6:39 [PATCH v2 0/2] " Andy Lutomirski
2015-05-15 6:39 ` [PATCH v2 1/2] " Andy Lutomirski
2015-05-15 11:32 ` Lukasz Pawelczyk [this message]
2015-05-15 12:03 ` Andy Lutomirski
2015-05-15 14:19 ` Christoph Lameter
2015-05-18 19:48 ` Andy Lutomirski
2015-05-19 15:37 ` Christoph Lameter
2015-05-19 17:20 ` Andy Lutomirski
2015-05-19 20:03 ` Christoph Lameter
2015-05-19 20:07 ` Andy Lutomirski
2015-05-19 20:22 ` Aaron Jones
2015-05-19 20:23 ` Andy Lutomirski
2015-05-15 14:31 ` Christoph Lameter
2015-05-18 19:43 ` Andy Lutomirski
2015-05-27 22:35 ` Andy Lutomirski
2015-05-23 19:37 ` Serge Hallyn
2015-05-26 16:23 ` Christoph Lameter
2015-05-27 22:44 ` Andy Lutomirski
2015-05-15 6:39 ` [PATCH v2 2/2] capabilities: Add a securebit to disable PR_CAP_AMBIENT_RAISE Andy Lutomirski
2015-05-23 19:45 ` Serge E. Hallyn
2015-05-24 20:39 ` Andrew G. Morgan
2015-05-20 19:47 ` [PATCH v2 0/2] capabilities: Ambient capabilities Andy Lutomirski
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=1431689523.1769.1.camel@samsung.com \
--to=l.pawelczyk@samsung.com \
--cc=aaronmdjones@gmail.com \
--cc=ahferroin7@gmail.com \
--cc=akpm@linuxfoundation.org \
--cc=cl@linux.com \
--cc=corbet@lwn.net \
--cc=jarkko.sakkinen@linux.intel.com \
--cc=keescook@chromium.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=luto@kernel.org \
--cc=morgan@kernel.org \
--cc=msa@moth.iki.fi \
--cc=mtk.manpages@gmail.com \
--cc=serge.hallyn@canonical.com \
--cc=serge.hallyn@ubuntu.com \
--cc=tytso@mit.edu \
--cc=zohar@linux.vnet.ibm.com \
/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
Powered by JetHome