Hello hackers...

        http://garage.freebsd.pl/jailfsstat.tgz
        http://garage.freebsd.pl/jailfsstat.README

With this kernel module for FreeBSD 4.x process in jail can see only
file systems that are mounted in jail's chroot directory.

For example if we have mounted:

        FN FP
        1  /
        2  /bin
        3  /sbin
        4  /usr
        5  /jails
        6  /jails/prison/etc
        7  /jails/prison/bin
        8  /jails/prison/sbin
        9  /jails/prison/usr

        FN - file system number
        FP - file system path

and now we calling jail(2) with path /jails/prison.
If we check mounted file systems inside of jail we got:

        FN FP
        5  /
        6  /etc
        7  /bin
        8  /sbin
        9  /usr

Now getfsstat(2) returns only file systems that are in chroot
directory with cuted path names. "/" is file system where
chroot directory is mounted on.
Statfs(2) and fstatfs(2) also returns cuted paths.

Why this isn't a part of jail(2) implementation?
Maybe I'm missing something?

-- 
Pawel Jakub Dawidek
UNIX Systems Administrator
http://garage.freebsd.pl
Am I Evil? Yes, I Am.

Attachment: msg37181/pgp00000.pgp
Description: PGP signature

Reply via email to