From nobody Fri Nov 06 19:55:03 2026 X-Original-To: dev-commits-src-branches@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 4jLqf01Rgrz6yf3f for ; Fri, 06 Nov 2026 19:55:04 +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 4jLqdz57Zyz4FlL for ; Fri, 06 Nov 2026 19:55:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793994903; 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=VYGe2dBCpoAgiFKEB+vMV5p4sbGX92rggdog4DfJnd8=; b=uFO9U5HHow94KRdANzZMCfrs0iW5IJqI41klk1uqSUwccMwmXzzfjfNf48heMwxj/dMoPa EOgB5UrBcfZBlMX1ApTjG3eHl6yoZkMDNIdbpp9SEp+5VZxOaNX/l2AxCQkBgYfB3n7s83 +AaYhcuqRjdaiHwmT3e5KsDTuwQFLDrhEGINaienOVq0sRPJeZ4x96YP44baRw1MoGVw8I NgXMeyycVfOiZoHz7VShlNO8B66+X3C8FGO3T1Fm2rCTBQCu8YbS1ZBS3BXXZlZ0Rae6P+ N0L12aFrBZYV89XMo4zbHlqv83hi3h76ra56GgL45tQBxG/vAUevZ0S6yDnReA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1793994903; b=Fa0ymSe4tu/5N2CQPB84ZjFDxMBo+UxX6/S22aPKOhmf30Pzw+AWi4rGQpBojxEzvdHZAz c24KSESvBB9VrynWSMuWaQKEN5aEqPFG2cUJnlDZD9z8hiiC2fUNhaniZAoq1yBAtWUWjW EJ/U3G+I0MwDBRivMitlL4bWjT25BFZC0XM4inrArQXACLkqQdxGLxJQxn7Sz2F7nojEYY rawawO7tJ2BmCON0YmD8zeVAGZ9rDL3pHRf1WbQk6Kupsvdi9F3i8UkNzibnIchytLmP2Z D1xdEZr3oUkz+sFHqRH4jzpyqt82ZQi1/xnnaBNL+e0rrTm8ahn15kn5h5xzrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793994903; 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=VYGe2dBCpoAgiFKEB+vMV5p4sbGX92rggdog4DfJnd8=; b=FrcjqBJtRc6zwx/l4FvNzUb6XijMHRtxpz3yiazaA3dZA7Y2bApbGt70eepM4DNjfhkI3u rusih4zsgTcd35RYYytYuNePwUBr5eQIV08LUswfOnRF3wCW2qTUphm21Wvr6Xyh1926Cv Z/HxaDfPi10BdfNx6I9CNWYFfWWs8EBaOY27tBySvYtE4/8vuc7UskhisZvNKeBE8VoqHS beJF+8V7ZPlQzVFs88eVrc2d43U/nJqPm5zxMqdScfFYdMK5c570uykkpcedwQ65pq2o5E VeDsEyvKymswlSH96AvbJogiwruSZzGd9xHGZiT0EN34Wda+MTZkBYxTd/75FA== 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 4jLqdz4pGPzrl6 for ; Fri, 06 Nov 2026 19:55:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1caf6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 06 Nov 2026 19:55:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Osvaldo Janeri Filho From: Mark Johnston Subject: git: 67b17be57a1c - stable/15 - nfsserver: use the destination export for the COPY/CLONE write check List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: Commits to the stable branches of the FreeBSD 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/stable/15 X-Git-Reftype: branch X-Git-Commit: 67b17be57a1c5661da77aacc5054b58d0c5ad9fb Auto-Submitted: auto-generated Date: Fri, 06 Nov 2026 19:55:03 +0000 Message-Id: <6aee3097.1caf6.5f83cca4@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=67b17be57a1c5661da77aacc5054b58d0c5ad9fb commit 67b17be57a1c5661da77aacc5054b58d0c5ad9fb Author: Osvaldo Janeri Filho AuthorDate: 2026-10-29 20:25:01 +0000 Commit: Mark Johnston CommitDate: 2026-11-06 15:52:19 +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 (cherry picked from commit d5c2465af8434d3eb7551d12220b4a24e7dca8af) --- 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 6b617fedd3fb..ee8d3c51efa5 100644 --- a/sys/fs/nfsserver/nfs_nfsdserv.c +++ b/sys/fs/nfsserver/nfs_nfsdserv.c @@ -6021,7 +6021,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); @@ -6250,7 +6250,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);