From owner-freebsd-hackers Tue Oct 1 14:37:53 2002 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 DD10037B401 for ; Tue, 1 Oct 2002 14:37:50 -0700 (PDT) Received: from milla.ask33.net (milla.ask33.net [217.197.166.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id DE28143E81 for ; Tue, 1 Oct 2002 14:37:48 -0700 (PDT) (envelope-from nick@milla.ask33.net) Received: by milla.ask33.net (Postfix, from userid 1001) id A4E973ABD49; Tue, 1 Oct 2002 23:38:48 +0200 (CEST) Date: Tue, 1 Oct 2002 23:38:48 +0200 From: Pawel Jakub Dawidek To: freebsd-hackers@freebsd.org Subject: Getfsstat(2), statfs(2) and fstatfs(2) jailed. Message-ID: <20021001213848.GK19012@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="dngyMJhgXGAL5Gb8" Content-Disposition: inline X-PGP-Key-URL: http://garage.freebsd.pl/jules.asc X-OS: FreeBSD 4.6-STABLE i386 User-Agent: Mutt/1.5.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --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