Date: Fri, 2 Jul 2004 10:20:05 +0000 (UTC) From: "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net> To: Pawel Jakub Dawidek <pjd@FreeBSD.org> Cc: "Bjoern A. Zeeb" <bzeeb+freebsd@zabbadoz.net> Subject: Re: jail getfsstat patches. Message-ID: <Pine.BSF.4.53.0407021010590.28103@e0-0.zab2.int.zabbadoz.net> In-Reply-To: <20040702095721.GY12007@darkness.comp.waw.pl> References: <Pine.BSF.4.21.0406251809530.1679-100000@InterJet.elischer.org> <20040627101951.GJ12007@darkness.comp.waw.pl> <Pine.BSF.4.53.0407020749280.28103@e0-0.zab2.int.zabbadoz.net> <20040702095721.GY12007@darkness.comp.waw.pl>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 2 Jul 2004, Pawel Jakub Dawidek wrote: > On Fri, Jul 02, 2004 at 07:52:29AM +0000, Bjoern A. Zeeb wrote: > +> On Sun, 27 Jun 2004, Pawel Jakub Dawidek wrote: > +> > +> If you give me a few days (maybe I'll be ready today) I'll try to prepare > +> > +> patch to commit so we can review it together. > +> > > +> > Ok, here it goes: > +> > > +> > http://people.freebsd.org/~pjd/patches/jail_enforce_statfs.patch > +> > +> > +> in prison_canseemount shouldn't it be (pasted in by hand): > +> > +> * Be sure that we don't have situation where jail's root directory > +> * is "/some/path" and mount point is "/some/pathpath". > +> */ > +> - if (*sp->f_mntonname != '\0' && *sp->f_mntonname != '/') > +> + if (*(sp->f_mntonname+len) != '\0' && *(sp->f_mntonname+len) != '/') > +> return (ENOENT); > +> return (0); > > Yes, fixed, thanks! haven't re-fetched the patch but with above change things look good here on a production system (backported it to 5.2.1-pN and klded). To people who will backport: do not forget to also patch usr.sbin/jail what Pawel had done in HEAD already or make sure to not use symlinks or .. in the path given to jail(8). didn't review linux-compat or alpha and didn't test freebsd4_compat. many thanks for this work - great ! PS: spelling still left to someone else ;-) s/happend/happen/ -- Greetings Bjoern A. Zeeb bzeeb at Zabbadoz dot NeT
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.53.0407021010590.28103>