From owner-freebsd-current@FreeBSD.ORG Sun Jun 27 21:01:46 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D56B916A4CE; Sun, 27 Jun 2004 21:01:46 +0000 (GMT) Received: from rwcrmhc12.comcast.net (rwcrmhc12.comcast.net [216.148.227.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8518943D2D; Sun, 27 Jun 2004 21:01:46 +0000 (GMT) (envelope-from julian@elischer.org) Received: from interjet.elischer.org ([24.7.73.28]) by comcast.net (rwcrmhc12) with ESMTP id <2004062721012201400l1jtve>; Sun, 27 Jun 2004 21:01:33 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id OAA32133; Sun, 27 Jun 2004 14:01:21 -0700 (PDT) Date: Sun, 27 Jun 2004 14:01:20 -0700 (PDT) From: Julian Elischer To: Pawel Jakub Dawidek In-Reply-To: <20040627160959.GL12007@darkness.comp.waw.pl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: "Bjoern A. Zeeb" cc: Robert Watson cc: FreeBSD current users cc: "Bjoern A. Zeeb" Subject: Re: jail getfsstat patches. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jun 2004 21:01:47 -0000 On Sun, 27 Jun 2004, Pawel Jakub Dawidek wrote: > On Sun, Jun 27, 2004 at 03:53:35PM +0000, Bjoern A. Zeeb wrote: > +> One thing that I have seen while skipping through the first time: > +> > +> could we avoid the function calls for non-jails or with > +> jail_enforce_statfs=0 ? This would make the code somewhat longer > +> as this part would be copied over multiple functions > +> > +> if (jailed(cred) && jail_enforce_statfs) { > +> /* call of the two functions */ > +> } > +> > +> (perhaps use a macro ?) but save people outside jails, w/o jails > +> or with jail_enforce_statfs=0 the function calls. > > IMHO it should stay as it is, because: > > - Some other prison_* functions do the same, i.e. check jailed(cred) > by themselfs. > - Function prison_canseemount() should be renamed some day to > cr_canseemount(), so I don't want it to be treated as jail-specific. > - Code is much cleaner. > - It doesn't save as too much CPU, really, and we don't need speed here. > > +> To answer another question: though I maybe thought/said s.th. else in > +> the past I would like to keep the sysctl global and not have it per > +> jail (if we start doing per-jail things we might really consider > +> vimages (perhaps in 6-CURRENT) but that's out of the scope of > +> this discussion). > > I agree, it shouldn't be per-jail. More than that, it should be removed > in the future to don't allow for old behaviour. I agree that the old behaviour was a bug, and the setting of the sysctl being able to show the old info is only so that people can continue to run old scripts. the several levels of security that are in one version of the script are, I think, a little too much.. I'd just like one sysctl to enable it, and after a while we swap the default, and then after a bit more time we remove it... > > -- > Pawel Jakub Dawidek http://www.FreeBSD.org > pjd@FreeBSD.org http://garage.freebsd.pl > FreeBSD committer Am I Evil? Yes, I Am! >