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
[-- Attachment #1 --] 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. +> > +> > For example if we have mounted: +> > [...] +> +> Also see PR 26740: +> http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/26740 +> +> 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 ... +> +> 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 "/". -- Pawel Jakub Dawidek UNIX Systems Administrator http://garage.freebsd.pl Am I Evil? Yes, I Am. [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iQCVAwUBPZsvIT/PhmMH/Mf1AQHaHQP/YbR/QGAka7vTVoYpqscsURcMUfDDmJWN 99TvF2AKzVGkANX6UgPr9ao33jvb/dq+xdtcb5PA9L08845Qa7mlRWDtUOBUqr/V UBJ4DelBWJBxUjYPg3jwbEoYgMExcIbUQKIYCrA1eIf9gTHA8rskAfBD34bNQ98i lfiLC3ZwKv0= =koAY -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021002173841.GB61479>
