Summary: | net-mgmt/net-snmp: Always pass valid flags to getfsstat() | ||||||
---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | John Baldwin <jhb> | ||||
Component: | Individual Port(s) | Assignee: | Ryan Steinmetz <zi> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | CC: | slw | ||||
Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(zi) |
||||
Version: | Latest | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
(In reply to John Baldwin from comment #0) Yes, this work for me This probably warrants a port revision bump as well. Approved, please open a ticket upstream as well if you can. Created upstream bug report: https://sourceforge.net/p/net-snmp/patches/1340/ A commit references this bug: Author: jhb Date: Mon Apr 10 17:17:33 UTC 2017 New revision: 438192 URL: https://svnweb.freebsd.org/changeset/ports/438192 Log: Always pass MNT_NOWAIT to getfsstat() as documented in the manpage. One of the four calls in net-snmp currently passes 0 which triggers an EINVAL change after recent changes in HEAD and 11-stable to add stricter argument checking for the flags passed to getsstat(). Bump PORTREVISION. PR: 218011 Reported by: Slawa Olhovchenkov <slw@zxy.spb.ru> Reviewed by: brooks Approved by: maintainer (zi) Changes: head/net-mgmt/net-snmp/Makefile head/net-mgmt/net-snmp/files/patch-agent_mibgroup_hardware_fsys_fsys__getfsstats.c FYI, patch accepted upstream. |
Created attachment 181062 [details] net-snmp.getfsstat.patch The getfsstat() manpage says that the last argument should either be MNT_NOWAIT or MNT_WAIT. I recently changed the code in HEAD (and then merged to stable/11) to validate this argument so that invalid values are rejected with EINVAL. net-snmp calls getfsstat() in 4 places, 3 of which use MNT_NOWAIT and 1 which passes '0'. This patch fixes the 4th instance to use MNT_NOWAIT. Issue reported by Slawa (cc'd). I've only tested that the patch applies, I have not run-tested this. Hopefully Slawa can verify the patch works correctly at runtime.