From 92053aec57b2182cf88b25557ef366ecbc2f4a40 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: May 14 2018 13:01:36 +0000 Subject: import net-snmp-5.7.2-33.el7_5.2 --- diff --git a/SOURCES/net-snmp-5.7.2-acfs.patch b/SOURCES/net-snmp-5.7.2-acfs.patch new file mode 100644 index 0000000..0bfe198 --- /dev/null +++ b/SOURCES/net-snmp-5.7.2-acfs.patch @@ -0,0 +1,24 @@ +diff -up net-snmp-5.7.2/agent/mibgroup/hardware/fsys/fsys_mntent.c.orig net-snmp-5.7.2/agent/mibgroup/hardware/fsys/fsys_mntent.c +--- net-snmp-5.7.2/agent/mibgroup/hardware/fsys/fsys_mntent.c.orig 2018-04-05 18:29:29.042682282 +0200 ++++ net-snmp-5.7.2/agent/mibgroup/hardware/fsys/fsys_mntent.c 2018-04-05 19:03:16.270523986 +0200 +@@ -142,6 +142,7 @@ _fsys_type( char *typename ) + !strcmp(typename, MNTTYPE_SIMFS) || + !strcmp(typename, MNTTYPE_VZFS) || + !strcmp(typename, MNTTYPE_BTRFS) || ++ !strcmp(typename, MNTTYPE_ACFS) || + !strcmp(typename, MNTTYPE_LOFS)) + return NETSNMP_FS_TYPE_OTHER; + +diff -up net-snmp-5.7.2/agent/mibgroup/hardware/fsys/mnttypes.h.orig net-snmp-5.7.2/agent/mibgroup/hardware/fsys/mnttypes.h +--- net-snmp-5.7.2/agent/mibgroup/hardware/fsys/mnttypes.h.orig 2018-04-05 18:28:36.694091896 +0200 ++++ net-snmp-5.7.2/agent/mibgroup/hardware/fsys/mnttypes.h 2018-04-05 20:14:55.695813461 +0200 +@@ -151,6 +151,9 @@ + #ifndef MNTTYPE_BTRFS + #define MNTTYPE_BTRFS "btrfs" + #endif ++#ifndef MNTTYPE_ACFS ++#define MNTTYPE_ACFS "acfs" ++#endif + + /* + * File systems to skip diff --git a/SOURCES/net-snmp-5.7.2-leak-backport.patch b/SOURCES/net-snmp-5.7.2-leak-backport.patch new file mode 100644 index 0000000..89afb0b --- /dev/null +++ b/SOURCES/net-snmp-5.7.2-leak-backport.patch @@ -0,0 +1,49 @@ +diff -up net-snmp-5.7.2/snmplib/snmp_api.c.original net-snmp-5.7.2/snmplib/snmp_api.c +--- net-snmp-5.7.2/snmplib/snmp_api.c.original 2018-01-12 17:46:47.534166712 +0900 ++++ net-snmp-5.7.2/snmplib/snmp_api.c 2018-01-12 17:48:09.420911255 +0900 +@@ -4974,6 +4974,9 @@ _sess_async_send(void *sessp, + + reqid = pdu->reqid; + ++ if (0 == reqid && (SNMPERR_SUCCESS == session->s_snmp_errno)) ++ ++reqid; ++ + /* + * Add to pending requests list if we expect a response. + */ +diff -up net-snmp-5.7.2/snmplib/snmp_client.c.original net-snmp-5.7.2/snmplib/snmp_client.c +--- net-snmp-5.7.2/snmplib/snmp_client.c.original 2018-01-12 17:48:21.814721234 +0900 ++++ net-snmp-5.7.2/snmplib/snmp_client.c 2018-01-12 18:33:55.779642445 +0900 +@@ -1044,11 +1044,13 @@ snmp_synch_response_cb(netsnmp_session * + ss->callback = pcb; + ss->callback_magic = (void *) state; + +- if ((state->reqid = snmp_send(ss, pdu)) == 0) { ++ if (snmp_send(ss, pdu) == 0) { + snmp_free_pdu(pdu); + state->status = STAT_ERROR; +- } else ++ } else { ++ state->reqid = pdu->reqid; + state->waiting = 1; ++ } + + while (state->waiting) { + numfds = 0; +@@ -1136,11 +1138,13 @@ snmp_sess_synch_response(void *sessp, + ss->callback = snmp_synch_input; + ss->callback_magic = (void *) state; + +- if ((state->reqid = snmp_sess_send(sessp, pdu)) == 0) { ++ if (snmp_sess_send(sessp, pdu) == 0) { + snmp_free_pdu(pdu); + state->status = STAT_ERROR; +- } else ++ } else { ++ state->reqid = pdu->reqid; + state->waiting = 1; ++ } + + while (state->waiting) { + numfds = 0; + diff --git a/SPECS/net-snmp.spec b/SPECS/net-snmp.spec index 7f7cd47..a59db4f 100644 --- a/SPECS/net-snmp.spec +++ b/SPECS/net-snmp.spec @@ -11,14 +11,14 @@ Summary: A collection of SNMP protocol tools and libraries Name: net-snmp Version: 5.7.2 -Release: 32%{?dist} +Release: 33%{?dist}.2 Epoch: 1 License: BSD Group: System Environment/Daemons URL: http://net-snmp.sourceforge.net/ Source0: net-snmp-%{version}-noapsl.tar.gz -# Original source: http://dl.sourceforge.net/net-snmp/net-snmp-%{version}.tar.gz +# Original source: http://dl.sourceforge.net/net-snmp/net-snmp-%%{version}.tar.gz # Net-snmp contains code licensed under APSL 1.1. This code is used on MacOS only, # and it must be removed from source code before we distribute source RPM. # Download the upstream tarball and invoke this script while in the @@ -101,6 +101,8 @@ Patch64: net-snmp-5.7.2-strstr.patch Patch66: net-snmp-5.7.2-documentation.patch Patch67: net-snmp-5.7.2-iterator-fix.patch Patch68: net-snmp-5.7.2-autofs.patch +Patch69: net-snmp-5.7.2-leak-backport.patch +Patch70: net-snmp-5.7.2-acfs.patch Requires(post): chkconfig Requires(preun): chkconfig @@ -322,6 +324,8 @@ The net-snmp-sysvinit package provides SysV init scripts for Net-SNMP daemons. %patch66 -p1 -b .documentation %patch67 -p1 -b .iteratorpatch %patch68 -p1 -b .autofspatch +%patch69 -p1 -b .leak-backport +%patch70 -p1 -b .acfs %ifarch sparc64 s390 s390x # disable failing test - see https://bugzilla.redhat.com/show_bug.cgi?id=680697 @@ -617,6 +621,15 @@ rm -rf ${RPM_BUILD_ROOT} %{_initrddir}/snmptrapd %changelog +* Mon Apr 23 2018 Josef Ridky - 1:5.7.2-33.2 +- Add ACFS support (#1570506) + +* Wed Mar 28 2018 Josef Ridky - 1:5.7.2-33.1 +- Build for z-stream (#1560965) + +* Tue Mar 27 2018 Josef Ridky - 1:5.7.2-33 +- Backport upstream leak fix (#1533780) + * Wed Jan 24 2018 Josef Ridky - 1:5.7.2-32 - Add net-snmp as requirement of net-snmp-devel