From owner-freebsd-current Sat Sep 8 1: 1:24 2001 Delivered-To: freebsd-current@freebsd.org Received: from holly.calldei.com (adsl-208-191-149-190.dsl.hstntx.swbell.net [208.191.149.190]) by hub.freebsd.org (Postfix) with ESMTP id D1D1737B409; Sat, 8 Sep 2001 01:01:19 -0700 (PDT) Received: (from chris@localhost) by holly.calldei.com (8.11.4/8.9.3) id f8881BX02724; Sat, 8 Sep 2001 03:01:11 -0500 (CDT) (envelope-from chris) Date: Sat, 8 Sep 2001 03:01:11 -0500 From: Chris Costello To: Maxim Sobolev Cc: phk@critter.freebsd.dk, brent@rcfile.org, current@FreeBSD.org, hackers@FreeBSD.org Subject: Re: Junior Kernel Hacker task: improve vnode->v_tag Message-ID: <20010908030110.E548@holly.calldei.com> Reply-To: chris@calldei.com References: <20010908003843.D548@holly.calldei.com> <200109080729.KAA87536@www.abc.com.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200109080729.KAA87536@www.abc.com.ua>; from sobomax@FreeBSD.org on Sat, Sep 08, 2001 at 10:29:40AM +0300 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Saturday, September 08, 2001, Maxim Sobolev wrote: > No, it should be pre-defined, because otherwise we will be > unable to use strcmp() in a few places when v_tag is abused. So in these cases (which ideally would be eliminated rather than considered for support), why can't you do: if (strcmp(vp->v_tag, "procfs") == 0) { rather than if (strcmp(vp->v_tag, VT_PROCFS) == 0) { in the case of procfs? As for a solution to the problem, I'm not entirely sure, but maybe this is a case for either a new vnode flag, `VUNSAFE', for files which should be closed across exec() calls (this is all setugidsafety() and its hackish is_unsafe() companion are used for as far as I can tell). -- +-------------------+------------------------------------+ | Chris Costello | Let the machine do the dirty work. | | chris@calldei.com | - Elements of Programming Style | +-------------------+------------------------------------+ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message