Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755588Ab1BSTIW (ORCPT ); Sat, 19 Feb 2011 14:08:22 -0500 Received: from smtp5-g21.free.fr ([212.27.42.5]:37630 "EHLO smtp5-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755386Ab1BSTIK (ORCPT ); Sat, 19 Feb 2011 14:08:10 -0500 Message-ID: <4D60150C.7040705@free.fr> Date: Sat, 19 Feb 2011 20:07:56 +0100 From: Daniel Lezcano User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 MIME-Version: 1.0 To: "Serge E. Hallyn" CC: xemul@parallels.com, containers@lists.linux-foundation.org, kernel list , dhowells@redhat.com, LSM , "Eric W. Biederman" , Kees Cook , Alexey Dobriyan , Michael Kerrisk Subject: Re: [PATCH 8/9] user namespaces: convert several capable() calls References: <20110217150224.GA26334@mail.hallyn.com> <20110217150356.GH26395@mail.hallyn.com> In-Reply-To: <20110217150356.GH26395@mail.hallyn.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 905 Lines: 22 On 02/17/2011 04:03 PM, Serge E. Hallyn wrote: > CAP_IPC_OWNER and CAP_IPC_LOCK can be checked against current_user_ns(), > because the resource comes from current's own ipc namespace. > > setuid/setgid are to uids in own namespace, so again checks can be > against current_user_ns(). > > Changelog: > Jan 11: Use task_ns_capable() in place of sched_capable(). > Jan 11: Use nsown_capable() as suggested by Bastian Blank. > Jan 11: Clarify (hopefully) some logic in futex and sched.c > Feb 15: use ns_capable for ipc, not nsown_capable > > Signed-off-by: Serge E. Hallyn > --- Acked-by: Daniel Lezcano -- 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/