Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030268AbVKPKPn (ORCPT ); Wed, 16 Nov 2005 05:15:43 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1030266AbVKPKPn (ORCPT ); Wed, 16 Nov 2005 05:15:43 -0500 Received: from 238-193.adsl.pool.ew.hu ([193.226.238.193]:47370 "EHLO dorka.pomaz.szeredi.hu") by vger.kernel.org with ESMTP id S932596AbVKPKPm (ORCPT ); Wed, 16 Nov 2005 05:15:42 -0500 To: rob@landley.net CC: a1426z@gawab.com, torvalds@osdl.org, linuxram@us.ibm.com, viro@ftp.linux.org.uk, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org In-reply-to: <200511160310.24807.rob@landley.net> (message from Rob Landley on Wed, 16 Nov 2005 03:10:24 -0600) Subject: Re: [PATCH 12/18] shared mount handling: bind and rbind References: <200511160835.28636.a1426z@gawab.com> <200511160310.24807.rob@landley.net> Message-Id: From: Miklos Szeredi Date: Wed, 16 Nov 2005 11:14:58 +0100 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 638 Lines: 15 > > If you don't want to be able to get back the old root, just close all > > file descriptors _in addition_ to chroot() and chdir(). > > If you try the chdir by filedescriptor trick on the stdin/stdout/stderr fed > into PID 1 when it's started up by the kernel, which filesystem do you wind > up in? (rootfs?) You can't fchdir() to a non-directory, so this shouldn't be an issue. 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/