From owner-freebsd-doc@FreeBSD.ORG Thu May 29 11:39:45 2003 Return-Path: Delivered-To: freebsd-doc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 615EB37B401 for ; Thu, 29 May 2003 11:39:45 -0700 (PDT) Received: from mail.auriga.ru (mail.auriga.ru [80.240.102.102]) by mx1.FreeBSD.org (Postfix) with ESMTP id 889AD43F75 for ; Thu, 29 May 2003 11:39:44 -0700 (PDT) (envelope-from alex.neyman@auriga.ru) Received: from mail.loopback.interface ([127.0.0.1] helo=vagabond.auriga.ru) by mail.auriga.ru with esmtp (Exim 4.14) id 19LSMV-0005WX-5f for freebsd-doc@freebsd.org; Thu, 29 May 2003 22:42:51 +0400 From: Alexey Neyman Organization: Auriga, Inc To: freebsd-doc@freebsd.org Date: Thu, 29 May 2003 22:40:00 +0400 User-Agent: KMail/1.5.2 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_AQl1+W0xGDFHrEp" Message-Id: <200305292240.00566.alex.neyman@auriga.ru> Subject: VOP_{LOOKUP|RENAME}(9) refer to cn_proc field ... X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 May 2003 18:39:45 -0000 --Boundary-00=_AQl1+W0xGDFHrEp Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline ... while this field has been replaced with cn_thread. Also, cn_hash field is no longer present in struct componentname. Patch attached. Regards, Alexey. -- ,----------------------------------------, | A quoi ca sert d'etre sur la terre | Alexey V. Neyman | Si c'est pour faire nos vies a genoux! | mailto:alex.neyman@auriga.ru `------------------( Les Rois du Monde )-' --Boundary-00=_AQl1+W0xGDFHrEp Content-Type: text/plain; charset="us-ascii"; name="p1" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="p1" --- VOP_LOOKUP.9.orig Thu May 29 22:29:51 2003 +++ VOP_LOOKUP.9 Thu May 29 22:31:38 2003 @@ -60,17 +60,16 @@ /* * Arguments to lookup. */ - u_long cn_nameiop; /* namei operation */ - u_long cn_flags; /* flags to namei */ - struct proc *cn_proc; /* process requesting lookup */ - struct ucred *cn_cred; /* credentials */ + u_long cn_nameiop; /* namei operation */ + u_long cn_flags; /* flags to namei */ + struct thread *cn_thread; /* thread requesting lookup */ + struct ucred *cn_cred; /* credentials */ /* * Shared between lookup and commit routines. */ char *cn_pnbuf; /* pathname buffer */ char *cn_nameptr; /* pointer to looked up name */ long cn_namelen; /* length of looked up component */ - u_long cn_hash; /* hash value of looked up name */ long cn_consume; /* chars to consume in lookup() */ }; .Ed @@ -176,7 +175,7 @@ if (dvp->v_type != VDIR) return ENOTDIR; - error = VOP_ACCESS(dvp, VEXEC, cred, cnp->cn_proc); + error = VOP_ACCESS(dvp, VEXEC, cred, cnp->cn_thread); if (error) return (error); @@ -296,7 +295,7 @@ /* * Check for write access on directory. */ - error = VOP_ACCESS(dvp, VWRITE, cred, cnp->cn_proc); + error = VOP_ACCESS(dvp, VWRITE, cred, cnp->cn_thread); if (error) return (error); @@ -331,7 +330,7 @@ * regular file, or empty directory. */ if (nameiop == RENAME && wantparent && islastcn) { - error = VOP_ACCESS(dvp, VWRITE, cred, cnp->cn_proc); + error = VOP_ACCESS(dvp, VWRITE, cred, cnp->cn_thread); if (error) return (error); --- VOP_RENAME.9.orig Thu May 29 22:31:59 2003 +++ VOP_RENAME.9 Thu May 29 22:32:28 2003 @@ -170,7 +170,7 @@ * the user must have write permission in the source so * as to be able to change "..". */ - error = VOP_ACCESS(fvp, VWRITE, tcnp->cn_cred, tcnp->cn_proc); + error = VOP_ACCESS(fvp, VWRITE, tcnp->cn_cred, tcnp->cn_thread); VOP_UNLOCK(fvp); if (doingdirectory && fdvp != tdvp) { /* --Boundary-00=_AQl1+W0xGDFHrEp--