Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Aug 2000 08:14:35 +0700 (ALMST)
From:      Boris Popov <bp@butya.kz>
To:        Robert Watson <rwatson@FreeBSD.org>
Cc:        phk@FreeBSD.org, freebsd-fs@FreeBSD.org
Subject:   Re: procfs_lookup() and jail interaction
Message-ID:  <Pine.BSF.4.21.0008290809320.812-100000@bhome.butya.kz>
In-Reply-To: <Pine.NEB.3.96L.1000828124049.84062K-100000@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 28 Aug 2000, Robert Watson wrote:

> So I've largely resolved these concerns -- as a synthetic in-memory file
> system, procfs is not using the name cache -- the issue I'm running into
> now in procfs is with the open() syscall.  Following the p_stuff patches,
> procfs_getattrt() and so on all return ENOENT.  However, an attempt to
> call open(/proc/1, O_CREAT) results in an EISDIR error, instead of EROFS.

	This is because procfs_lookup() function doesn't check for CREATE
operation. I'm unsure why this test is omitted because procfs has readonly
namespace. The following patch should fix this:

--- procfs_vnops.c.old	Sun Aug 27 09:43:37 2000
+++ procfs_vnops.c	Tue Aug 29 08:00:08 2000
@@ -683,7 +683,8 @@
 
 	*vpp = NULL;
 
-	if (cnp->cn_nameiop == DELETE || cnp->cn_nameiop == RENAME)
+	if (cnp->cn_nameiop == DELETE || cnp->cn_nameiop == RENAME ||
+	    cnp->cn_nameiop == CREATE)
 		return (EROFS);
 
 	if (cnp->cn_namelen == 1 && *pname == '.') {

--
Boris Popov




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?Pine.BSF.4.21.0008290809320.812-100000>