trimming of chroot jail path in df(1)
Alexandr Kovalenko
never at nevermind.kiev.ua
Mon Jun 2 08:38:35 PDT 2003
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/
More information about the freebsd-fs
mailing list