From 965de0227db536b22a234c8b7005a7ea58d7ebd8 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Sep 29 2020 07:09:22 +0000 Subject: import net-snmp-5.7.2-49.el7 --- diff --git a/SOURCES/net-snmp-5.7.2-flood-messages.patch b/SOURCES/net-snmp-5.7.2-flood-messages.patch new file mode 100644 index 0000000..a8f5a3e --- /dev/null +++ b/SOURCES/net-snmp-5.7.2-flood-messages.patch @@ -0,0 +1,12 @@ +diff -urNp a/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c b/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c +--- a/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c 2020-06-04 13:22:32.103942940 +0200 ++++ b/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c 2020-06-04 13:24:44.345231759 +0200 +@@ -232,7 +232,7 @@ _load_v6(netsnmp_container *container, i + + #define PROCFILE "/proc/net/if_inet6" + if (!(in = fopen(PROCFILE, "r"))) { +- DEBUGMSGTL(("access:ipaddress:container","could not open " PROCFILE "\n")); ++ NETSNMP_LOGONCE((LOG_ERR, "ipaddress_linux: could not open " PROCFILE)); + return -2; + } + diff --git a/SOURCES/net-snmp-5.7.2-proc-whitespace.patch b/SOURCES/net-snmp-5.7.2-proc-whitespace.patch new file mode 100644 index 0000000..12923b7 --- /dev/null +++ b/SOURCES/net-snmp-5.7.2-proc-whitespace.patch @@ -0,0 +1,27 @@ +diff -urNp a/agent/mibgroup/host/data_access/swrun_procfs_status.c b/agent/mibgroup/host/data_access/swrun_procfs_status.c +--- a/agent/mibgroup/host/data_access/swrun_procfs_status.c 2020-06-04 13:58:26.944876713 +0200 ++++ b/agent/mibgroup/host/data_access/swrun_procfs_status.c 2020-06-04 14:01:36.146665629 +0200 +@@ -57,7 +57,7 @@ netsnmp_arch_swrun_container_load( netsn + FILE *fp; + int pid, i; + unsigned long long cpu; +- char buf[BUFSIZ], buf2[BUFSIZ], *cp; ++ char buf[BUFSIZ], buf2[BUFSIZ], *cp, *cp1; + netsnmp_swrun_entry *entry; + + procdir = opendir("/proc"); +@@ -169,8 +169,12 @@ netsnmp_arch_swrun_container_load( netsn + cp = buf; + while ( ' ' != *(cp++)) /* Skip first field */ + ; +- while ( ' ' != *(cp++)) /* Skip second field */ +- ; ++ cp1 = cp; /* Skip second field */ ++ while (*cp1) { ++ if (*cp1 == ')') cp = cp1; ++ cp1++; ++ } ++ cp += 2; + + switch (*cp) { + case 'R': entry->hrSWRunStatus = HRSWRUNSTATUS_RUNNING; diff --git a/SPECS/net-snmp.spec b/SPECS/net-snmp.spec index eabe729..8d03000 100644 --- a/SPECS/net-snmp.spec +++ b/SPECS/net-snmp.spec @@ -11,7 +11,7 @@ Summary: A collection of SNMP protocol tools and libraries Name: net-snmp Version: 5.7.2 -Release: 48%{?dist}.1 +Release: 49%{?dist} Epoch: 1 License: BSD @@ -123,6 +123,8 @@ Patch87: net-snmp-5.7.2-counter64.patch Patch88: net-snmp-5.7.2-SHA-fix.patch Patch89: net-snmp-5.7.2-sec-counter.patch Patch90: net-snmp-5.7.2-memory-leak.patch +Patch91: net-snmp-5.7.2-flood-messages.patch +Patch92: net-snmp-5.7.2-proc-whitespace.patch Requires(post): chkconfig Requires(preun): chkconfig @@ -213,6 +215,7 @@ Summary: The perl NET-SNMP module and the mib2c tool Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name}-libs = %{epoch}:%{version}-%{release}, perl Requires: %{name}-agent-libs = %{epoch}:%{version}-%{release} +Requires: %{name}-devel = %{epoch}:%{version}-%{release} BuildRequires: perl %description perl @@ -366,6 +369,8 @@ The net-snmp-sysvinit package provides SysV init scripts for Net-SNMP daemons. %patch88 -p1 -b .SHA-fix %patch89 -p1 -b .sec-counter %patch90 -p1 -b .memory-leak +%patch91 -p1 -b .flood-messages +%patch92 -p1 -b .proc-whitespace %ifarch sparc64 s390 s390x # disable failing test - see https://bugzilla.redhat.com/show_bug.cgi?id=680697 @@ -598,8 +603,6 @@ rm -rf ${RPM_BUILD_ROOT} %{_unitdir}/snmp* %config(noreplace) %{_sysconfdir}/sysconfig/snmpd %config(noreplace) %{_sysconfdir}/sysconfig/snmptrapd -%attr(0755,root,root) %{_bindir}/net-snmp-config* -%attr(0644,root,root) %{_mandir}/man1/net-snmp-config*.1.* %files utils %{_bindir}/encode_keychange @@ -614,6 +617,8 @@ rm -rf ${RPM_BUILD_ROOT} %{_libdir}/lib*.so /usr/include/* %attr(0644,root,root) %{_mandir}/man3/*.3.* +%attr(0755,root,root) %{_bindir}/net-snmp-config* +%attr(0644,root,root) %{_mandir}/man1/net-snmp-config*.1.* %files perl %{_bindir}/mib2c-update @@ -661,8 +666,11 @@ rm -rf ${RPM_BUILD_ROOT} %{_initrddir}/snmptrapd %changelog -* Wed May 06 2020 Josef Ridky - 1:5.7.2-48.1 -- add missing part of memory leak patch (#1832224) +* Thu Jun 04 2020 Josef Ridky - 1:5.7.2-49 +- add missing part of memory leak patch (#1794168) +- fix if_inet6 messages floood (#1765449) +- revert bz#1486733 (#1771050) +- fix issue for process status when process name contains whitespace (#1782180) * Wed Mar 11 2020 Josef Ridky - 1:5.7.2-48 - fix crash due of double-free of security context (#1809076)