From nobody Thu Oct 29 20:28:57 2026 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 4jFwmt2nLCz6xcJr for ; Thu, 29 Oct 2026 20:29:02 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jFwmt2CFPz4Pkb for ; Thu, 29 Oct 2026 20:29:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793305742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J6bABsz4hhsqOCV3c3kXFEfjHjARGIlgMqWBvrliFqQ=; b=cavW1S4YSoyp643xQ3Vf9d0r7qYMelEK8OWVdQoBJ3Nx1T5hFshM+2ElgZ6ay6mWghepEW XgXWiVl+gZfeG2/5gyh9uiTKLGcry1pzlsnrRzmGZHib9nPrmdhDParISSr4r+oXV67nze gvzfT/fwDXcQS24x1/XbHonnRRm1EiDcks6CT6zj1nklfBVPSFDfywA+Kih9Vs9TmE7s+v cD/S2yZ7baVOds/zV1+yRO6fumNAfryAk2n4eS2aIpFMXz2ublNmTR4CsgwtcB8DY24ARh ra02N14UTUUV1j7s9CNMq3seQootVJ3dnrIOPh+Zlzf9jAyoctYRgPacR+YZMQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1793305742; b=sDepT9COUZq+DAPirfSKqpwxOeXvodEMDoc8jXMZqjg/FTjRdk+HoZouJiLJVEiCit+8tc xEcI8GgO+I/dHuR3HU+fnRtRWwc7RMMXsCUh6euqwr4r3EUkVMx9VdhY3rviLMvkj9I6nk LUNisd8Jnzl6wvTxiRPtJgfGV5Oi1usdHAqfB466rUkIML78jhUvf8PN7V7nRkO7QY3HiJ ngx8eE+8YaYWpQ38SE6d+ewVrnzxHVtDbMfUgPDhA3itbsrKJ8MgxdI70n2nvPXpKZpIaM Nxf9oKi45NFCAeA07XLNws3JjmYMlGtUa1rHyou12JQtT6ggmjtRN4AACacMeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793305742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J6bABsz4hhsqOCV3c3kXFEfjHjARGIlgMqWBvrliFqQ=; b=FtJX5jdEoePlF8YGyA+g3HK+y88LM8sP4kWmkf3aSBOwOhrSpyUYfFBjkKqoDM9rtJO0Aq QxHnGYNnfNNk8mIm2Nc4P8YM6Chb/2ZE4sfPK4f5/yRqlxdLR9Z/XDnos0y6bkKe3FJvYa 7KCpbaL+cvgxKS/9H3GhSSgw6DCxkkQmY9DMGif7m66ZVnNg/hkNE7hTrcy6G3uqHWSmP3 1oeVPXlhl0hztE9rzoHiwdnZosMOAzqUvSd1CsdD+lSpYuSoBBz0J6Hermo8pPuvHCmxwv WaNj+tOyosYGm/pVJzSOf5+qW/m3PY4bmmgVbMfMI/ORd11fD7e4jI1t2/TM2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jFwmt1rzpzvXv for ; Thu, 29 Oct 2026 20:29:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1f429 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 29 Oct 2026 20:28:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Osvaldo Janeri Filho From: Mark Johnston Subject: git: d5c2465af843 - main - nfsserver: use the destination export for the COPY/CLONE write check List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d5c2465af8434d3eb7551d12220b4a24e7dca8af Auto-Submitted: auto-generated Date: Thu, 29 Oct 2026 20:28:57 +0000 Message-Id: <6ae3ac89.1f429.3397788f@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d5c2465af8434d3eb7551d12220b4a24e7dca8af commit d5c2465af8434d3eb7551d12220b4a24e7dca8af Author: Osvaldo Janeri Filho AuthorDate: 2026-10-29 20:25:01 +0000 Commit: Mark Johnston CommitDate: 2026-10-29 20:25:06 +0000 nfsserver: use the destination export for the COPY/CLONE write check The write-permission check on the destination file in nfsrvd_copy_file_range() and nfsrvd_clone() tested NFSVNO_EXSTRICTACCESS() on the source export instead of the destination export. Rick notes: The change is harmless and mostly meaningless. NFSVNO_EXSTRICTACCESS() is a placeholder for some site that might not want to let the file "owner" get access despite mode bits. The "owner override" is a hack that has existed forever in NFS, since applications often create files with O_WRONLY, but mode 444. This works for POSIX, but would make NFS writes fail, since they check mode on every write, instead of just at POSIX open(). The hack is to always allow the file owner to have write access. Without the hack, lots of applications would break over NFS, so I doubt anyone would enable NFSVNO_EXSTRICTACCESS(). { No one has ever even wanted an export flag for it. } Reviewed by: rmacklem, markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D60952 --- sys/fs/nfsserver/nfs_nfsdserv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/fs/nfsserver/nfs_nfsdserv.c b/sys/fs/nfsserver/nfs_nfsdserv.c index dd6e4805606a..516ac6ab9706 100644 --- a/sys/fs/nfsserver/nfs_nfsdserv.c +++ b/sys/fs/nfsserver/nfs_nfsdserv.c @@ -6039,7 +6039,7 @@ nfsrvd_copy_file_range(struct nfsrv_descript *nd, __unused int isdgram, if (nd->nd_repstat == 0) nd->nd_repstat = ret; if (nd->nd_repstat == 0 && (at.na_uid != nd->nd_cred->cr_uid || - NFSVNO_EXSTRICTACCESS(exp))) + NFSVNO_EXSTRICTACCESS(toexp))) nd->nd_repstat = nfsvno_accchk(tovp, VWRITE, nd->nd_cred, toexp, curthread, NFSACCCHK_ALLOWOWNER, NFSACCCHK_VPISLOCKED, NULL); @@ -6268,7 +6268,7 @@ nfsrvd_clone(struct nfsrv_descript *nd, __unused int isdgram, if (nd->nd_repstat == 0) nd->nd_repstat = ret; if (nd->nd_repstat == 0 && (at.na_uid != nd->nd_cred->cr_uid || - NFSVNO_EXSTRICTACCESS(exp))) + NFSVNO_EXSTRICTACCESS(toexp))) nd->nd_repstat = nfsvno_accchk(tovp, VWRITE, nd->nd_cred, toexp, curthread, NFSACCCHK_ALLOWOWNER, NFSACCCHK_VPISLOCKED, NULL);