From nobody Fri Dec 02 05:21:32 2022 X-Original-To: dev-commits-src-main@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 4NNhBP1HHnz4jHdT; Fri, 2 Dec 2022 05:21:33 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NNhBP0W67z3G0K; Fri, 2 Dec 2022 05:21:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1669958493; 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=ZvfScMP2BuL7gzAfLP/XQxtd9PBfRtjSCkOXop04adk=; b=scLnIAySceWnGPNfbMC22UCweDvHTkSWQszg5DdKKaOMEexsmpZC8vSWW/FpNxcEgTOqFt AM6dPGuoOP0lHLOxHqXbusFBs4l15z0BFih9hf/e46YierucFIqL3V03qvPIPgFFVcuCSX TKyEk9rWDuILf5uSsmGe9CvsGvcokxotQMhq8eWk2wVX1rSEsEKOIeDSJFwjMwMXwBZPXV +11T+s9CeGS4bLpoLLMEyR1lLhl68ilkdvEVXZiKMi3SLZqrkhld15osKmlI0nLU+OgfAB H0UmmSccMHZEwy2ViX9y7IS2vBU+U1CnBlCnsblxUbMCTLlMjCQdv11o/xc75A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1669958493; 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=ZvfScMP2BuL7gzAfLP/XQxtd9PBfRtjSCkOXop04adk=; b=bC6P2zhP79bYRT3lYVA9PS4v8Jo0W0uYW8owzcvW4zeK0/3X+2iztpyypAXVJL5ypJQ7LF hSt7YbDyZXdMSp1T+F9kEkHXuwJAsgxOpQ6xFPOytUt7Oy48uqvVYnCBkbVHpPUa9qgD+H OQWB4xf20avPehrgGdWAbNczItJkuG2DBdpDSMzm0L19jkzAGZeim3iZY0f81MAisJPEI1 D4Sba6UXpNOCEs3JxkkbOOl4wswK7sfGy5bZjregUrFULos/l1iD+bIBQHqz8oW8lkXcw7 eOPFzDAH0H8dV42e8MpyCrfND0dsOUzAcc0eO7vlw0+yZh7nSwmj8fq07px8TA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1669958493; a=rsa-sha256; cv=none; b=Bd0mly4fCmvbuHvBiZILTmsvNmttXpDGntk/NXxFwxT+F+wav4jl6dYhSNC/BRb/45kABz Re+4iTf/owFzpGkaze7bnIadHZgxBgsaEgc0DRPZ65JJYsy87YeJV2lVdDtNr0sr5Ur4nu 7sP1abo3ivuSGq+WJpKO/Yu1vHlEf1ruKDLEBrBL4AO4wFcMUsdad0HW+QQZMru4o2pKKJ c8jpXEttxxuRvpt1ZSRQQcb2ji/tpHoS6VthZqmDO3HA8SA1RFoyPeexUV6nDb4n/qay2t bBX3lHuP0T1364jWZwve7zLfM001B13bU2LVoegAEe4NAjmdj1CBzE1A81DMEw== 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 4NNhBN6jmkz14Gb; Fri, 2 Dec 2022 05:21:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2B25LWpb055002; Fri, 2 Dec 2022 05:21:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2B25LWVB055001; Fri, 2 Dec 2022 05:21:32 GMT (envelope-from git) Date: Fri, 2 Dec 2022 05:21:32 GMT Message-Id: <202212020521.2B25LWVB055001@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: d2ce00e9a617 - main - Allow any user to read the NFS stats, for example with nfsstat(1). List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d2ce00e9a6176014bbeb792dd9959ef1e60d787e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=d2ce00e9a6176014bbeb792dd9959ef1e60d787e commit d2ce00e9a6176014bbeb792dd9959ef1e60d787e Author: Alan Somers AuthorDate: 2022-12-01 21:08:01 +0000 Commit: Alan Somers CommitDate: 2022-12-02 05:21:14 +0000 Allow any user to read the NFS stats, for example with nfsstat(1). This was originally allowed by 3cea29603d3 (2011). But it got broken by 693957f8861 (2016) and apparently nobody noticed. MFC after: 1 week Sponsored by: Axcient Reviewed by: rmacklem, ken Differential Revision: https://reviews.freebsd.org/D37589 --- sys/nfs/nfs_nfssvc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/nfs/nfs_nfssvc.c b/sys/nfs/nfs_nfssvc.c index a16ff8b36448..bf22817d2b25 100644 --- a/sys/nfs/nfs_nfssvc.c +++ b/sys/nfs/nfs_nfssvc.c @@ -85,7 +85,7 @@ sys_nfssvc(struct thread *td, struct nfssvc_args *uap) AUDIT_ARG_CMD(uap->flag); /* Allow anyone to get the stats. */ - if ((uap->flag & ~NFSSVC_GETSTATS) != 0) { + if ((uap->flag & ~(NFSSVC_GETSTATS | NFSSVC_NEWSTRUCT)) != 0) { error = priv_check(td, PRIV_NFS_DAEMON); if (error != 0) return (error);