[Pkg-net-snmp-commits] [pkg-net-snmp] 01/01: Imported Debian patch 5.7.2.1~dfsg-6.1
Hideki Yamane
henrich at moszumanska.debian.org
Wed Sep 17 07:04:21 UTC 2014
This is an automated email from the git hooks/post-receive script.
henrich pushed a commit to annotated tag debian/5.7.2.1_dfsg-6.1
in repository pkg-net-snmp.
commit 8ed5e71a0c653e871b86ee73e02cbbbb82aa340b
Author: gregor herrmann <gregoa at debian.org>
Date: Fri Jul 18 14:48:18 2014 +0200
Imported Debian patch 5.7.2.1~dfsg-6.1
---
debian/changelog | 23 +-
debian/libsnmp-perl.install | 6 +-
debian/patches/CVE-2014-3565.patch | 455 ---------------------
...ix-kfreebsd-builds-with-kernel-headers-10.patch | 45 ++
debian/patches/fix-request-id-0.patch | 22 +
debian/patches/series | 3 +-
6 files changed, 92 insertions(+), 462 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index a207e4c..50c4b60 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,21 @@
+net-snmp (5.7.2.1~dfsg-6.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Fix "hardcodes /usr/lib/perl5":
+ Make debian/libsnmp-perl.install executable and use $Config{vendorarch} to
+ get the perl library directory. Patch from Niko Tyni.
+ (Closes: #751918)
+ * Fix "FTBFS on kfreebsd-amd64 - 'struct kinfo_proc' has no member
+ named 'kp_eproc'":
+ Add patch from Niko Tyni which fixes a DEFINE that changed between
+ kfreebsd-kernel-headers 9 and 10.
+ (Closes: #753144)
+ * Fix "snmpd: Memory leak when SNMP GET request id is zero":
+ add patch from upstream bug, prepared by Roland Stigge.
+ (Closes: #746225)
+
+ -- gregor herrmann <gregoa at debian.org> Fri, 18 Jul 2014 14:48:18 +0200
+
net-snmp (5.7.2.1~dfsg-6) unstable; urgency=medium
* debian/{snmpd.conf,patches/add_rocommunity6.patch}
@@ -5,11 +23,6 @@ net-snmp (5.7.2.1~dfsg-6) unstable; urgency=medium
(Closes: #746399)
* debian/control
- libsnmp-dev: add "Depends: libpci-dev" (Closes: #744023)
- * debian/patches
- - add CVE-2014-3565.patch taken from upstream to fix CVE-2014-3565
- (Closes: #760132)
- * debian/libsnmp-perl.install
- - adjust path
-- Hideki Yamane <henrich at debian.org> Sun, 04 May 2014 10:55:05 +0900
diff --git a/debian/libsnmp-perl.install b/debian/libsnmp-perl.install
old mode 100644
new mode 100755
index 0204cfb..23df4ff
--- a/debian/libsnmp-perl.install
+++ b/debian/libsnmp-perl.install
@@ -1 +1,5 @@
-usr/lib/*/perl*
+#!/usr/bin/perl -w
+
+use Config;
+# expand the perl binary module directory at build time
+print substr($Config{vendorarch}, 1) . "\n";
diff --git a/debian/patches/CVE-2014-3565.patch b/debian/patches/CVE-2014-3565.patch
deleted file mode 100644
index ed1587e..0000000
--- a/debian/patches/CVE-2014-3565.patch
+++ /dev/null
@@ -1,455 +0,0 @@
-Description: patch for CVE-2014-3565
- taken from http://sourceforge.net/p/net-snmp/official-patches/48/
-
-Origin: upstream
-Bug-Debian: http://bugs.debian.org/760132
-Last-Update: 2012-07-17
-
-
-
-commit 7f4a7b891332899cea26e95be0337aae01648742
-Author: Jan Safranek <jsafranek at 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: pkg-net-snmp/snmplib/mib.c
-===================================================================
---- pkg-net-snmp.orig/snmplib/mib.c 2014-05-15 23:29:58.461566805 +0900
-+++ pkg-net-snmp/snmplib/mib.c 2014-09-15 22:50:53.677839395 +0900
-@@ -464,17 +464,16 @@
- u_char *cp;
- int output_format, cnt;
-
-- if ((var->type != ASN_OCTET_STR) &&
-- (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT))) {
-- const char str[] = "Wrong Type (should be OCTET STRING): ";
-- if (snmp_cstrcat
-- (buf, buf_len, out_len, allow_realloc, str)) {
-- return sprint_realloc_by_type(buf, buf_len, out_len,
-+ if (var->type != ASN_OCTET_STR) {
-+ if (!netsnmp_ds_get_boolean(
-+ NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
-+ const char str[] = "Wrong Type (should be OCTET STRING): ";
-+ if (!snmp_cstrcat(buf, buf_len, out_len, allow_realloc, str))
-+ return 0;
-+ }
-+ return sprint_realloc_by_type(buf, buf_len, out_len,
- allow_realloc, var, NULL, NULL,
- NULL);
-- } else {
-- return 0;
-- }
- }
-
-
-@@ -742,16 +741,16 @@
- const struct enum_list *enums,
- const char *hint, const char *units)
- {
-- if ((var->type != ASN_OPAQUE_FLOAT) &&
-- (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT))) {
-- if (snmp_cstrcat(buf, buf_len, out_len, allow_realloc,
-- "Wrong Type (should be Float): ")) {
-- return sprint_realloc_by_type(buf, buf_len, out_len,
-+ if (var->type != ASN_OPAQUE_FLOAT) {
-+ if (!netsnmp_ds_get_boolean(
-+ NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
-+ u_char str[] = "Wrong Type (should be Float): ";
-+ if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
-+ return 0;
-+ }
-+ return sprint_realloc_by_type(buf, buf_len, out_len,
- allow_realloc, var, NULL, NULL,
- NULL);
-- } else {
-- return 0;
-- }
- }
-
- if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRINT)) {
-@@ -812,17 +811,16 @@
- const struct enum_list *enums,
- const char *hint, const char *units)
- {
-- if ((var->type != ASN_OPAQUE_DOUBLE) &&
-- (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT))) {
-- if (snmp_cstrcat
-- (buf, buf_len, out_len, allow_realloc,
-- "Wrong Type (should be Double): ")) {
-- return sprint_realloc_by_type(buf, buf_len, out_len,
-+ if (var->type != ASN_OPAQUE_DOUBLE) {
-+ if (!netsnmp_ds_get_boolean(
-+ NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
-+ u_char str[] = "Wrong Type (should be Double): ";
-+ if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
-+ return 0;
-+ }
-+ return sprint_realloc_by_type(buf, buf_len, out_len,
- allow_realloc, var, NULL, NULL,
- NULL);
-- } else {
-- return 0;
-- }
- }
-
- if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRINT)) {
-@@ -887,20 +885,21 @@
- {
- char a64buf[I64CHARSZ + 1];
-
-- if ((var->type != ASN_COUNTER64
-+ if (var->type != ASN_COUNTER64
- #ifdef NETSNMP_WITH_OPAQUE_SPECIAL_TYPES
- && var->type != ASN_OPAQUE_COUNTER64
- && var->type != ASN_OPAQUE_I64 && var->type != ASN_OPAQUE_U64
- #endif
-- ) && (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT))) {
-- if (snmp_cstrcat(buf, buf_len, out_len, allow_realloc,
-- "Wrong Type (should be Counter64): ")) {
-- return sprint_realloc_by_type(buf, buf_len, out_len,
-+ ) {
-+ if (!netsnmp_ds_get_boolean(
-+ NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
-+ u_char str[] = "Wrong Type (should be Counter64): ";
-+ if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
-+ return 0;
-+ }
-+ return sprint_realloc_by_type(buf, buf_len, out_len,
- allow_realloc, var, NULL, NULL,
- NULL);
-- } else {
-- return 0;
-- }
- }
-
- if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRINT)) {
-@@ -988,23 +987,25 @@
- const struct enum_list *enums,
- const char *hint, const char *units)
- {
-- if ((var->type != ASN_OPAQUE
-+ if (var->type != ASN_OPAQUE
- #ifdef NETSNMP_WITH_OPAQUE_SPECIAL_TYPES
- && var->type != ASN_OPAQUE_COUNTER64
- && var->type != ASN_OPAQUE_U64
- && var->type != ASN_OPAQUE_I64
- && var->type != ASN_OPAQUE_FLOAT && var->type != ASN_OPAQUE_DOUBLE
- #endif /* NETSNMP_WITH_OPAQUE_SPECIAL_TYPES */
-- ) && (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT))) {
-- if (snmp_cstrcat(buf, buf_len, out_len, allow_realloc,
-- "Wrong Type (should be Opaque): ")) {
-- return sprint_realloc_by_type(buf, buf_len, out_len,
-+ ) {
-+ if (!netsnmp_ds_get_boolean(
-+ NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
-+ u_char str[] = "Wrong Type (should be Opaque): ";
-+ if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
-+ return 0;
-+ }
-+ return sprint_realloc_by_type(buf, buf_len, out_len,
- allow_realloc, var, NULL, NULL,
- NULL);
-- } else {
-- return 0;
-- }
- }
-+
- #ifdef NETSNMP_WITH_OPAQUE_SPECIAL_TYPES
- switch (var->type) {
- case ASN_OPAQUE_COUNTER64:
-@@ -1080,17 +1081,16 @@
- {
- int buf_overflow = 0;
-
-- if ((var->type != ASN_OBJECT_ID) &&
-- (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT))) {
-- u_char str[] =
-- "Wrong Type (should be OBJECT IDENTIFIER): ";
-- if (snmp_strcat(buf, buf_len, out_len, allow_realloc, str)) {
-- return sprint_realloc_by_type(buf, buf_len, out_len,
-+ if (var->type != ASN_OBJECT_ID) {
-+ if (!netsnmp_ds_get_boolean(
-+ NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
-+ u_char str[] = "Wrong Type (should be OBJECT IDENTIFIER): ";
-+ if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
-+ return 0;
-+ }
-+ return sprint_realloc_by_type(buf, buf_len, out_len,
- allow_realloc, var, NULL, NULL,
- NULL);
-- } else {
-- return 0;
-- }
- }
-
- if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRINT)) {
-@@ -1150,16 +1150,16 @@
- {
- char timebuf[40];
-
-- if ((var->type != ASN_TIMETICKS) &&
-- (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT))) {
-- u_char str[] = "Wrong Type (should be Timeticks): ";
-- if (snmp_strcat(buf, buf_len, out_len, allow_realloc, str)) {
-- return sprint_realloc_by_type(buf, buf_len, out_len,
-+ if (var->type != ASN_TIMETICKS) {
-+ if (!netsnmp_ds_get_boolean(
-+ NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
-+ u_char str[] = "Wrong Type (should be Timeticks): ";
-+ if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
-+ return 0;
-+ }
-+ return sprint_realloc_by_type(buf, buf_len, out_len,
- allow_realloc, var, NULL, NULL,
- NULL);
-- } else {
-- return 0;
-- }
- }
-
- if (netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_NUMERIC_TIMETICKS)) {
-@@ -1298,17 +1298,18 @@
- {
- char *enum_string = NULL;
-
-- if ((var->type != ASN_INTEGER) &&
-- (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT))) {
-- u_char str[] = "Wrong Type (should be INTEGER): ";
-- if (snmp_strcat(buf, buf_len, out_len, allow_realloc, str)) {
-- return sprint_realloc_by_type(buf, buf_len, out_len,
-+ if (var->type != ASN_INTEGER) {
-+ if (!netsnmp_ds_get_boolean(
-+ NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
-+ u_char str[] = "Wrong Type (should be INTEGER): ";
-+ if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
-+ return 0;
-+ }
-+ return sprint_realloc_by_type(buf, buf_len, out_len,
- allow_realloc, var, NULL, NULL,
- NULL);
-- } else {
-- return 0;
-- }
- }
-+
- for (; enums; enums = enums->next) {
- if (enums->value == *var->val.integer) {
- enum_string = enums->label;
-@@ -1401,16 +1402,16 @@
- {
- char *enum_string = NULL;
-
-- if ((var->type != ASN_UINTEGER) &&
-- (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT))) {
-- u_char str[] = "Wrong Type (should be UInteger32): ";
-- if (snmp_strcat(buf, buf_len, out_len, allow_realloc, str)) {
-- return sprint_realloc_by_type(buf, buf_len, out_len,
-+ if (var->type != ASN_UINTEGER) {
-+ if (!netsnmp_ds_get_boolean(
-+ NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
-+ u_char str[] = "Wrong Type (should be UInteger32): ";
-+ if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
-+ return 0;
-+ }
-+ return sprint_realloc_by_type(buf, buf_len, out_len,
- allow_realloc, var, NULL, NULL,
- NULL);
-- } else {
-- return 0;
-- }
- }
-
- for (; enums; enums = enums->next) {
-@@ -1498,17 +1499,16 @@
- {
- char tmp[32];
-
-- if ((var->type != ASN_GAUGE) &&
-- (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT))) {
-- u_char str[] =
-- "Wrong Type (should be Gauge32 or Unsigned32): ";
-- if (snmp_strcat(buf, buf_len, out_len, allow_realloc, str)) {
-- return sprint_realloc_by_type(buf, buf_len, out_len,
-+ if (var->type != ASN_GAUGE) {
-+ if (!netsnmp_ds_get_boolean(
-+ NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
-+ u_char str[] = "Wrong Type (should be Gauge32 or Unsigned32): ";
-+ if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
-+ return 0;
-+ }
-+ return sprint_realloc_by_type(buf, buf_len, out_len,
- allow_realloc, var, NULL, NULL,
- NULL);
-- } else {
-- return 0;
-- }
- }
-
- if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRINT)) {
-@@ -1571,16 +1571,16 @@
- {
- char tmp[32];
-
-- if ((var->type != ASN_COUNTER) &&
-- (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT))) {
-- u_char str[] = "Wrong Type (should be Counter32): ";
-- if (snmp_strcat(buf, buf_len, out_len, allow_realloc, str)) {
-- return sprint_realloc_by_type(buf, buf_len, out_len,
-+ if (var->type != ASN_COUNTER) {
-+ if (!netsnmp_ds_get_boolean(
-+ NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
-+ u_char str[] = "Wrong Type (should be Counter32): ";
-+ if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
-+ return 0;
-+ }
-+ return sprint_realloc_by_type(buf, buf_len, out_len,
- allow_realloc, var, NULL, NULL,
- NULL);
-- } else {
-- return 0;
-- }
- }
-
- if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRINT)) {
-@@ -1634,16 +1634,16 @@
- {
- size_t i;
-
-- if ((var->type != ASN_IPADDRESS) &&
-- (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT))) {
-- u_char str[] = "Wrong Type (should be NetworkAddress): ";
-- if (snmp_strcat(buf, buf_len, out_len, allow_realloc, str)) {
-- return sprint_realloc_by_type(buf, buf_len, out_len,
-+ if (var->type != ASN_IPADDRESS) {
-+ if (!netsnmp_ds_get_boolean(
-+ NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
-+ u_char str[] = "Wrong Type (should be NetworkAddress): ";
-+ if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
-+ return 0;
-+ }
-+ return sprint_realloc_by_type(buf, buf_len, out_len,
- allow_realloc, var, NULL, NULL,
- NULL);
-- } else {
-- return 0;
-- }
- }
-
- if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRINT)) {
-@@ -1700,16 +1700,16 @@
- {
- u_char *ip = var->val.string;
-
-- if ((var->type != ASN_IPADDRESS) &&
-- (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT))) {
-- u_char str[] = "Wrong Type (should be IpAddress): ";
-- if (snmp_strcat(buf, buf_len, out_len, allow_realloc, str)) {
-- return sprint_realloc_by_type(buf, buf_len, out_len,
-+ if (var->type != ASN_IPADDRESS) {
-+ if (!netsnmp_ds_get_boolean(
-+ NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
-+ u_char str[] = "Wrong Type (should be IpAddress): ";
-+ if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
-+ return 0;
-+ }
-+ return sprint_realloc_by_type(buf, buf_len, out_len,
- allow_realloc, var, NULL, NULL,
- NULL);
-- } else {
-- return 0;
-- }
- }
-
- if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRINT)) {
-@@ -1758,20 +1758,20 @@
- const struct enum_list *enums,
- const char *hint, const char *units)
- {
-- if ((var->type != ASN_NULL) &&
-- (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT))) {
-- u_char str[] = "Wrong Type (should be NULL): ";
-- if (snmp_strcat(buf, buf_len, out_len, allow_realloc, str)) {
-- return sprint_realloc_by_type(buf, buf_len, out_len,
-+ if (var->type != ASN_NULL) {
-+ if (!netsnmp_ds_get_boolean(
-+ NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
-+ u_char str[] = "Wrong Type (should be NULL): ";
-+ if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
-+ return 0;
-+ }
-+ return sprint_realloc_by_type(buf, buf_len, out_len,
- allow_realloc, var, NULL, NULL,
- NULL);
-- } else {
-- return 0;
-- }
-- } else {
-- u_char str[] = "NULL";
-- return snmp_strcat(buf, buf_len, out_len, allow_realloc, str);
- }
-+
-+ u_char str[] = "NULL";
-+ return snmp_strcat(buf, buf_len, out_len, allow_realloc, str);
- }
-
-
-@@ -1806,16 +1806,16 @@
- u_char *cp;
- char *enum_string;
-
-- if ((var->type != ASN_BIT_STR && var->type != ASN_OCTET_STR) &&
-- (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT))) {
-- u_char str[] = "Wrong Type (should be BITS): ";
-- if (snmp_strcat(buf, buf_len, out_len, allow_realloc, str)) {
-- return sprint_realloc_by_type(buf, buf_len, out_len,
-+ if (var->type != ASN_BIT_STR && var->type != ASN_OCTET_STR) {
-+ if (!netsnmp_ds_get_boolean(
-+ NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
-+ u_char str[] = "Wrong Type (should be BITS): ";
-+ if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
-+ return 0;
-+ }
-+ return sprint_realloc_by_type(buf, buf_len, out_len,
- allow_realloc, var, NULL, NULL,
- NULL);
-- } else {
-- return 0;
-- }
- }
-
- if (netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRINT)) {
-@@ -1890,16 +1890,16 @@
- const struct enum_list *enums, const char *hint,
- const char *units)
- {
-- if ((var->type != ASN_NSAP) &&
-- (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT))) {
-- u_char str[] = "Wrong Type (should be NsapAddress): ";
-- if (snmp_strcat(buf, buf_len, out_len, allow_realloc, str)) {
-- return sprint_realloc_by_type(buf, buf_len, out_len,
-+ if (var->type != ASN_NSAP) {
-+ if (!netsnmp_ds_get_boolean(
-+ NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
-+ u_char str[] = "Wrong Type (should be NsapAddress): ";
-+ if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
-+ return 0;
-+ }
-+ return sprint_realloc_by_type(buf, buf_len, out_len,
- allow_realloc, var, NULL, NULL,
- NULL);
-- } else {
-- return 0;
-- }
- }
-
- if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRINT)) {
diff --git a/debian/patches/Fix-kfreebsd-builds-with-kernel-headers-10.patch b/debian/patches/Fix-kfreebsd-builds-with-kernel-headers-10.patch
new file mode 100644
index 0000000..1929ee8
--- /dev/null
+++ b/debian/patches/Fix-kfreebsd-builds-with-kernel-headers-10.patch
@@ -0,0 +1,45 @@
+From a2f2f610b56c7d6bce88a8dab54a1f09bcd6f5b7 Mon Sep 17 00:00:00 2001
+From: Niko Tyni <ntyni at debian.org>
+Date: Wed, 16 Jul 2014 21:42:30 +0000
+Subject: [PATCH] Fix kfreebsd builds with kernel headers >= 10
+
+This fixes warnings like
+
+In file included from ../../include/net-snmp/net-snmp-config.h:2085:0,
+ from host/data_access/swinst_apt.c:5:
+../../include/net-snmp/system/kfreebsd.h:5:0: warning: "__FreeBSD_version" redefined [enabled by default]
+ #define __FreeBSD_version __FreeBSD_kernel_version
+ ^
+In file included from /usr/include/sys/kern/param.h:1:0,
+ from /usr/include/osreldate.h:1,
+ from ../../include/net-snmp/system/kfreebsd.h:4,
+ from ../../include/net-snmp/net-snmp-config.h:2085,
+ from host/data_access/swinst_apt.c:5:
+/usr/include/sys/kglue/sys/param.h:67:0: note: this is the location of the previous definition
+ #define __FreeBSD_version 1000510 /* Master, propagated to newvers */
+
+and makes agent/mibgroup/host/data_access/swrun_kinfo.c use the modern
+kinfo_proc field names.
+
+Bug-Debian: http://bugs.debian.org/753144
+---
+ include/net-snmp/system/kfreebsd.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/include/net-snmp/system/kfreebsd.h b/include/net-snmp/system/kfreebsd.h
+index dbf7024..cb32758 100644
+--- a/include/net-snmp/system/kfreebsd.h
++++ b/include/net-snmp/system/kfreebsd.h
+@@ -2,7 +2,9 @@
+ #define freebsd6 freebsd6
+
+ #include <osreldate.h>
++#if defined(__FreeBSD_kernel_version) && !defined(__FreeBSD_version)
+ #define __FreeBSD_version __FreeBSD_kernel_version
++#endif
+
+ #include <sys/queue.h>
+ #include <sys/_types.h>
+--
+1.7.10.4
+
diff --git a/debian/patches/fix-request-id-0.patch b/debian/patches/fix-request-id-0.patch
new file mode 100644
index 0000000..57adf44
--- /dev/null
+++ b/debian/patches/fix-request-id-0.patch
@@ -0,0 +1,22 @@
+Description: SNMP GET REQUESTS with REQUEST ID 0 triggered a memory leak that
+ is fixed by this patch
+Origin: upstream bug tracker
+Bug: http://sourceforge.net/p/net-snmp/bugs/2387/
+Forwarded: https://bugs.debian.org/746225
+Author: Roland Stigge <stigge at antcom.de>
+Reviewed-by: gregor herrmann <gregoa at debian.org>
+Last-Update: 2014-07-18
+Applied-Upstream: http://sourceforge.net/p/net-snmp/patches/1040/
+
+--- a/snmplib/snmp_api.c
++++ b/snmplib/snmp_api.c
+@@ -4998,6 +4998,9 @@
+ /*
+ * No response expected...
+ */
++ if ((reqid == 0) && (pdu->command == SNMP_MSG_RESPONSE)) {
++ reqid = 2;
++ }
+ if (reqid) {
+ /*
+ * Free v1 or v2 TRAP PDU iff no error
diff --git a/debian/patches/series b/debian/patches/series
index b72d485..198c378 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -24,4 +24,5 @@ fix_manpage-has-errors-from-man.patch
agentx-crash.patch
TrapReceiver.patch
ifmib.patch
-CVE-2014-3565.patch
+Fix-kfreebsd-builds-with-kernel-headers-10.patch
+fix-request-id-0.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git
More information about the Pkg-net-snmp-commits
mailing list