Date: Tue, 1 Oct 2002 23:38:48 +0200 From: Pawel Jakub Dawidek <nick@garage.freebsd.pl> To: freebsd-hackers@freebsd.org Subject: Getfsstat(2), statfs(2) and fstatfs(2) jailed. Message-ID: <20021001213848.GK19012@garage.freebsd.pl>
next in thread | raw e-mail | index | archive | help
--dngyMJhgXGAL5Gb8 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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? --=20 Pawel Jakub Dawidek UNIX Systems Administrator http://garage.freebsd.pl Am I Evil? Yes, I Am. --dngyMJhgXGAL5Gb8 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iQCVAwUBPZoV6D/PhmMH/Mf1AQEgWAQAlJ8KYldPoTFuotzHMr43gPMk3TC+EXqS OJ1igFW2/JYwrO8i9NlHkQ5oZEdwXXM8+fqCo4er16gGmfyxGcPNACCsDF5B+f3X jb7Q3JwDPzGqIj2Vbn1gx43sJveeBfwCDzbqmJAhMb4gh4l/FioLTFkdT14bzifd nWmuKoc46Jg= =+DX3 -----END PGP SIGNATURE----- --dngyMJhgXGAL5Gb8-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021001213848.GK19012>