From nobody Mon Nov 10 13:58:38 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d4rqM1z3Sz6Glhf; Mon, 10 Nov 2025 13:58:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d4rqM1PWqz3kkG; Mon, 10 Nov 2025 13:58:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762783119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yHPDUU134z9glfcK+6xOa/hG4BsaePyDm2Cf9M//vOs=; b=Y9Y85fTRLg6q7n1/ojHwi4YBMIstK4nb7ltw+LSbDXfn/I2VrlmaJ6j1I54ittHKZZcRt9 2ogWG2cuqFwWC3PhMIBm9pwP6eEHiguJ9dAn/kxuKCNEhKI7Pg1/oqiR45rzhdxOZJx6WI WTdba7nPSQFDMk0eC1kF0r3ATioqOQSXKjTPMxN7ZnOPEWyopWz/AtHI2sE2QupHU/3ZGy 769Pbpcy1F5yHLPPffF02Db7nUMKN03KPhhv77L5OWdm1kqhrTPLLrtWOFbncehxENB51R oI9Vp6Jn2U9jj4MS+1KB66Vg0s2V2obVn5IwHKQF8O5F9MKuc8xYoLxx4f4j9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762783119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yHPDUU134z9glfcK+6xOa/hG4BsaePyDm2Cf9M//vOs=; b=OD2jpMcy4BdkowoYXAx3x1c77gDMx+2zrOFS4l78Pg7l3fDgTAlDAXHJBy+Kfgm1JMYAug u3+9RpfHavuHFMh4TG09lBsP3DBYCYfKQPpzcoaw7fDnZ4m1GUbOYUMUDxmuLTP3wNSkTw FvLoR96tjDS0u1nTiBgzGGDLbvthcFnRc8/rxR7KyJZMdDZ4wUvd29F/GBQink2+9Afu7L v7u5Wm0Vy+8ic2K7x9Bn42YcUoX+4p3Ak3UVgXErJtBJs1M+hKf243bR2Iqf1P1Al2A/zG iJT0J5Dz8ED9N1UKBrNbH41oJerUnZPb6VCc54efLhFB3PN3xWEnUgVedZGIrQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762783119; a=rsa-sha256; cv=none; b=Axwn4w21PEQpvjRmO7kU1vkQ967XP77MuTGmENehleaOEDS4L03BTxemQGLC1zv/kl2O0s vcVGiYCouNN8qIOOoUnDqVqCDiVnVuAF3CGi/vU0tTlhZvNUPWbuD/NVCusDvIn+XoU540 ExiTZ8daDY5gYHPpWlHMR7yKKn9xPpkJWqa9OuuEUMoJbw7yrrWv3ESqn/XSQgyrf5izG9 fdQfDike5O8dCz41VKTwGyN7x1v4pMuT5t4Bg7rnlrLRBPCX7dmdCJV4x2Uqxxv/htYT2u fiUry2Pn/6gk0mhCMf/a19IrQYOLMTBUzoXlcTAGnR2ilSBiiVGJPm7t//u2Rw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d4rqM0RGtz4qp; Mon, 10 Nov 2025 13:58:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5AADwcLw030136; Mon, 10 Nov 2025 13:58:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AADwcu6030133; Mon, 10 Nov 2025 13:58:38 GMT (envelope-from git) Date: Mon, 10 Nov 2025 13:58:38 GMT Message-Id: <202511101358.5AADwcu6030133@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 978aaa72f319 - main - cd9660: Unbreak symbolic links List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 978aaa72f3196f5489630052762cac5a7863e774 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=978aaa72f3196f5489630052762cac5a7863e774 commit 978aaa72f3196f5489630052762cac5a7863e774 Author: Dag-Erling Smørgrav AuthorDate: 2025-11-10 13:58:11 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-11-10 13:58:20 +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 --- 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;