p9fs: Properly handle paths containing "."

Fixes:	56e4622588ed ("p9fs: fix lookup of "." for lib9p-based 9P servers")
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1361
This commit is contained in:
Bakul Shah 2024-08-04 11:19:52 -07:00 committed by Franco Fichtner
parent 26c1080d17
commit ee2ca2b0f6

View file

@ -238,7 +238,7 @@ p9fs_lookup(struct vop_lookup_args *ap)
if (dnp == NULL)
return (ENOENT);
if (cnp->cn_nameptr[0] == '.' && strlen(cnp->cn_nameptr) == 1) {
if (cnp->cn_nameptr[0] == '.' && cnp->cn_namelen == 1) {
vref(dvp);
*vpp = dvp;
return (0);