Date: Fri, 14 Nov 2025 14:43:30 GMT From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= <des@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 1b51ad67cd0a - stable/15 - cd9660: Unbreak symbolic links Message-ID: <202511141443.5AEEhU7m075634@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=1b51ad67cd0a85aea8351f86c6a724037eadc1fd commit 1b51ad67cd0a85aea8351f86c6a724037eadc1fd Author: Dag-Erling Smørgrav <des@FreeBSD.org> AuthorDate: 2025-11-10 13:58:11 +0000 Commit: Dag-Erling Smørgrav <des@FreeBSD.org> CommitDate: 2025-11-14 14:43:26 +0000 cd9660: Unbreak symbolic links Since the introduction of permission masks, cd9660_getattr() returns a size of zero for all symbolic links, because the code to retrieve the length of the link target (as required by POSIX) is dead, since we strip away the type bits before we try to use them to identify the file as a link. Address this by checking the vnode type instead. PR: 290556 MFC after: 3 days Fixes: 82f2275b73e5 ("cd9660: Add support for mask,dirmask,uid,gid options") Reviewed by: olce Differential Revision: https://reviews.freebsd.org/D53598 (cherry picked from commit 978aaa72f3196f5489630052762cac5a7863e774) --- sys/fs/cd9660/cd9660_vnops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/fs/cd9660/cd9660_vnops.c b/sys/fs/cd9660/cd9660_vnops.c index 4a2b80a7ccdd..92ea6d2b4501 100644 --- a/sys/fs/cd9660/cd9660_vnops.c +++ b/sys/fs/cd9660/cd9660_vnops.c @@ -193,8 +193,8 @@ cd9660_getattr(struct vop_getattr_args *ap) vap->va_ctime = ip->inode.iso_ctime; vap->va_rdev = VN_ISDEV(vp) ? ip->inode.iso_rdev : NODEV; - vap->va_size = (u_quad_t) ip->i_size; - if (ip->i_size == 0 && (vap->va_mode & S_IFMT) == S_IFLNK) { + vap->va_size = ip->i_size; + if (ip->i_size == 0 && vp->v_type == VLNK) { struct vop_readlink_args rdlnk; struct iovec aiov; struct uio auio;home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202511141443.5AEEhU7m075634>
