git: 1961075a6972 - stable/13 - Allow any user to read the NFS stats, for example with nfsstat(1).
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 27 Jan 2023 17:11:59 UTC
The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=1961075a69726327c14b62e59b45a1de388e688e commit 1961075a69726327c14b62e59b45a1de388e688e Author: Alan Somers <asomers@FreeBSD.org> AuthorDate: 2022-12-01 21:08:01 +0000 Commit: Alan Somers <asomers@FreeBSD.org> CommitDate: 2023-01-27 17:11:45 +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. Sponsored by: Axcient Reviewed by: rmacklem, ken Differential Revision: https://reviews.freebsd.org/D37589 (cherry picked from commit d2ce00e9a6176014bbeb792dd9959ef1e60d787e) --- 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);