Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 2 Jul 2002 18:48:59 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 2 Jul 2002 18:48:58 -0400 Received: from leibniz.math.psu.edu ([146.186.130.2]:1966 "EHLO math.psu.edu") by vger.kernel.org with ESMTP id ; Tue, 2 Jul 2002 18:48:58 -0400 Date: Tue, 2 Jul 2002 18:51:26 -0400 (EDT) From: Alexander Viro To: Paul Menage cc: Linus Torvalds , linux-kernel@vger.kernel.org Subject: Re: [PATCH] Filter /proc/mounts based on process root dir In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1095 Lines: 27 On Tue, 2 Jul 2002, Paul Menage wrote: > > This patch causes /proc/mounts to only display entries for mountpoints > within the current process root. This makes df and friends behave more > nicely in a chroot jail or with rootfs. > > Most of the logic in proc_check_root() is moved to a new function, > is_namespace_subdir(), which checks whether the given mount/dentry > refers to a subdirectory of the process root directory in the current > namespace. show_vfsmount() now returns without adding an output line if > is_namespace_subdir() returns false for a given mountpoint. That looks nice, but keep in mind that behaviour of getmntent(3) in chroot jails is a traditional misfeature. Hopefully nothing important relies on it, but... As far as I'm concerned patch (and behaviour change) are fine. Let's do it and see if anybody screams... - 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/