Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262258AbVEMGGo (ORCPT ); Fri, 13 May 2005 02:06:44 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262256AbVEMGGo (ORCPT ); Fri, 13 May 2005 02:06:44 -0400 Received: from rev.193.226.232.93.euroweb.hu ([193.226.232.93]:36623 "EHLO dorka.pomaz.szeredi.hu") by vger.kernel.org with ESMTP id S262255AbVEMGGk (ORCPT ); Fri, 13 May 2005 02:06:40 -0400 To: linuxram@us.ibm.com CC: jamie@shareable.org, ericvh@gmail.com, 7eggert@gmx.de, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, smfrench@austin.rr.com, hch@infradead.org In-reply-to: <1115946620.6248.299.camel@localhost> (message from Ram on Thu, 12 May 2005 18:10:20 -0700) Subject: Re: [RCF] [PATCH] unprivileged mount/umount References: <20050511170700.GC2141@mail.shareable.org> <1115840139.6248.181.camel@localhost> <20050511212810.GD5093@mail.shareable.org> <1115851333.6248.225.camel@localhost> <20050512010215.GB8457@mail.shareable.org> <20050512064514.GA12315@mail.shareable.org> <20050512151631.GA16310@mail.shareable.org> <1115946620.6248.299.camel@localhost> Message-Id: From: Miklos Szeredi Date: Fri, 13 May 2005 08:06:09 +0200 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1111 Lines: 37 > r u sure, this program works? Yes :) > Sorry if I am saying something dumb here. > Correct me. When a file descriptor is sent from one process to other, > arn't they referring to different files in each of the processes. > fd=5 may be pointing to file 'xyz' in parent process, > where as fd=5 will be pointing to 'abc' in the child process. See 'man 7 unix' SCM_RIGHTS. How do you know the program did not work? Note: the program starts a new shell, it doesn't exit! Do this in the started shell (do not 'cd' before it): ls tmp/clonetest/mnt ls /tmp/clonetest/mnt If you see different things, then the program worked. It's not such a magic thing. You can also do something similar for example by: shell1> mount --bind / /tmp/mnt shell1> cd /tmp/mnt sheel2> umount -l /tmp/mnt Now shell1 sees two separate "namespaces" in in CWD and / 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/