snmp/snmp.patch

changeset 353
198005e4aad2
parent 325
6601d28cfe52
child 588
300d43423c2e
     1.1 --- a/snmp/snmp.patch	Sat Jul 09 16:54:58 2011 +0200
     1.2 +++ b/snmp/snmp.patch	Thu Sep 15 11:03:52 2011 +0200
     1.3 @@ -1,7 +1,8 @@
     1.4  Index: Makefile.in
     1.5 ---- Makefile.in.orig	2010-09-10 06:23:07.000000000 +0200
     1.6 -+++ Makefile.in	2010-10-09 09:56:09.000000000 +0200
     1.7 -@@ -18,7 +18,7 @@
     1.8 +diff -Nau Makefile.in.orig Makefile.in
     1.9 +--- Makefile.in.orig	2011-07-02 00:35:46.000000000 +0200
    1.10 ++++ Makefile.in	2011-09-15 09:22:50.255341188 +0200
    1.11 +@@ -19,7 +19,7 @@
    1.12   INCLUDESUBDIR=system
    1.13   INCLUDESUBDIRHEADERS= aix.h bsd.h bsdi3.h bsdi4.h bsdi.h cygwin.h \
    1.14   	darwin.h darwin7.h darwin8.h darwin9.h darwin10.h dragonfly.h dynix.h \
    1.15 @@ -11,8 +12,9 @@
    1.16   	hpux.h irix.h linux.h mingw32.h mips.h netbsd.h openbsd.h osf5.h \
    1.17   	solaris2.3.h solaris2.4.h solaris2.5.h solaris2.6.h \
    1.18  Index: agent/auto_nlist.c
    1.19 ---- agent/auto_nlist.c.orig	2010-07-29 16:58:47.000000000 +0200
    1.20 -+++ agent/auto_nlist.c	2010-10-09 09:08:23.000000000 +0200
    1.21 +diff -Nau agent/auto_nlist.c.orig agent/auto_nlist.c
    1.22 +--- agent/auto_nlist.c.orig	2011-07-02 00:35:46.000000000 +0200
    1.23 ++++ agent/auto_nlist.c	2011-09-15 09:22:50.256627584 +0200
    1.24  @@ -53,6 +53,7 @@
    1.25       }
    1.26       if (*ptr == 0) {
    1.27 @@ -22,9 +24,10 @@
    1.28           it->left = 0;
    1.29           it->right = 0;
    1.30  Index: agent/mibgroup/mibII/tcp.c
    1.31 ---- agent/mibgroup/mibII/tcp.c.orig	2010-08-13 17:04:33.000000000 +0200
    1.32 -+++ agent/mibgroup/mibII/tcp.c	2010-10-09 09:08:23.000000000 +0200
    1.33 -@@ -87,7 +87,7 @@
    1.34 +diff -Nau agent/mibgroup/mibII/tcp.c.orig agent/mibgroup/mibII/tcp.c
    1.35 +--- agent/mibgroup/mibII/tcp.c.orig	2011-07-02 00:35:46.000000000 +0200
    1.36 ++++ agent/mibgroup/mibII/tcp.c	2011-09-15 09:22:50.258135285 +0200
    1.37 +@@ -88,7 +88,7 @@
    1.38                    * But only define it under FreeBSD, since it
    1.39                    *   breaks other systems (notable AIX)
    1.40                    */
    1.41 @@ -34,9 +37,10 @@
    1.42   #endif
    1.43   
    1.44  Index: agent/mibgroup/mibII/tcpTable.c
    1.45 ---- agent/mibgroup/mibII/tcpTable.c.orig	2010-06-16 15:13:25.000000000 +0200
    1.46 -+++ agent/mibgroup/mibII/tcpTable.c	2010-10-09 09:08:23.000000000 +0200
    1.47 -@@ -104,6 +104,11 @@
    1.48 +diff -Nau agent/mibgroup/mibII/tcpTable.c.orig agent/mibgroup/mibII/tcpTable.c
    1.49 +--- agent/mibgroup/mibII/tcpTable.c.orig	2011-07-02 00:35:46.000000000 +0200
    1.50 ++++ agent/mibgroup/mibII/tcpTable.c	2011-09-15 09:22:50.260414149 +0200
    1.51 +@@ -110,6 +110,11 @@
    1.52   #define	TCPTABLE_REMOTEPORT	pcb.inp_fport
    1.53   #define	TCPTABLE_IS_LINKED_LIST
    1.54   
    1.55 @@ -48,7 +52,7 @@
    1.56   #endif                          /* linux */
    1.57   #endif                          /* WIN32 cygwin */
    1.58   #endif                          /* solaris2 */
    1.59 -@@ -867,12 +872,17 @@
    1.60 +@@ -892,12 +897,17 @@
    1.61           nnew = SNMP_MALLOC_TYPEDEF(netsnmp_inpcb);
    1.62           if (!nnew)
    1.63               break;
    1.64 @@ -64,12 +68,13 @@
    1.65                              sizeof(struct inpcb));
    1.66  +#endif
    1.67   
    1.68 - 	nnew->inp_next = tcp_head;
    1.69 - 	tcp_head   = nnew;
    1.70 + 	if (nnew->pcb.inp_vflag & INP_IPV6)
    1.71 + 	    free(nnew);
    1.72  Index: agent/mibgroup/ucd-snmp/diskio.c
    1.73 ---- agent/mibgroup/ucd-snmp/diskio.c.orig	2010-08-13 17:04:33.000000000 +0200
    1.74 -+++ agent/mibgroup/ucd-snmp/diskio.c	2010-10-09 09:08:23.000000000 +0200
    1.75 -@@ -618,6 +618,20 @@
    1.76 +diff -Nau agent/mibgroup/ucd-snmp/diskio.c.orig agent/mibgroup/ucd-snmp/diskio.c
    1.77 +--- agent/mibgroup/ucd-snmp/diskio.c.orig	2011-07-02 00:35:46.000000000 +0200
    1.78 ++++ agent/mibgroup/ucd-snmp/diskio.c	2011-09-15 09:22:50.263188251 +0200
    1.79 +@@ -800,6 +800,20 @@
    1.80       case DISKIO_DEVICE:
    1.81           *var_len = strlen(stat->dinfo->devices[indx].device_name);
    1.82           return (u_char *) stat->dinfo->devices[indx].device_name;
    1.83 @@ -90,7 +95,7 @@
    1.84       case DISKIO_NREAD:
    1.85   #if defined(freebsd5) && __FreeBSD_version >= 500107
    1.86           long_ret = (signed long) stat->dinfo->devices[indx].bytes[DEVSTAT_READ];
    1.87 -@@ -675,6 +689,7 @@
    1.88 +@@ -857,6 +871,7 @@
    1.89       case DISKIO_LA15:
    1.90           long_ret = devloads[indx].la15;
    1.91           return (u_char *) & long_ret;
    1.92 @@ -99,27 +104,30 @@
    1.93       default:
    1.94           ERROR_MSG("diskio.c: don't know how to handle this request.");
    1.95  Index: agent/mibgroup/ucd-snmp/memory_solaris2.c
    1.96 ---- agent/mibgroup/ucd-snmp/memory_solaris2.c.orig	2008-10-21 23:10:43.000000000 +0200
    1.97 -+++ agent/mibgroup/ucd-snmp/memory_solaris2.c	2010-10-09 09:08:23.000000000 +0200
    1.98 +diff -Nau agent/mibgroup/ucd-snmp/memory_solaris2.c.orig agent/mibgroup/ucd-snmp/memory_solaris2.c
    1.99 +--- agent/mibgroup/ucd-snmp/memory_solaris2.c.orig	2011-07-02 00:35:46.000000000 +0200
   1.100 ++++ agent/mibgroup/ucd-snmp/memory_solaris2.c	2011-09-15 09:22:50.264370106 +0200
   1.101  @@ -1,3 +1,4 @@
   1.102  +#undef _FILE_OFFSET_BITS /* swapctl doesn't support 64bit off_t */
   1.103   #include <net-snmp/net-snmp-config.h>   /* local SNMP configuration details */
   1.104   #if HAVE_STRING_H
   1.105   #include <string.h>
   1.106  Index: agent/mibgroup/ucd-snmp/proc.c
   1.107 ---- agent/mibgroup/ucd-snmp/proc.c.orig	2010-07-29 16:58:47.000000000 +0200
   1.108 -+++ agent/mibgroup/ucd-snmp/proc.c	2010-10-09 09:08:23.000000000 +0200
   1.109 +diff -Nau agent/mibgroup/ucd-snmp/proc.c.orig agent/mibgroup/ucd-snmp/proc.c
   1.110 +--- agent/mibgroup/ucd-snmp/proc.c.orig	2011-07-02 00:35:46.000000000 +0200
   1.111 ++++ agent/mibgroup/ucd-snmp/proc.c	2011-09-15 09:22:50.265801863 +0200
   1.112  @@ -1,3 +1,6 @@
   1.113  +#ifdef solaris2
   1.114  +#undef _FILE_OFFSET_BITS /* solaris procfs doesn't support 64bit off_t */
   1.115  +#endif
   1.116   #include <net-snmp/net-snmp-config.h>
   1.117 + #include <net-snmp/net-snmp-features.h>
   1.118   
   1.119 - #ifdef solaris2
   1.120  Index: agent/mibgroup/util_funcs.c
   1.121 ---- agent/mibgroup/util_funcs.c.orig	2010-05-16 20:12:40.000000000 +0200
   1.122 -+++ agent/mibgroup/util_funcs.c	2010-10-09 09:08:23.000000000 +0200
   1.123 -@@ -457,6 +457,9 @@
   1.124 +diff -Nau agent/mibgroup/util_funcs.c.orig agent/mibgroup/util_funcs.c
   1.125 +--- agent/mibgroup/util_funcs.c.orig	2011-07-02 00:35:46.000000000 +0200
   1.126 ++++ agent/mibgroup/util_funcs.c	2011-09-15 09:22:50.267863457 +0200
   1.127 +@@ -477,6 +477,9 @@
   1.128       int             fd[2][2], i, cnt;
   1.129       char            ctmp[STRMAX], *cptr1, *cptr2, argvs[STRMAX], **argv,
   1.130           **aptr;
   1.131 @@ -130,32 +138,35 @@
   1.132        * Setup our pipes 
   1.133        */
   1.134  Index: agent/snmpd.c
   1.135 ---- agent/snmpd.c.orig	2010-08-17 20:31:31.000000000 +0200
   1.136 -+++ agent/snmpd.c	2010-10-09 09:08:23.000000000 +0200
   1.137 -@@ -429,7 +429,7 @@
   1.138 +diff -Nau agent/snmpd.c.orig agent/snmpd.c
   1.139 +--- agent/snmpd.c.orig	2011-07-02 00:35:46.000000000 +0200
   1.140 ++++ agent/snmpd.c	2011-09-15 09:22:41.994430685 +0200
   1.141 +@@ -440,7 +440,7 @@
   1.142 +     int             log_set = 0;
   1.143       int             uid = 0, gid = 0;
   1.144       int             agent_mode = -1;
   1.145 -     char           *cptr, **argvptr;
   1.146  -    char           *pid_file = NULL;
   1.147  +    char           *pid_file = "@l_prefix@/var/snmp/snmpd.pid";
   1.148       char            option_compatability[] = "-Le";
   1.149   #if HAVE_GETPID
   1.150       int fd;
   1.151  Index: apps/snmptrapd.c
   1.152 ---- apps/snmptrapd.c.orig	2010-08-13 20:50:07.000000000 +0200
   1.153 -+++ apps/snmptrapd.c	2010-10-09 09:08:23.000000000 +0200
   1.154 -@@ -652,6 +652,7 @@
   1.155 +diff -Nau apps/snmptrapd.c.orig apps/snmptrapd.c
   1.156 +--- apps/snmptrapd.c.orig	2011-07-02 00:35:46.000000000 +0200
   1.157 ++++ apps/snmptrapd.c	2011-09-15 09:22:50.270293197 +0200
   1.158 +@@ -657,6 +657,7 @@
   1.159        */
   1.160   #if HAVE_GETPID
   1.161       strcat(options, "p:");
   1.162  +    parse_config_pidFile(NULL, "@l_prefix@/var/snmp/snmptrapd.pid");
   1.163   #endif
   1.164   
   1.165 - #ifdef WIN32
   1.166 + #ifndef NETSNMP_FEATURE_REMOVE_LOGGING_SYSLOG
   1.167  Index: include/net-snmp/library/system.h
   1.168 ---- include/net-snmp/library/system.h.orig	2010-03-25 16:06:26.000000000 +0100
   1.169 -+++ include/net-snmp/library/system.h	2010-10-09 09:56:40.000000000 +0200
   1.170 -@@ -141,7 +141,8 @@
   1.171 +diff -Nau include/net-snmp/library/system.h.orig include/net-snmp/library/system.h
   1.172 +--- include/net-snmp/library/system.h.orig	2011-07-02 00:35:46.000000000 +0200
   1.173 ++++ include/net-snmp/library/system.h	2011-09-15 09:22:50.271350973 +0200
   1.174 +@@ -155,7 +155,8 @@
   1.175   #endif
   1.176   #ifndef HAVE_SETENV
   1.177       NETSNMP_IMPORT
   1.178 @@ -166,26 +177,29 @@
   1.179   
   1.180       NETSNMP_IMPORT
   1.181  Index: include/net-snmp/system/freebsd8.h
   1.182 ---- include/net-snmp/system/freebsd8.h.orig	2010-02-14 20:29:08.000000000 +0100
   1.183 -+++ include/net-snmp/system/freebsd8.h	2010-10-09 09:08:23.000000000 +0200
   1.184 +diff -Nau include/net-snmp/system/freebsd8.h.orig include/net-snmp/system/freebsd8.h
   1.185 +--- include/net-snmp/system/freebsd8.h.orig	2011-07-02 00:35:46.000000000 +0200
   1.186 ++++ include/net-snmp/system/freebsd8.h	2011-09-15 09:22:50.272179012 +0200
   1.187  @@ -1,3 +1,6 @@
   1.188  +/* freebsd8 is a superset of freebsd7 */
   1.189  +#include "freebsd7.h"
   1.190  +#define freebsd7 freebsd7
   1.191   /* freebsd8 is a superset of freebsd4 */
   1.192 - #include "freebsd4.h"
   1.193 - #define freebsd4 freebsd4
   1.194 + #include "freebsd7.h"
   1.195 + #define freebsd7 freebsd7
   1.196  Index: include/net-snmp/system/freebsd9.h
   1.197 ---- include/net-snmp/system/freebsd9.h.orig	2010-10-09 09:08:23.000000000 +0200
   1.198 -+++ include/net-snmp/system/freebsd9.h	2010-10-09 09:08:23.000000000 +0200
   1.199 +diff -Nau include/net-snmp/system/freebsd9.h.orig include/net-snmp/system/freebsd9.h
   1.200 +--- include/net-snmp/system/freebsd9.h.orig	1970-01-01 01:00:00.000000000 +0100
   1.201 ++++ include/net-snmp/system/freebsd9.h	2011-09-15 09:22:50.272889416 +0200
   1.202  @@ -0,0 +1,3 @@
   1.203  +/* freebsd9 is a superset of freebsd8 */
   1.204  +#include "freebsd8.h"
   1.205  +#define freebsd8 freebsd8
   1.206  Index: snmplib/system.c
   1.207 ---- snmplib/system.c.orig	2010-07-29 16:58:47.000000000 +0200
   1.208 -+++ snmplib/system.c	2010-10-09 09:08:23.000000000 +0200
   1.209 -@@ -837,7 +837,7 @@
   1.210 +diff -Nau snmplib/system.c.orig snmplib/system.c
   1.211 +--- snmplib/system.c.orig	2011-07-02 00:35:46.000000000 +0200
   1.212 ++++ snmplib/system.c	2011-09-15 09:22:50.274625796 +0200
   1.213 +@@ -1044,7 +1044,7 @@
   1.214   
   1.215   #ifndef HAVE_SETENV
   1.216   int

mercurial