Accepting request 250674 from net-snmp:factory

1

OBS-URL: https://build.opensuse.org/request/show/250674
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/net-snmp?expand=0&rev=73
This commit is contained in:
Stephan Kulow 2014-09-24 11:09:09 +00:00 committed by Git OBS Bridge
parent 281cb3f888
commit ad2d489012
8 changed files with 54 additions and 147 deletions

View File

@ -1,33 +0,0 @@
commit 4a6d0378a3916571ce7604c4a3d54a8c96a8f807
Author: Bart Van Assche <bvanassche@acm.org>
Date: Sun Oct 28 09:54:12 2012 -0700
Windows: Visual Studio 6 build fix for strlcat()
Index: net-snmp-5.7.2/snmplib/strlcat.c
===================================================================
--- net-snmp-5.7.2.orig/snmplib/strlcat.c
+++ net-snmp-5.7.2/snmplib/strlcat.c
@@ -37,7 +37,7 @@
* If retval >= siz, truncation occurred.
*/
size_t
-strlcat(char * __restrict dst, const char * __restrict src, size_t siz)
+strlcat(char *dst, const char *src, size_t siz)
{
char *d = dst;
const char *s = src;
Index: net-snmp-5.7.2/include/net-snmp/library/system.h
===================================================================
--- net-snmp-5.7.2.orig/include/net-snmp/library/system.h
+++ net-snmp-5.7.2/include/net-snmp/library/system.h
@@ -196,8 +196,7 @@ SOFTWARE.
#endif
#ifndef HAVE_STRLCAT
NETSNMP_IMPORT
- size_t strlcat(char * __restrict, const char * __restrict,
- size_t);
+ size_t strlcat(char *, const char *, size_t);
#endif
int netsnmp_os_prematch(const char *ospmname,

View File

@ -1,57 +0,0 @@
commit 78dac6e37943d1ad99841898806ea60b0eede636
Author: Wes Hardaker <hardaker@users.sourceforge.net>
Date: Mon Jul 22 12:39:00 2013 -0700
fix bug number #a2478: fix mib representation of timeout values
commit 390303059fbd98b1ee7621ddd4ad4c11d100fff9
Author: Magnus Fromreide <magfr@lysator.liu.se>
Date: Sun Jul 28 21:28:14 2013 +0200
Revert 78dac6e37943d1ad99841898806ea60b0eede636 and resolve a2478 in a way that avoids truncating snmpTargetAddrTimeout.
commit 96302af7fc3108c208227432f0f0b75f3e7b906d
Author: Magnus Fromreide <magfr@lysator.liu.se>
Date: Wed Aug 28 10:59:05 2013 +0200
Correct conversion factor from microseconds to centiseconds.
Index: net-snmp-5.7.2/agent/mibgroup/target/snmpTargetAddrEntry.h
===================================================================
--- net-snmp-5.7.2.orig/agent/mibgroup/target/snmpTargetAddrEntry.h
+++ net-snmp-5.7.2/agent/mibgroup/target/snmpTargetAddrEntry.h
@@ -51,7 +51,7 @@ config_add_mib(SNMPv2-TM)
int tDomainLen;
unsigned char *tAddress;
size_t tAddressLen;
- int timeout;
+ int timeout; /* Timeout in centiseconds */
int retryCount;
char *tagList;
char *params;
Index: net-snmp-5.7.2/agent/mibgroup/target/target.c
===================================================================
--- net-snmp-5.7.2.orig/agent/mibgroup/target/target.c
+++ net-snmp-5.7.2/agent/mibgroup/target/target.c
@@ -240,7 +240,7 @@ get_target_sessions(char *taglist, Targe
}
#endif
memset(&thissess, 0, sizeof(thissess));
- thissess.timeout = (targaddrs->timeout) * 1000;
+ thissess.timeout = (targaddrs->timeout) * 10000;
thissess.retries = targaddrs->retryCount;
DEBUGMSGTL(("target_sessions",
"timeout: %d -> %ld\n",
Index: net-snmp-5.7.2/agent/mibgroup/notification/snmpNotifyTable.c
===================================================================
--- net-snmp-5.7.2.orig/agent/mibgroup/notification/snmpNotifyTable.c
+++ net-snmp-5.7.2/agent/mibgroup/notification/snmpNotifyTable.c
@@ -331,7 +331,7 @@ notifyTable_register_notifications(int m
ptr->tAddressLen = t->remote_length;
ptr->tAddress = t->remote;
- ptr->timeout = ss->timeout / 1000;
+ ptr->timeout = ss->timeout / 10000;
ptr->retryCount = ss->retries;
SNMP_FREE(ptr->tagList);
ptr->tagList = strdup(ptr->name);

View File

@ -1,27 +0,0 @@
diff -Nur net-snmp-5.7.2.1-orig/perl/TrapReceiver/TrapReceiver.xs net-snmp-5.7.2.1/perl/TrapReceiver/TrapReceiver.xs
--- net-snmp-5.7.2.1-orig/perl/TrapReceiver/TrapReceiver.xs 2014-02-20 01:36:42.000000000 +0100
+++ net-snmp-5.7.2.1/perl/TrapReceiver/TrapReceiver.xs 2014-09-02 12:06:50.070037000 +0200
@@ -81,18 +81,18 @@
STOREPDUi("securitymodel", pdu->securityModel);
STOREPDUi("securitylevel", pdu->securityLevel);
STOREPDU("contextName",
- newSVpv(pdu->contextName, pdu->contextNameLen));
+ newSVpv(pdu->contextName ? pdu->contextName : "", pdu->contextNameLen));
STOREPDU("contextEngineID",
- newSVpv((char *) pdu->contextEngineID,
+ newSVpv(pdu->contextEngineID ? (char *) pdu->contextEngineID : "",
pdu->contextEngineIDLen));
STOREPDU("securityEngineID",
- newSVpv((char *) pdu->securityEngineID,
+ newSVpv(pdu->securityEngineID ? (char *) pdu->securityEngineID : "",
pdu->securityEngineIDLen));
STOREPDU("securityName",
- newSVpv((char *) pdu->securityName, pdu->securityNameLen));
+ newSVpv(pdu->securityName ? (char *) pdu->securityName : "", pdu->securityNameLen));
} else {
STOREPDU("community",
- newSVpv((char *) pdu->community, pdu->community_len));
+ newSVpv(pdu->community ? (char *) pdu->community : "", pdu->community_len));
}
if (transport && transport->f_fmtaddr) {

View File

@ -1,6 +1,23 @@
--- net-snmp-5.7.2.1-orig/snmplib/mib.c 2014-02-20 01:36:42.000000000 +0100
+++ net-snmp-5.7.2.1-patched/snmplib/mib.c 2014-09-02 15:07:17.902832000 +0200
@@ -464,17 +464,16 @@
commit 7f4a7b891332899cea26e95be0337aae01648742
Author: Jan Safranek <jsafranek@users.sourceforge.net>
Date: Thu Jul 31 13:46:49 2014 +0200
Added checks for printing variables with wrong types.
When -OQ command line argument is used, variable formatter preffers the type
of the varible parsed from a MIB file instead of checking type of the variable
as parsed from SNMP message.
This can lead to crashes when incoming packets contains a variable with
NULL type, while the MIB says the variable should be non-NULL, like Integer.
The formatter then tries to interpret the NULL (from packet) as Integer (from
MIB file).
Index: net-snmp-5.7.3.pre5/snmplib/mib.c
===================================================================
--- net-snmp-5.7.3.pre5.orig/snmplib/mib.c
+++ net-snmp-5.7.3.pre5/snmplib/mib.c
@@ -464,17 +464,16 @@ sprint_realloc_octet_string(u_char ** bu
u_char *cp;
int output_format, cnt;
@ -26,7 +43,7 @@
}
@@ -742,16 +741,16 @@
@@ -742,16 +741,16 @@ sprint_realloc_float(u_char ** buf, size
const struct enum_list *enums,
const char *hint, const char *units)
{
@ -51,7 +68,7 @@
}
if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRINT)) {
@@ -812,17 +811,16 @@
@@ -812,17 +811,16 @@ sprint_realloc_double(u_char ** buf, siz
const struct enum_list *enums,
const char *hint, const char *units)
{
@ -77,7 +94,7 @@
}
if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRINT)) {
@@ -887,20 +885,21 @@
@@ -887,20 +885,21 @@ sprint_realloc_counter64(u_char ** buf,
{
char a64buf[I64CHARSZ + 1];
@ -107,7 +124,7 @@
}
if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRINT)) {
@@ -988,23 +987,25 @@
@@ -988,23 +987,25 @@ sprint_realloc_opaque(u_char ** buf, siz
const struct enum_list *enums,
const char *hint, const char *units)
{
@ -141,7 +158,7 @@
#ifdef NETSNMP_WITH_OPAQUE_SPECIAL_TYPES
switch (var->type) {
case ASN_OPAQUE_COUNTER64:
@@ -1080,17 +1081,16 @@
@@ -1080,17 +1081,16 @@ sprint_realloc_object_identifier(u_char
{
int buf_overflow = 0;
@ -167,7 +184,7 @@
}
if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRINT)) {
@@ -1150,16 +1150,16 @@
@@ -1150,16 +1150,16 @@ sprint_realloc_timeticks(u_char ** buf,
{
char timebuf[40];
@ -192,7 +209,7 @@
}
if (netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_NUMERIC_TIMETICKS)) {
@@ -1298,17 +1298,18 @@
@@ -1317,17 +1317,18 @@ sprint_realloc_integer(u_char ** buf, si
{
char *enum_string = NULL;
@ -219,7 +236,7 @@
for (; enums; enums = enums->next) {
if (enums->value == *var->val.integer) {
enum_string = enums->label;
@@ -1401,16 +1402,16 @@
@@ -1420,16 +1421,16 @@ sprint_realloc_uinteger(u_char ** buf, s
{
char *enum_string = NULL;
@ -244,7 +261,7 @@
}
for (; enums; enums = enums->next) {
@@ -1498,17 +1499,16 @@
@@ -1517,17 +1518,16 @@ sprint_realloc_gauge(u_char ** buf, size
{
char tmp[32];
@ -270,7 +287,7 @@
}
if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRINT)) {
@@ -1571,16 +1571,16 @@
@@ -1590,16 +1590,16 @@ sprint_realloc_counter(u_char ** buf, si
{
char tmp[32];
@ -295,7 +312,7 @@
}
if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRINT)) {
@@ -1634,16 +1634,16 @@
@@ -1653,16 +1653,16 @@ sprint_realloc_networkaddress(u_char **
{
size_t i;
@ -320,7 +337,7 @@
}
if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRINT)) {
@@ -1700,16 +1700,16 @@
@@ -1719,16 +1719,16 @@ sprint_realloc_ipaddress(u_char ** buf,
{
u_char *ip = var->val.string;
@ -345,7 +362,7 @@
}
if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRINT)) {
@@ -1758,20 +1758,20 @@
@@ -1777,20 +1777,20 @@ sprint_realloc_null(u_char ** buf, size_
const struct enum_list *enums,
const char *hint, const char *units)
{
@ -377,7 +394,7 @@
}
@@ -1806,16 +1806,16 @@
@@ -1825,16 +1825,16 @@ sprint_realloc_bitstring(u_char ** buf,
u_char *cp;
char *enum_string;
@ -402,7 +419,7 @@
}
if (netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRINT)) {
@@ -1890,16 +1890,16 @@
@@ -1909,16 +1909,16 @@ sprint_realloc_nsapaddress(u_char ** buf
const struct enum_list *enums, const char *hint,
const char *units)
{

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e2df7583c04bfcb560e564083661f7b98e88eb08a45cb8e5010beb57f4b28054
size 6281445

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bcc6ab55f90e963b51bb34941c846979ecf62a5b385835d090ecdca5efad32e0
size 6375630

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Mon Sep 15 14:29:16 UTC 2014 - lchiquitto@suse.com
- update to upstream version 5.7.3.pre5
- remove patches that are now present in the upstream release:
* net-snmp-5.7.2-build-fix-for-strlcat.patch
* net-snmp-5.7.2-fix-mib-representation-of-timeout-values.patch
* net-snmp-5.7.2-fix-perl-trap-handler.patch
- net-snmp-5.7.2-fix-snmptrapd-remote-denial-of-service.patch:
refresh and add patch header
-------------------------------------------------------------------
Wed Sep 3 19:35:54 UTC 2014 - abergmann@suse.com

View File

@ -32,8 +32,10 @@
%define netsnmp_agentx_socket_dir_fhs %{_rundir}/agentx
%define netsnmp_agentx_socket_dir_rfc /var/agentx
%define tarver 5.7.3.pre5
Name: net-snmp
Version: 5.7.2.1
Version: 5.7.3
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: openssl-devel
@ -50,7 +52,7 @@ Requires: perl-TermReadKey
PreReq: %insserv_prereq %fillup_prereq /sbin/chkconfig
Url: http://sourceforge.net/projects/net-snmp
#Source: http://sourceforge.net/projects/net-snmp/files/net-snmp/%{version}/%{pkg_name}-%{version}.tar.gz
Source: %{pkg_name}-%{version}.tar.gz
Source: %{pkg_name}-%{tarver}.tar.gz
Source1: rc.snmpd
Source2: snmpd.conf
Source3: README.SUSE
@ -66,10 +68,7 @@ Patch3: net-snmp-5.7.2-pie.patch
Patch5: net-snmp-5.7.2-net-snmp-config-headercheck.patch
Patch6: net-snmp-5.7.2-perl-tk-warning.patch
Patch7: net-snmp-5.7.2-velocity-mib.patch
Patch8: net-snmp-5.7.2-build-fix-for-strlcat.patch
Patch9: net-snmp-5.7.2-fix-snmpd-crashing-when-an-agentx-disconnects.patch
Patch10: net-snmp-5.7.2-fix-mib-representation-of-timeout-values.patch
Patch11: net-snmp-5.7.2-fix-perl-trap-handler.patch
Patch12: net-snmp-5.7.2-fix-snmptrapd-remote-denial-of-service.patch
#
Summary: SNMP Daemon
@ -195,17 +194,14 @@ Net-SNMP toolkit library.
%prep
%setup -q -n %{pkg_name}-%{version}
%setup -q -n %{pkg_name}-%{tarver}
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%build