Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
alpine
aports
Commits
35e2993f
Commit
35e2993f
authored
Oct 26, 2018
by
Natanael Copa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
main/net-snmp: upgrade to 5.8
parent
90c7f820
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
2684 deletions
+5
-2684
main/net-snmp/APKBUILD
main/net-snmp/APKBUILD
+5
-11
main/net-snmp/CVE-2015-5621.patch
main/net-snmp/CVE-2015-5621.patch
+0
-132
main/net-snmp/fix-Makefile-PL.patch
main/net-snmp/fix-Makefile-PL.patch
+0
-22
main/net-snmp/remove-U64-typedef.patch
main/net-snmp/remove-U64-typedef.patch
+0
-2519
No files found.
main/net-snmp/APKBUILD
View file @
35e2993f
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
pkgname
=
net-snmp
pkgver
=
5.
7.3
pkgrel
=
11
pkgver
=
5.
8
pkgrel
=
0
pkgdesc
=
"Simple Network Management Protocol"
url
=
"http://www.net-snmp.org/"
arch
=
"all"
license
=
"GPL"
depends
=
depends_dev
=
"
libre
ssl-dev"
depends_dev
=
"
open
ssl-dev"
# we need perl-net-snmp in make depends for bootstrapping issues
# net-snmp-gui subpackage has perl-net-snmp as depends
makedepends
=
"file perl-dev
libre
ssl-dev perl-net-snmp linux-headers"
makedepends
=
"file perl-dev
open
ssl-dev perl-net-snmp linux-headers"
subpackages
=
"
$pkgname
-doc
$pkgname
-dev
$pkgname
-libs
$pkgname
-agent-libs:alibs
$pkgname
-perl:pl
$pkgname
-gui
$pkgname
-tools"
source
=
"https://downloads.sourceforge.net/
$pkgname
/
$pkgname
-
$pkgver
.tar.gz
netsnmp-swinst-crash.patch
fix-includes.patch
CVE-2015-5621.patch
remove-U64-typedef.patch
fix-Makefile-PL.patch
snmpd.initd
snmpd.confd
...
...
@@ -144,12 +141,9 @@ tools() {
mv
"
$pkgdir
"
/usr/bin
"
$subpkgdir
"
/usr
}
sha512sums
=
"
0758bba5844cfd6c80959ac16b83906a2f830ba49fd0ab1bf9e191dc6a79d312a2e4760bd53b3e1a1c82759481f0064d088d5a3cf475d84b2567
9a
6
bd
0f049bb
net-snmp-5.
7.3
.tar.gz
sha512sums
=
"
27895a583b23f3e14c48562bc32f3ba83513d81aa848e878be9a3650f0458d45950635c937ef627135f80b757b663e71fab
9a
3
bd
e4fd91889153998ae3468fe7
net-snmp-5.
8
.tar.gz
4ad92f50b14d5e27ba86256cc532a2dd055502f4d5fbb1700434f9f01f881fd09bb1eadb94e727554e1470f036707558314c64a66d0376b54e71ab31d5e4baa3 netsnmp-swinst-crash.patch
87a552bd2e41684bba6e87fbcf6454a85ee912d7a339411fda24cebddf7661f0856729e076a917920a542cf84b687ffd90a091daa15f2c48f0ff64f3a53c0ddb fix-includes.patch
2b2a7be54a570e3c1bb701f8ccfb98ea8e50a19fda021f43a521d4e968ded1bc5e794fc4348dff7fcdf57da34ff6b555398851bbccfcf92bb75ad6f365a80dba CVE-2015-5621.patch
25e45c493b8da74cb12a8094d12a4f0ee1f59b60df648a958ebc7b0a33b4f350d9c5bf1e6f6ff372d78e066c369d99f2ae549b5d5d1daa969e3ef301fc820c29 remove-U64-typedef.patch
d17058976fd635f153ff2e5d798807dde4d89071c252ea1223d93cc169270bb39cdd2c84ee4d01c05c9a0b6df80b92ceae3e1078e41f94e6077d7275661898e9 fix-Makefile-PL.patch
896ef65a6f420073746470cdbd0de8f356c5b936d35e131754905b3d4323c24dcd3a09e0cc8bd90b12e3402f01e478f927f0e4163cb85cb0cc03db3c2e0491f4 snmpd.initd
fb101aa758d741ed3ea88b11f1cd49cfd04bd03ce62435f3acb17724748131c57f00b71fd45cb7e7871d65a1aab576652cd6e158b6406aa6d0998582b8235ef5 snmpd.confd
073fd2b83eedd6eda1f7345350268ce7946ef6d67a8f26f7c232e46feb75babf68272ae12071a2f9ea76ede71393b3ae4672d3cd47cfd14ab77e3a6482f2e124 snmptrapd.confd"
main/net-snmp/CVE-2015-5621.patch
deleted
100644 → 0
View file @
90c7f820
From 3714c5be3212d2af61545439eeb432e5d84a8d39 Mon Sep 17 00:00:00 2001
From: Robert Story <rstory@localhost>
Date: Sat, 11 Apr 2015 18:49:02 -0400
Subject: [PATCH] CHANGES: BUG: #2615: Don't return incompletely parsed
varbinds
---
snmplib/snmp_api.c | 55 +++++++++++++++++++++++++++---------------------------
1 file changed, 28 insertions(+), 27 deletions(-)
diff --git a/snmplib/snmp_api.c b/snmplib/snmp_api.c
index 191debf..adae4e4 100644
--- a/snmplib/snmp_api.c
+++ b/snmplib/snmp_api.c
@@ -4350,10 +4350,9 @@
snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length)
u_char type;
u_char msg_type;
u_char *var_val;
- int badtype = 0;
size_t len;
size_t four;
- netsnmp_variable_list *vp = NULL;
+ netsnmp_variable_list *vp = NULL, *vplast = NULL;
oid objid[MAX_OID_LEN];
u_char *p;
@@ -4493,38 +4492,24 @@
snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length)
(ASN_SEQUENCE | ASN_CONSTRUCTOR),
"varbinds");
if (data == NULL)
- return -1;
+ goto fail;
/*
* get each varBind sequence
*/
while ((int) *length > 0) {
- netsnmp_variable_list *vptemp;
- vptemp = (netsnmp_variable_list *) malloc(sizeof(*vptemp));
- if (NULL == vptemp) {
- return -1;
- }
- if (NULL == vp) {
- pdu->variables = vptemp;
- } else {
- vp->next_variable = vptemp;
- }
- vp = vptemp;
+ vp = SNMP_MALLOC_TYPEDEF(netsnmp_variable_list);
+ if (NULL == vp)
+ goto fail;
- vp->next_variable = NULL;
- vp->val.string = NULL;
vp->name_length = MAX_OID_LEN;
- vp->name = NULL;
- vp->index = 0;
- vp->data = NULL;
- vp->dataFreeHook = NULL;
DEBUGDUMPSECTION("recv", "VarBind");
data = snmp_parse_var_op(data, objid, &vp->name_length, &vp->type,
&vp->val_len, &var_val, length);
if (data == NULL)
- return -1;
+ goto fail;
if (snmp_set_var_objid(vp, objid, vp->name_length))
- return -1;
+ goto fail;
len = MAX_PACKET_LENGTH;
DEBUGDUMPHEADER("recv", "Value");
@@ -4604,7 +4589,7 @@
snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length)
vp->val.string = (u_char *) malloc(vp->val_len);
}
if (vp->val.string == NULL) {
- return -1;
+ goto fail;
}
p = asn_parse_string(var_val, &len, &vp->type, vp->val.string,
&vp->val_len);
@@ -4619,7 +4604,7 @@
snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length)
vp->val_len *= sizeof(oid);
vp->val.objid = (oid *) malloc(vp->val_len);
if (vp->val.objid == NULL) {
- return -1;
+ goto fail;
}
memmove(vp->val.objid, objid, vp->val_len);
break;
@@ -4631,7 +4616,7 @@
snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length)
case ASN_BIT_STR:
vp->val.bitstring = (u_char *) malloc(vp->val_len);
if (vp->val.bitstring == NULL) {
- return -1;
+ goto fail;
}
p = asn_parse_bitstring(var_val, &len, &vp->type,
vp->val.bitstring, &vp->val_len);
@@ -4640,12 +4625,28 @@
snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length)
break;
default:
snmp_log(LOG_ERR, "bad type returned (%x)\n", vp->type);
- badtype = -1;
+ goto fail;
break;
}
DEBUGINDENTADD(-4);
+
+ if (NULL == vplast) {
+ pdu->variables = vp;
+ } else {
+ vplast->next_variable = vp;
+ }
+ vplast = vp;
+ vp = NULL;
}
- return badtype;
+ return 0;
+
+ fail:
+ DEBUGMSGTL(("recv", "error while parsing VarBindList\n"));
+ /** if we were parsing a var, remove it from the pdu and free it */
+ if (vp)
+ snmp_free_var(vp);
+
+ return -1;
}
/*
--
2.5.0
main/net-snmp/fix-Makefile-PL.patch
deleted
100644 → 0
View file @
90c7f820
diff -up net-snmp-5.7.3/perl/ASN/Makefile.PL.orig net-snmp-5.7.3/perl/ASN/Makefile.PL
--- net-snmp-5.7.3/perl/ASN/Makefile.PL.orig 2016-05-06 10:35:30.005905040 +0200
+++ net-snmp-5.7.3/perl/ASN/Makefile.PL 2016-05-06 10:35:57.518776400 +0200
@@ -3,6 +3,7 @@
require 5;
use Config;
use Getopt::Long;
my $lib_version;
+my %MakeParams = ();
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
diff -up net-snmp-5.7.3/perl/Makefile.PL.orig net-snmp-5.7.3/perl/Makefile.PL
--- net-snmp-5.7.3/perl/Makefile.PL.orig 2016-05-06 10:34:38.975143641 +0200
+++ net-snmp-5.7.3/perl/Makefile.PL 2016-05-06 10:35:13.326983024 +0200
@@ -2,6 +2,7 @@
use ExtUtils::MakeMaker;
use Config;
use Getopt::Long;
require 5;
+my %MakeParams = ();
%MakeParams = InitMakeParams();
main/net-snmp/remove-U64-typedef.patch
deleted
100644 → 0
View file @
90c7f820
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment