Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934543AbbEOMDv (ORCPT ); Fri, 15 May 2015 08:03:51 -0400 Received: from mail-la0-f51.google.com ([209.85.215.51]:33584 "EHLO mail-la0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934318AbbEOMDt (ORCPT ); Fri, 15 May 2015 08:03:49 -0400 MIME-Version: 1.0 In-Reply-To: <1431689523.1769.1.camel@samsung.com> References: <1431689523.1769.1.camel@samsung.com> From: Andy Lutomirski Date: Fri, 15 May 2015 05:03:27 -0700 Message-ID: Subject: Re: [PATCH v2 1/2] capabilities: Ambient capabilities To: Lukasz Pawelczyk Cc: Andy Lutomirski , Serge Hallyn , Andrew Morton , Jarkko Sakkinen , "Ted Ts'o" , "Andrew G. Morgan" , Linux API , Mimi Zohar , Michael Kerrisk , Austin S Hemmelgarn , linux-security-module , Aaron Jones , Serge Hallyn , LKML , Markku Savela , Kees Cook , Jonathan Corbet , Christoph Lameter Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1276 Lines: 31 On Fri, May 15, 2015 at 4:32 AM, Lukasz Pawelczyk wrote: > 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. Good catch. I'll fix that for v3. --Andy -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/