Date: Mon, 28 Aug 2000 19:19:48 +0200 From: Poul-Henning Kamp <phk@critter.freebsd.dk> To: Robert Watson <rwatson@FreeBSD.ORG> Cc: freebsd-fs@FreeBSD.ORG Subject: Re: procfs_lookup() and jail interaction Message-ID: <11832.967483188@critter> In-Reply-To: Your message of "Mon, 28 Aug 2000 13:06:17 EDT." <Pine.NEB.3.96L.1000828130132.84062L-100000@fledge.watson.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <Pine.NEB.3.96L.1000828130132.84062L-100000@fledge.watson.org>, 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?11832.967483188>
