Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Aug 2024 18:30:02 GMT
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 62bb18abed25 - main - p9fs: Properly handle paths containing "."
Message-ID:  <202408261830.47QIU2kV079085@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=62bb18abed25a831a29e1e5b6e6f7fdddbba6403

commit 62bb18abed25a831a29e1e5b6e6f7fdddbba6403
Author:     Bakul Shah <bakul@bitblocks.com>
AuthorDate: 2024-08-04 18:19:52 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-08-26 18:24:59 +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
---
 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?202408261830.47QIU2kV079085>