Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753496Ab0AQE6c (ORCPT ); Sat, 16 Jan 2010 23:58:32 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753411Ab0AQE6b (ORCPT ); Sat, 16 Jan 2010 23:58:31 -0500 Received: from mail-pw0-f42.google.com ([209.85.160.42]:61864 "EHLO mail-pw0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753340Ab0AQE6a (ORCPT ); Sat, 16 Jan 2010 23:58:30 -0500 MIME-Version: 1.0 In-Reply-To: <20100117044825.GA2712@heat> References: <551280e51001161858q740bf246n2ed389920de689e7@mail.gmail.com> <20100117044825.GA2712@heat> Date: Sat, 16 Jan 2010 20:58:27 -0800 X-Google-Sender-Auth: 331e353e581023cd Message-ID: <551280e51001162058n52ee94b7v5ccb10d80284bc@mail.gmail.com> Subject: Re: disablenetwork (v5): Require CAP_SETPCAP to enable From: "Andrew G. Morgan" To: Michael Stone Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-security-module@vger.kernel.org, Andi Kleen , David Lang , Oliver Hartkopp , Alan Cox , Herbert Xu , Valdis Kletnieks , Bryan Donlan , Evgeniy Polyakov , "C. Scott Ananian" , James Morris , "Eric W. Biederman" , Bernie Innocenti , Mark Seaborn , Randy Dunlap , =?ISO-8859-1?Q?Am=E9rico_Wang?= , Tetsuo Handa , Samir Bellabes , Casey Schaufler , "Serge E. Hallyn" , Pavel Machek , Al Viro , Kyle Moffett Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1255 Lines: 37 On Sat, Jan 16, 2010 at 8:48 PM, Michael Stone wrote: > Andrew Morgan wrote: >> >> Please use CAP_NET_ADMIN for this feature (and add the corresponding >> comment in include/linux/capabilities.h). > > Sure. > However, to make sure I understand the purpose of the adjustment, would you > mind saying a word or two about what considerations cause you to recommend > CAP_NET_ADMIN instead of (or in addition to?) CAP_SETPCAP? If you take a look at the capabilities.h file, you'll see that each of the capabilities is preceded by an explanation of what privilege it enables. CAP_SETPCAP refers to privileged manipulation of capabilities (permission to violate the normal capability rules) and nothing to do with the network. You are adding something akin to a per-process tree firewall setting - deny/enable network access to this process. I think you'll agree that the CAP_NET_ADMIN description is a much better match for this. Cheers Andrew > > Thanks for your feedback, > > Michael > -- 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/