Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965403AbZLQTXR (ORCPT ); Thu, 17 Dec 2009 14:23:17 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S965378AbZLQTXM (ORCPT ); Thu, 17 Dec 2009 14:23:12 -0500 Received: from trinity.develer.com ([83.149.158.210]:42407 "EHLO trinity.develer.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965394AbZLQTXK (ORCPT ); Thu, 17 Dec 2009 14:23:10 -0500 Subject: Re: Network isolation with RLIMIT_NETWORK, cont'd. From: Bernie Innocenti To: Mark Seaborn Cc: Michael Stone , "Eric W. Biederman" , 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 , =?ISO-8859-1?Q?R=E9mi?= Denis-Courmont , Evgeniy Polyakov , "C. Scott Ananian" , James Morris , Linux Containers In-Reply-To: References: <20091213142149.GB4777@heat> Content-Type: text/plain; charset="UTF-8" Organization: Sugar Labs - http://www.sugarlabs.org/ Date: Thu, 17 Dec 2009 14:23:02 -0500 Message-ID: <1261077782.4073.20.camel@giskard.codewiz.org> Mime-Version: 1.0 X-Mailer: Evolution 2.29.3 (2.29.3-1.fc13) Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1512 Lines: 38 On Thu, 2009-12-17 at 17:31 +0000, Mark Seaborn wrote: > The reason chroot() and clone()/CLONE_NEWNS are privileged is that > they provide a way to violate the assumptions of setuid/setgid > executables. If we add a per-process flag that prevents a process > from exec'ing setuid executables, we could allow chroot() and > CLONE_NEWNS when that flag is set. That fixes (a). I think this would be great. > > Maybe we could fix (b) by making mount namespaces into first class > objects that can be named through a file descriptor, so that one > process can manipulate another process's namespace without itself > being subject to the namespace. I think Michael's problem with debugging is much more fundamental: application programmers get confused when some filesystem operations fail in the debugged process, while it works fine from the shell. It would help if the kernel provided a way for a process to switch to another process' namespace. Even better, it would be great if existing namespaces could be mounted at an arbitrary position within another namespace. Then one could use traditional shell tools to inspect it, or even chroot into it. -- // Bernie Innocenti - http://codewiz.org/ \X/ Sugar Labs - http://sugarlabs.org/ -- 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/