From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 2 08:38:35 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7D7F337B404; Mon, 2 Jun 2003 08:38:35 -0700 (PDT) Received: from kurush.osdn.org.ua (external.osdn.org.ua [212.40.34.156]) by mx1.FreeBSD.org (Postfix) with ESMTP id DCF4343FAF; Mon, 2 Jun 2003 08:38:14 -0700 (PDT) (envelope-from never@kurush.osdn.org.ua) Received: from kurush.osdn.org.ua (never@localhost [127.0.0.1]) by kurush.osdn.org.ua (8.12.6p2/8.12.6) with ESMTP id h52FbisB029081; Mon, 2 Jun 2003 18:37:44 +0300 (EEST) (envelope-from never@kurush.osdn.org.ua) Received: (from never@localhost) by kurush.osdn.org.ua (8.12.6p2/8.12.6/Submit) id h52FbiIL029078; Mon, 2 Jun 2003 18:37:44 +0300 (EEST) (envelope-from never) Date: Mon, 2 Jun 2003 18:37:43 +0300 From: Alexandr Kovalenko To: Pawel Jakub Dawidek Message-ID: <20030602153743.GB28919@nevermind.kiev.ua> References: <20030602130248.GA21429@nevermind.kiev.ua> <20030602151654.GY45118@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20030602151654.GY45118@garage.freebsd.pl> User-Agent: Mutt/1.5.1i cc: freebsd-fs@freebsd.org cc: freebsd-hackers@freebsd.org Subject: Re: trimming of chroot jail path in df(1) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jun 2003 15:38:35 -0000 Hello, Pawel Jakub Dawidek! On Mon, Jun 02, 2003 at 05:16:54PM +0200, you wrote: > On Mon, Jun 02, 2003 at 04:02:48PM +0300, Alexandr Kovalenko wrote: > +> I've found module jailfsstat: > +> > +> http://garage.freebsd.pl/jailfsstat.tgz > +> > +> which task is that process in jail can see only file systems mounted > +> inside of jail. > +> > +> It works somehow incorrect and I would like to ask you for an URL of > +> FreeBSD's vfs implementation documentation. > > Somebody has raported that there is off-by-one error somewhere, but it > wasn't critical AFAIK. Have you found some other incorrect behaviour? > If yes, I could always fix it in my free time. Incorrect behaviour is: in host system: bash-2.05b# df Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/da0s1a 128990 35988 82684 30% / /dev/da0s1f 2064302 8344 1890814 0% /tmp /dev/da0s1g 10322414 1703924 7792698 18% /usr /dev/da0s1h 97825400 3834024 86165344 4% /usr/local /dev/da0s1e 2064302 12758 1886400 1% /var /dev/da1s1e 233513688 1889152 212943448 1% /jails procfs 4 4 0 100% /proc /dev/vn1a 503966 149870 313780 32% /jails/mounts/217.20.163.128 procfs 4 4 0 100% /jails/mounts/217.20.163.128/proc /dev/vn2a 503966 203640 260010 44% /jails/mounts/217.20.163.129 procfs 4 4 0 100% /jails/mounts/217.20.163.129/proc with your, unpatched version: Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/vn1a 503966 149870 313780 32% / procfs 4 4 0 100% /proc /dev/vn2a 503966 203640 260010 44% procfs 4 4 0 100% /proc with patch I've just sent to you: Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/vn1a 503966 149870 313780 32% / procfs 4 4 0 100% /proc -- NEVE-RIPE, will build world for food Ukrainian FreeBSD User Group http://uafug.org.ua/