Date: Wed, 2 Oct 2002 19:38:41 +0200 From: Pawel Jakub Dawidek <nick@garage.freebsd.pl> To: Oliver Fromme <olli@secnetix.de> Cc: freebsd-hackers@freebsd.org Subject: Re: Getfsstat(2), statfs(2) and fstatfs(2) jailed. Message-ID: <20021002173841.GB61479@garage.freebsd.pl> In-Reply-To: <200210021045.g92AjaMU066299@lurza.secnetix.de> References: <20021001213848.GK19012@garage.freebsd.pl> <200210021045.g92AjaMU066299@lurza.secnetix.de>
next in thread | previous in thread | raw e-mail | index | archive | help
--uQr8t48UFsdbeI+V Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 02, 2002 at 12:45:36PM +0200, Oliver Fromme wrote: +> Pawel Jakub Dawidek <nick@garage.freebsd.pl> wrote: +> > With this kernel module for FreeBSD 4.x process in jail can see only +> > file systems that are mounted in jail's chroot directory. +> >=20 +> > For example if we have mounted: +> > [...] +>=20 +> Also see PR 26740: +> http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dkern/26740 +>=20 +> BTW, does your patch work if the process that created the jail +> was already chrooted (possibly with a root different from the +> root of the process that mounted the filesystem)? There are +> a lot of non-trivial cases ... +>=20 +> Another issue might be the degraded efficiency if there are a +> lot of mounts (I mean _really_ many). My way is very simple. I get chroot directory from p->p_fd->fd_jdir. We have for example "/ch/root". Now in getfsstat() I'm checking for file systems begins with "/ch/root". If it doesn't begin with this string I don't add it. I add also file system where chroot directory is mounted on with path "/". --=20 Pawel Jakub Dawidek UNIX Systems Administrator http://garage.freebsd.pl Am I Evil? Yes, I Am. --uQr8t48UFsdbeI+V Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iQCVAwUBPZsvIT/PhmMH/Mf1AQHaHQP/YbR/QGAka7vTVoYpqscsURcMUfDDmJWN 99TvF2AKzVGkANX6UgPr9ao33jvb/dq+xdtcb5PA9L08845Qa7mlRWDtUOBUqr/V UBJ4DelBWJBxUjYPg3jwbEoYgMExcIbUQKIYCrA1eIf9gTHA8rskAfBD34bNQ98i lfiLC3ZwKv0= =koAY -----END PGP SIGNATURE----- --uQr8t48UFsdbeI+V-- 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?20021002173841.GB61479>