Date: Thu, 29 May 2003 22:40:00 +0400 From: Alexey Neyman <alex.neyman@auriga.ru> To: freebsd-doc@freebsd.org Subject: VOP_{LOOKUP|RENAME}(9) refer to cn_proc field ... Message-ID: <200305292240.00566.alex.neyman@auriga.ru>
next in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200305292240.00566.alex.neyman>