Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261244AbVEKVez (ORCPT ); Wed, 11 May 2005 17:34:55 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261260AbVEKVez (ORCPT ); Wed, 11 May 2005 17:34:55 -0400 Received: from rev.193.226.232.93.euroweb.hu ([193.226.232.93]:43276 "EHLO dorka.pomaz.szeredi.hu") by vger.kernel.org with ESMTP id S261236AbVEKVes (ORCPT ); Wed, 11 May 2005 17:34:48 -0400 To: jamie@shareable.org CC: 7eggert@gmx.de, miklos@szeredi.hu, ericvh@gmail.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, smfrench@austin.rr.com, hch@infradead.org In-reply-to: <20050511212343.GC5093@mail.shareable.org> (message from Jamie Lokier on Wed, 11 May 2005 22:23:43 +0100) Subject: Re: [RCF] [PATCH] unprivileged mount/umount References: <406SQ-5P9-5@gated-at.bofh.it> <40rNB-6p8-3@gated-at.bofh.it> <40t37-7ol-5@gated-at.bofh.it> <42VeB-8hG-3@gated-at.bofh.it> <42WNo-1eJ-17@gated-at.bofh.it> <20050511170700.GC2141@mail.shareable.org> <20050511212343.GC5093@mail.shareable.org> Message-Id: From: Miklos Szeredi Date: Wed, 11 May 2005 23:34:31 +0200 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 804 Lines: 25 > Still easy. > > To keep persistent named namespaces in /var/namespaces, thus: > > # Just once please! > mount -t tmpfs none /var/namespaces > > # Make a named namespace. > NSNAME='fred' > mkdir /var/namespaces/$NSNAME > run_in_new_namespace mount -t bind / /var/namespaces/$NSNAME That's not going to work, since the mount will only affect the new namespace. You'd need clone(), and then in the original namespace mount --bind /proc/CHILDPID/root /var/namespace/$NSNAME and then child process can safely exit. Miklos - 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/