From owner-freebsd-fs Mon Aug 28 18:10:12 2000 Delivered-To: freebsd-fs@freebsd.org Received: from relay.butya.kz (butya-gw.butya.kz [212.154.129.94]) by hub.freebsd.org (Postfix) with ESMTP id 5B45A37B43C; Mon, 28 Aug 2000 18:10:07 -0700 (PDT) Received: from bp.dialup.butya.kz (bp.dialup.butya.kz [192.168.1.193]) by relay.butya.kz (Postfix) with ESMTP id BE74F28703; Tue, 29 Aug 2000 08:10:02 +0700 (ALMST) Date: Tue, 29 Aug 2000 08:14:35 +0700 (ALMST) From: Boris Popov To: Robert Watson Cc: phk@FreeBSD.org, freebsd-fs@FreeBSD.org Subject: Re: procfs_lookup() and jail interaction In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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