From owner-freebsd-fs Mon Aug 28 10:19:52 2000 Delivered-To: freebsd-fs@freebsd.org Received: from critter.freebsd.dk (flutter.freebsd.dk [212.242.40.147]) by hub.freebsd.org (Postfix) with ESMTP id 420A837B424; Mon, 28 Aug 2000 10:19:49 -0700 (PDT) Received: from critter (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.0/8.9.3) with ESMTP id e7SHJmN11834; Mon, 28 Aug 2000 19:19:48 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Robert Watson Cc: freebsd-fs@FreeBSD.ORG Subject: Re: procfs_lookup() and jail interaction In-Reply-To: Your message of "Mon, 28 Aug 2000 13:06:17 EDT." Date: Mon, 28 Aug 2000 19:19:48 +0200 Message-ID: <11832.967483188@critter> From: Poul-Henning Kamp Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org In message , Robe rt Watson writes: >It looks like vn_open looks directory at vp->v_type to determine if it's a >directory, not relying on the results of VOP_GETATTR: > > if ((fmode & O_CREAT) == 0) { > mode = 0; > if (fmode & (FWRITE | O_TRUNC)) { > if (vp->v_type == VDIR) { > error = EISDIR; > goto bad; > } > >So the check is still happening above the VFS layer. > >I'll look at the code further this evening. Hmm, but vn_open needs to find the vnode first, and that means a VOP_LOOKUP into procfs doesn't it ? How else (when the vfscache isn't used) would it know which vnode ? -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD coreteam member | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message