From owner-freebsd-fs Fri Jan 15 14:30:42 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA24619 for freebsd-fs-outgoing; Fri, 15 Jan 1999 14:30:42 -0800 (PST) (envelope-from owner-freebsd-fs@FreeBSD.ORG) Received: from smtp02.primenet.com (smtp02.primenet.com [206.165.6.132]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA24600; Fri, 15 Jan 1999 14:30:26 -0800 (PST) (envelope-from tlambert@usr04.primenet.com) Received: (from daemon@localhost) by smtp02.primenet.com (8.8.8/8.8.8) id PAA00305; Fri, 15 Jan 1999 15:30:18 -0700 (MST) Received: from usr04.primenet.com(206.165.6.204) via SMTP by smtp02.primenet.com, id smtpd029756; Fri Jan 15 15:29:53 1999 Received: (from tlambert@localhost) by usr04.primenet.com (8.8.5/8.8.5) id PAA14068; Fri, 15 Jan 1999 15:29:35 -0700 (MST) From: Terry Lambert Message-Id: <199901152229.PAA14068@usr04.primenet.com> Subject: Re: Mount bogosity To: eivind@FreeBSD.ORG (Eivind Eklund) Date: Fri, 15 Jan 1999 22:29:35 +0000 (GMT) Cc: Don.Lewis@tsc.tdk.com, fs@FreeBSD.ORG In-Reply-To: <19990115052007.B362@bitbox.follo.net> from "Eivind Eklund" at Jan 15, 99 05:20:08 am X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > > Even with the full path name in the mount table, you can still mess > > things up by renaming one of the intermediate directories ... > > Yeah. I don't really know a good way of handling it - I just thought I'd > note that it is bogus so somebody else could think about it, too :-) Har. It's trivial. All you have to do is set curproc->p_fd->fd_rdir to the real root directory, instead of "NULL" when you create the first process, and then get rid of the "NULL implies root" code in the lookup code. The fd_rdir value is inherited on fork, and only set on chroot, so this is a trivial change. I've been after this (among other small changes) for years. It incidently solves your problem, since it removes the distinction for vnode covering in the chroot vs. non-chroot case. If you dig in the -current list archives, you'll find a set of patches that does this. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message