Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Jun 2003 18:37:43 +0300
From:      Alexandr Kovalenko <never@nevermind.kiev.ua>
To:        Pawel Jakub Dawidek <nick@garage.freebsd.pl>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: trimming of chroot jail path in df(1)
Message-ID:  <20030602153743.GB28919@nevermind.kiev.ua>
In-Reply-To: <20030602151654.GY45118@garage.freebsd.pl>
References:  <20030602130248.GA21429@nevermind.kiev.ua> <20030602151654.GY45118@garage.freebsd.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
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/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030602153743.GB28919>