pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/pkgsrc-2008Q1]: pkgsrc/net/net-snmp Pullup ticket 2424 - requested by...
details: https://anonhg.NetBSD.org/pkgsrc/rev/3d1f84f23fd8
branches: pkgsrc-2008Q1
changeset: 540417:3d1f84f23fd8
user: ghen <ghen%pkgsrc.org@localhost>
date: Mon Jun 16 08:51:43 2008 +0000
description:
Pullup ticket 2424 - requested by tron
security patch + build fixes for net-snmp
- pkgsrc/net/net-snmp/Makefile 1.69-1.70
- pkgsrc/net/net-snmp/distinfo 1.44-1.46
- pkgsrc/net/net-snmp/files/cpu_dragonfly.c 1.3
- pkgsrc/net/net-snmp/patches/patch-ai 1.4-1.5
- pkgsrc/net/net-snmp/patches/patch-aj 1.5
- pkgsrc/net/net-snmp/patches/patch-ak 1.4
- pkgsrc/net/net-snmp/patches/patch-am 1.7
- pkgsrc/net/net-snmp/patches/patch-de 1.5
- pkgsrc/net/net-snmp/patches/patch-dk removed
- pkgsrc/net/net-snmp/patches/patch-ep 1.3
Module Name: pkgsrc
Committed By: christos
Date: Thu Jun 5 19:09:41 UTC 2008
Modified Files:
pkgsrc/net/net-snmp: Makefile distinfo
pkgsrc/net/net-snmp/files: cpu_dragonfly.c
pkgsrc/net/net-snmp/patches: patch-am patch-de
Added Files:
pkgsrc/net/net-snmp/patches: patch-ai patch-aj patch-ak
Log Message:
PR/36978: Hasso Tepper: Make net-snmp work on dragonfly.
While I am here make it run again on NetBSD (hi clown boy)
---
Module Name: pkgsrc
Committed By: tron
Date: Fri Jun 6 16:18:04 UTC 2008
Modified Files:
pkgsrc/net/net-snmp: distinfo
pkgsrc/net/net-snmp/patches: patch-ai
Removed Files:
pkgsrc/net/net-snmp/patches: patch-dk
Log Message:
Combine the to patches for "agent/mibgroup/mibII/ip.c" to make this
actually build.
---
Module Name: pkgsrc
Committed By: tron
Date: Thu Jun 12 13:32:24 UTC 2008
Modified Files:
pkgsrc/net/net-snmp: Makefile distinfo
pkgsrc/net/net-snmp/patches: patch-ep
Log Message:
Add patch for CVE-2008-0960 from the Net-SNMP project page on Sourceforge.
diffstat:
net/net-snmp/Makefile | 4 +-
net/net-snmp/distinfo | 12 +++--
net/net-snmp/files/cpu_dragonfly.c | 3 +
net/net-snmp/patches/patch-ai | 23 ++++++++++
net/net-snmp/patches/patch-aj | 17 +++++++
net/net-snmp/patches/patch-ak | 18 ++++++++
net/net-snmp/patches/patch-am | 69 ++++++++++++++++++++++++++++--
net/net-snmp/patches/patch-de | 84 ++++++++++++++++++++++++++++---------
net/net-snmp/patches/patch-dk | 16 -------
net/net-snmp/patches/patch-ep | 19 ++++++-
10 files changed, 210 insertions(+), 55 deletions(-)
diffs (truncated from 497 to 300 lines):
diff -r dd03608c9137 -r 3d1f84f23fd8 net/net-snmp/Makefile
--- a/net/net-snmp/Makefile Fri Jun 13 13:58:06 2008 +0000
+++ b/net/net-snmp/Makefile Mon Jun 16 08:51:43 2008 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.67.2.1 2008/05/18 15:12:05 spz Exp $
+# $NetBSD: Makefile,v 1.67.2.2 2008/06/16 08:51:43 ghen Exp $
DISTNAME= net-snmp-5.4.1
-PKGREVISION= 2
+PKGREVISION= 4
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=net-snmp/}
diff -r dd03608c9137 -r 3d1f84f23fd8 net/net-snmp/distinfo
--- a/net/net-snmp/distinfo Fri Jun 13 13:58:06 2008 +0000
+++ b/net/net-snmp/distinfo Mon Jun 16 08:51:43 2008 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.42.2.1 2008/05/18 15:12:05 spz Exp $
+$NetBSD: distinfo,v 1.42.2.2 2008/06/16 08:51:43 ghen Exp $
SHA1 (net-snmp-5.4.1.tar.gz) = ac5ba033c10d53d3057415121f8c4936c643c208
RMD160 (net-snmp-5.4.1.tar.gz) = 3723488dab8d164702a7d55c9c72eeaec07dd50c
@@ -11,18 +11,20 @@
SHA1 (patch-af) = 88d0433a6a233dc52fec10e29183d820c50bd524
SHA1 (patch-ag) = 7021f7238c37635c9c32ceca681fd42aa125437f
SHA1 (patch-ah) = 9ad04b5c0046a82c4e601e4f3abb2dd491846489
+SHA1 (patch-ai) = c57baca06856187115db39fd50668203dad0a94c
+SHA1 (patch-aj) = 30c28c4801cea33d54e68bbde603e7d531dfb2f8
+SHA1 (patch-ak) = cccad21d4f56e79799a433ef7bf0e8ff4e917afb
SHA1 (patch-al) = 2609e273d557e1ce06c1295d86965fe26ac7ff08
-SHA1 (patch-am) = 64461aef9b4409cd7ed4941e5d5441710a6035d8
+SHA1 (patch-am) = 8843187b7916b0aeb9efff6628ecfb1f481b8cd3
SHA1 (patch-an) = 167f23c62c085efc96a25bc2be5dca3c746dde6f
SHA1 (patch-da) = 7466445c8388492344acdee236b153cb5f5b45e1
SHA1 (patch-db) = bec0bee1860ee42ba64b4c07df2280e206eaf582
SHA1 (patch-dc) = a60caa72af001f5bbda173e5daa9afc6a7180a60
SHA1 (patch-dd) = 08da0d1da485959549ac461e5cbb7030f800e643
-SHA1 (patch-de) = 4028ef60b5ffa4f77f12aaa7465a502bbf30308a
+SHA1 (patch-de) = 63fd3863d287f123f26e657cff5d87c00b21779c
SHA1 (patch-dg) = 6e6e396add0613dd76e3b8618008a7ebf8103c7c
SHA1 (patch-dh) = c9a776d6574df008adae52a2f08930e0662f70b3
SHA1 (patch-di) = e0e1039c1adbf10ae56c50998ff74b39193e7348
-SHA1 (patch-dk) = 1025ce87163a45175cc4733b95af7db5fa3da4ff
SHA1 (patch-dl) = 746d937ff861294f5b858bee8cc2a99c976e1907
SHA1 (patch-dm) = 05c182f5bc1751ea0a0bcc7e21f24684b3c4933a
SHA1 (patch-dn) = 16c68c667c129c4fcccdbff704d7d25481691710
@@ -40,6 +42,6 @@
SHA1 (patch-ei) = 7eb4899b08b73c79f1eb8616bcebad38c0fbe148
SHA1 (patch-ej) = c8047a6109bf6b833c56562d48b56b480c4299be
SHA1 (patch-el) = f80dc7058b8a60e3be53e5673538f6eb2d173b68
-SHA1 (patch-ep) = 82071d291813078d27552e5e16e1619e3b3a1bc2
+SHA1 (patch-ep) = 84dde63e97065c0776778583ae73e52adaffbd01
SHA1 (patch-es) = c26c048ccbda7e4d28cb0a2263cdaa71befb4f96
SHA1 (patch-et) = 63e31a08413b004608540a28a8fc448966320e7f
diff -r dd03608c9137 -r 3d1f84f23fd8 net/net-snmp/files/cpu_dragonfly.c
--- a/net/net-snmp/files/cpu_dragonfly.c Fri Jun 13 13:58:06 2008 +0000
+++ b/net/net-snmp/files/cpu_dragonfly.c Mon Jun 16 08:51:43 2008 +0000
@@ -24,6 +24,9 @@
size_t len;
char descr[ SNMP_MAXBUF ];
+ cpu = netsnmp_cpu_get_byIdx( -1, 1 );
+ strcpy(cpu->name, "Overall CPU statistics");
+
kinfo_get_cpus(&cpu_num);
len = sizeof(descr);
sysctlbyname("hw.model", descr, &len, NULL, 0);
diff -r dd03608c9137 -r 3d1f84f23fd8 net/net-snmp/patches/patch-ai
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/net-snmp/patches/patch-ai Mon Jun 16 08:51:43 2008 +0000
@@ -0,0 +1,23 @@
+$NetBSD: patch-ai,v 1.3.18.1 2008/06/16 08:51:43 ghen Exp $
+
+--- agent/mibgroup/mibII/ip.c.orig 2008-06-06 15:51:31.000000000 +0100
++++ agent/mibgroup/mibII/ip.c 2008-06-06 15:55:38.000000000 +0100
+@@ -212,6 +212,18 @@
+ #define USES_TRADITIONAL_IPSTAT
+ #endif
+
++#ifdef IP_NSTATS
++typedef struct ipstat {
++ uint64_t st[IP_NSTATS];
++};
++#define IP_STAT_STRUCTURE struct ipstat
++#endif
++
++#ifdef dragonfly
++#define IP_STAT_STRUCTURE struct ip_stats
++#define USES_TRADITIONAL_IPSTAT
++#endif
++
+ #if !defined(IP_STAT_STRUCTURE)
+ #define IP_STAT_STRUCTURE struct ipstat
+ #define USES_TRADITIONAL_IPSTAT
diff -r dd03608c9137 -r 3d1f84f23fd8 net/net-snmp/patches/patch-aj
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/net-snmp/patches/patch-aj Mon Jun 16 08:51:43 2008 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-aj,v 1.4.6.1 2008/06/16 08:51:43 ghen Exp $
+
+--- agent/mibgroup/mibII/udp.c.orig 2007-07-16 19:59:44.000000000 -0400
++++ agent/mibgroup/mibII/udp.c 2008-06-04 19:46:27.000000000 -0400
+@@ -159,6 +159,12 @@
+ #define USES_TRADITIONAL_UDPSTAT
+ #endif
+
++#ifdef UDP_NSTATS
++typedef struct udpstat {
++ uint64_t st[UDP_NSTATS];
++};
++#define UDP_STAT_STRUCTURE struct udpstat
++#endif
+
+ #if !defined(UDP_STAT_STRUCTURE)
+ #define UDP_STAT_STRUCTURE struct udpstat
diff -r dd03608c9137 -r 3d1f84f23fd8 net/net-snmp/patches/patch-ak
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/net-snmp/patches/patch-ak Mon Jun 16 08:51:43 2008 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-ak,v 1.3.18.1 2008/06/16 08:51:43 ghen Exp $
+
+--- agent/mibgroup/mibII/icmp.c.orig 2007-07-16 19:59:44.000000000 -0400
++++ agent/mibgroup/mibII/icmp.c 2008-06-04 19:42:01.000000000 -0400
+@@ -140,6 +140,13 @@
+ #define USES_TRADITIONAL_ICMPSTAT
+ #endif
+
++#ifdef ICMP_NSTATS
++struct icmpstat {
++ uint64_t st[ICMP_NSTATS];
++};
++#define ICMP_STAT_STRUCTURE struct icmpstat
++#endif
++
+ #if !defined(ICMP_STAT_STRUCTURE)
+ #define ICMP_STAT_STRUCTURE struct icmpstat
+ #define USES_TRADITIONAL_ICMPSTAT
diff -r dd03608c9137 -r 3d1f84f23fd8 net/net-snmp/patches/patch-am
--- a/net/net-snmp/patches/patch-am Fri Jun 13 13:58:06 2008 +0000
+++ b/net/net-snmp/patches/patch-am Mon Jun 16 08:51:43 2008 +0000
@@ -1,8 +1,33 @@
-$NetBSD: patch-am,v 1.6 2007/02/05 12:06:16 adam Exp $
-
---- agent/mibgroup/host/hr_swrun.c.orig 2006-10-17 16:26:21.000000000 +0200
-+++ agent/mibgroup/host/hr_swrun.c
-@@ -926,6 +926,8 @@ var_hrswrun(struct variable * vp,
+--- agent/mibgroup/host/hr_swrun.c.orig 2007-04-02 16:51:34 +0300
++++ agent/mibgroup/host/hr_swrun.c 2007-09-12 21:41:48 +0300
+@@ -599,6 +599,8 @@
+ #elif HAVE_KVM_GETPROCS
+ #if defined(freebsd5) && __FreeBSD_version >= 500014
+ strcpy(string, proc_table[LowProcIndex].ki_comm);
++ #elif defined(dragonfly) && __DragonFly_version >= 190000
++ strcpy(string, proc_table[LowProcIndex].kp_comm);
+ #else
+ strcpy(string, proc_table[LowProcIndex].kp_proc.p_comm);
+ #endif
+@@ -722,6 +724,8 @@
+ #elif HAVE_KVM_GETPROCS
+ #if defined(freebsd5) && __FreeBSD_version >= 500014
+ strcpy(string, proc_table[LowProcIndex].ki_comm);
++ #elif defined(dragonfly) && __DragonFly_version >= 190000
++ strcpy(string, proc_table[LowProcIndex].kp_comm);
+ #else
+ strcpy(string, proc_table[LowProcIndex].kp_proc.p_comm);
+ #endif
+@@ -921,11 +925,17 @@
+ } else
+ long_return = 4; /* application */
+ #else
++ #if defined(dragonfly) && __DragonFly_version >= 190000
++ if (proc_table[LowProcIndex].kp_flags & P_SYSTEM)
++ #else
+ if (proc_table[LowProcIndex].kp_proc.p_flag & P_SYSTEM)
++ #endif
+ long_return = 2; /* operatingSystem */
else
long_return = 4; /* application */
#endif
@@ -11,10 +36,23 @@
#else
long_return = 4; /* application */
#endif
-@@ -1069,6 +1071,10 @@ var_hrswrun(struct variable * vp,
+@@ -962,6 +972,8 @@
+ #if HAVE_KVM_GETPROCS
+ #if defined(freebsd5) && __FreeBSD_version >= 500014
+ switch (proc_table[LowProcIndex].ki_stat) {
++ #elif defined(dragonfly) && __DragonFly_version >= 190000
++ switch (proc_table[LowProcIndex].kp_stat) {
+ #else
+ switch (proc_table[LowProcIndex].kp_proc.p_stat) {
+ #endif
+@@ -1069,6 +1081,14 @@
long_return = 0;
#elif defined(freebsd5)
long_return = proc_table[LowProcIndex].ki_runtime / 100000;
++ #elif defined(dragonfly) && __DragonFly_version >= 190000
++ long_return = proc_table[LowProcIndex].kp_lwp.kl_uticks +
++ proc_table[LowProcIndex].kp_lwp.kl_sticks +
++ proc_table[LowProcIndex].kp_lwp.kl_iticks;
+ #elif defined(dragonfly)
+ long_return = proc_table[LowProcIndex].kp_eproc.e_uticks +
+ proc_table[LowProcIndex].kp_eproc.e_sticks +
@@ -22,3 +60,22 @@
#else
long_return = proc_table[LowProcIndex].kp_proc.p_uticks +
proc_table[LowProcIndex].kp_proc.p_sticks +
+@@ -1157,6 +1177,8 @@
+ long_return =
+ #if defined(freebsd5)
+ proc_table[LowProcIndex].ki_size / 1024;
++ #elif defined(dragonfly) && __DragonFly_version >= 190000
++ proc_table[LowProcIndex].kp_vm_map_size / 1024;
+ #else
+ proc_table[LowProcIndex].kp_eproc.e_vm.vm_map.size / 1024;
+ #endif
+@@ -1477,6 +1499,9 @@
+ #if defined(freebsd5) && __FreeBSD_version >= 500014
+ if (proc_table[current_proc_entry].ki_stat != 0)
+ return proc_table[current_proc_entry++].ki_pid;
++ #elif defined(dragonfly) && __DragonFly_version >= 190000
++ if (proc_table[current_proc_entry].kp_stat != 0)
++ return proc_table[current_proc_entry++].kp_pid;
+ #else
+ if (proc_table[current_proc_entry].kp_proc.p_stat != 0)
+ return proc_table[current_proc_entry++].kp_proc.p_pid;
diff -r dd03608c9137 -r 3d1f84f23fd8 net/net-snmp/patches/patch-de
--- a/net/net-snmp/patches/patch-de Fri Jun 13 13:58:06 2008 +0000
+++ b/net/net-snmp/patches/patch-de Mon Jun 16 08:51:43 2008 +0000
@@ -1,7 +1,5 @@
-$NetBSD: patch-de,v 1.4 2007/08/11 11:05:57 adam Exp $
-
---- agent/mibgroup/mibII/ipv6.c.orig 2007-05-25 00:01:04.000000000 +0200
-+++ agent/mibgroup/mibII/ipv6.c
+--- agent/mibgroup/mibII/ipv6.c.orig 2007-05-25 01:01:04 +0300
++++ agent/mibgroup/mibII/ipv6.c 2008-05-26 22:26:32 +0300
@@ -11,7 +11,7 @@
#include <sys/types.h>
#include <sys/param.h>
@@ -29,25 +27,67 @@
q = (caddr_t) TAILQ_NEXT(&tmp, if_link);
#else
# if defined(__NetBSD__) || defined(__OpenBSD__)
-@@ -809,7 +809,7 @@ var_ifv6Entry(register struct variable *
+@@ -804,13 +804,36 @@ var_ifv6Entry(register struct variable *
+ {
+ struct ifnet ifnet;
+ struct ifaddr ifaddr;
++#if defined(__DragonFly__) && __DragonFly_version >= 197700
++ struct ifaddr_container ifac;
++ struct ifaddrhead head;
++#endif
+ static struct sockaddr_dl sdl;
+ caddr_t ifa;
if (if_getifnet(interface, &ifnet) < 0)
break;
-#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin)
+#if defined(freebsd3) || defined(darwin)
++# if defined(__DragonFly__) && __DragonFly_version >= 197700
++ /*
++ * Locate ifaddr head on CPU0
++ */
++ if (!NETSNMP_KLOOKUP(ifnet.if_addrheads, (char *)&head, sizeof(head))) {
++ DEBUGMSGTL(("mibII/ipv6:var_ipv6", "klookup head failed\n"));
++ break;
++ }
++ if (TAILQ_FIRST(&head) != NULL) {
++ if (!NETSNMP_KLOOKUP(TAILQ_FIRST(&head), (char *) &ifac, sizeof(ifac))) {
++ DEBUGMSGTL(("mibII/ipv6:var_ipv6", "klookup ifac failed\n"));
++ break;
++ }
++ ifa = (caddr_t)ifac.ifa;
++ } else {
++ ifa = NULL;
++ }
++# else
ifa = (caddr_t) TAILQ_FIRST(&ifnet.if_addrhead);
++# endif
#else
# if defined(__NetBSD__) || defined(__OpenBSD__)
-@@ -836,7 +836,7 @@ var_ifv6Entry(register struct variable *
+ ifa = (caddr_t) TAILQ_FIRST(&ifnet.if_addrlist);
+@@ -836,8 +859,20 @@ var_ifv6Entry(register struct variable *
*var_len = sdl.sdl_alen;
return (u_char *) (sdl.sdl_data + sdl.sdl_nlen);
}
-#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin)
+#if defined(freebsd3) || defined(darwin)
++# if defined(__DragonFly__) && __DragonFly_version >= 197700
++ if (TAILQ_NEXT(&ifac, ifa_link) == NULL) {
++ ifa = NULL;
++ } else {
++ if (!NETSNMP_KLOOKUP(TAILQ_NEXT(&ifac, ifa_link), (char *)&ifac, sizeof(ifac))) {
++ DEBUGMSGTL(("mibII/ipv6:var_ipv6", "klookup ifac next failed\n"));
++ break;
++ }
++ ifa = (caddr_t)ifac.ifa;
++ }
Home |
Main Index |
Thread Index |
Old Index