Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Jul 2025 13:28:51 GMT
From:      Gleb Popov <arrowd@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 2e7e267e7fcb - stable/14 - p9fs: Properly handle paths containing "."
Message-ID:  <202507041328.564DSpus006018@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by arrowd:

URL: https://cgit.FreeBSD.org/src/commit/?id=2e7e267e7fcbcd0dfb9957fb9809308232276f15

commit 2e7e267e7fcbcd0dfb9957fb9809308232276f15
Author:     Bakul Shah <bakul@bitblocks.com>
AuthorDate: 2024-08-04 18:19:52 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2025-07-04 13:28:06 +0000

    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
    
    (cherry picked from commit 62bb18abed25a831a29e1e5b6e6f7fdddbba6403)
---
 sys/fs/p9fs/p9fs_vnops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/fs/p9fs/p9fs_vnops.c b/sys/fs/p9fs/p9fs_vnops.c
index 6ac0a7c008cc..14951e96b59d 100644
--- a/sys/fs/p9fs/p9fs_vnops.c
+++ b/sys/fs/p9fs/p9fs_vnops.c
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202507041328.564DSpus006018>