net-snmp-5.4.1 integrated
This commit is contained in:
parent
ab0ba78628
commit
d4f500340b
@ -1 +1 @@
|
||||
net-snmp-5.4.tar.gz
|
||||
net-snmp-5.4.1.tar.gz
|
||||
|
@ -1,13 +0,0 @@
|
||||
--- net-snmp-5.0.6/aclocal.m4.libtool 2002-06-14 11:27:24.000000000 +0200
|
||||
+++ net-snmp-5.0.6/aclocal.m4 2003-02-05 19:16:07.000000000 +0100
|
||||
@@ -1541,8 +1541,8 @@
|
||||
esac
|
||||
|
||||
if test "$ld_shlibs" = yes; then
|
||||
- runpath_var=LD_RUN_PATH
|
||||
- hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
|
||||
+ runpath_var=
|
||||
+ hardcode_libdir_flag_spec=
|
||||
export_dynamic_flag_spec='${wl}--export-dynamic'
|
||||
case $host_os in
|
||||
cygwin* | mingw* | pw32*)
|
@ -1,52 +0,0 @@
|
||||
--- net-snmp-5.1.1/agent/mibgroup/mibII/ipAddr.c.ipAdEntIfIndex 2004-04-08 17:38:48.368076685 +0200
|
||||
+++ net-snmp-5.1.1/agent/mibgroup/mibII/ipAddr.c 2004-04-08 17:48:52.977283961 +0200
|
||||
@@ -199,6 +199,10 @@
|
||||
static struct in_ifaddr in_ifaddr, lowin_ifaddr;
|
||||
#else
|
||||
static struct ifnet lowin_ifnet;
|
||||
+ static in_addr_t addr_ret;
|
||||
+#if defined(linux)
|
||||
+ static struct in_ifaddr in_ifaddr;
|
||||
+#endif
|
||||
#endif
|
||||
static struct ifnet ifnet;
|
||||
#endif /* hpux11 */
|
||||
@@ -211,14 +214,14 @@
|
||||
memcpy((char *) current, (char *) vp->name,
|
||||
(int) vp->namelen * sizeof(oid));
|
||||
|
||||
-#if !defined(freebsd2) && !defined(hpux11) && !defined(linux)
|
||||
+#if !defined(freebsd2) && !defined(hpux11)
|
||||
Interface_Scan_Init();
|
||||
#else
|
||||
Address_Scan_Init();
|
||||
#endif
|
||||
for (;;) {
|
||||
|
||||
-#if !defined(freebsd2) && !defined(hpux11) && !defined(linux)
|
||||
+#if !defined(freebsd2) && !defined(hpux11)
|
||||
if (Interface_Scan_Next(&interface, NULL, &ifnet, &in_ifaddr) == 0)
|
||||
break;
|
||||
#ifdef STRUCT_IFNET_HAS_IF_ADDRLIST
|
||||
@@ -226,10 +229,7 @@
|
||||
continue; /* No address found for interface */
|
||||
#endif
|
||||
#else /* !freebsd2 && !hpux11 */
|
||||
-#if defined(linux)
|
||||
- if (Address_Scan_Next(&interface, &ifnet) == 0)
|
||||
- break;
|
||||
-#else
|
||||
+#if !defined(linux)
|
||||
if (Address_Scan_Next(&interface, &in_ifaddr) == 0)
|
||||
break;
|
||||
#endif
|
||||
@@ -240,6 +240,9 @@
|
||||
#elif defined(linux) || defined(sunV3)
|
||||
cp = (u_char *) & (((struct sockaddr_in *) &(ifnet.if_addr))->
|
||||
sin_addr.s_addr);
|
||||
+
|
||||
+ if (*cp == 0) /* first octet is zero? 0.x.x.x is not a */
|
||||
+ continue; /* legal address for an interface */
|
||||
#else
|
||||
cp = (u_char *) & (((struct sockaddr_in *) &(in_ifaddr.ia_addr))->
|
||||
sin_addr.s_addr);
|
@ -1,22 +0,0 @@
|
||||
--- net-snmp-5.1.1.rc1/apps/Makefile.in.pie 2004-03-09 17:51:28.000000000 +0200
|
||||
+++ net-snmp-5.1.1.rc1/apps/Makefile.in 2004-03-17 21:27:41.251685488 +0200
|
||||
@@ -101,7 +101,7 @@
|
||||
$(LINK) -o $@ snmptest.$(OSUFFIX) $(LOCAL_LIBS) ${LDFLAGS} ${LIBS}
|
||||
|
||||
snmptrapd$(EXEEXT): $(TRAPD_OBJECTS) $(USETRAPLIBS) $(INSTALLLIBS)
|
||||
- $(LINK) -o $@ $(TRAPD_OBJECTS) $(INSTALLLIBS) $(LOCAL_LIBS) ${LDFLAGS} ${TRAPLIBS}
|
||||
+ $(LINK) -o $@ -pie $(TRAPD_OBJECTS) $(INSTALLLIBS) $(LOCAL_LIBS) ${LDFLAGS} ${TRAPLIBS}
|
||||
|
||||
snmptrap$(EXEEXT): snmptrap.$(OSUFFIX) $(USELIBS)
|
||||
$(LINK) -o $@ snmptrap.$(OSUFFIX) $(LOCAL_LIBS) ${LDFLAGS} ${LIBS}
|
||||
--- net-snmp-5.1.1.rc1/agent/Makefile.in.pie 2003-10-14 16:30:48.000000000 +0300
|
||||
+++ net-snmp-5.1.1.rc1/agent/Makefile.in 2004-03-17 21:25:41.662096693 +0200
|
||||
@@ -116,7 +116,7 @@
|
||||
$(CC) $(CFLAGS) -o $@ -D_GETMIBSTAT_TEST -DDODEBUG -c $?
|
||||
|
||||
snmpd$(EXEEXT): ${LAGENTOBJS} $(USELIBS) $(HELPERLIB) $(LIBTARG) ${INSTALLLIBS}
|
||||
- $(LINK) $(CFLAGS) -o $@ ${LAGENTOBJS} $(LOCAL_LIBS) ${LDFLAGS} ${OUR_AGENT_LIBS}
|
||||
+ $(LINK) $(CFLAGS) -o $@ -pie ${LAGENTOBJS} $(LOCAL_LIBS) ${LDFLAGS} ${OUR_AGENT_LIBS}
|
||||
|
||||
|
||||
libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION): ${LLIBAGENTOBJS} libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION)
|
@ -1,30 +0,0 @@
|
||||
--- snmplib/scapi.c
|
||||
+++ snmplib/scapi.c
|
||||
@@ -334,6 +334,7 @@
|
||||
int rval = SNMPERR_SUCCESS;
|
||||
const EVP_MD *hashfn;
|
||||
EVP_MD_CTX ctx, *cptr;
|
||||
+ unsigned int tmp_len;
|
||||
#endif
|
||||
|
||||
DEBUGTRACE;
|
||||
@@ -379,13 +380,16 @@
|
||||
|
||||
/** do the final pass */
|
||||
#if defined(OLD_DES)
|
||||
- EVP_DigestFinal(cptr, MAC, MAC_len);
|
||||
+ EVP_DigestFinal(cptr, MAC, &tmp_len);
|
||||
+ *MAC_len = tmp_len;
|
||||
#else /* !OLD_DES */
|
||||
if (SSLeay() < 0x907000) {
|
||||
- EVP_DigestFinal(cptr, MAC, MAC_len);
|
||||
+ EVP_DigestFinal(cptr, MAC, &tmp_len);
|
||||
+ *MAC_len = tmp_len;
|
||||
free(cptr);
|
||||
} else {
|
||||
- EVP_DigestFinal_ex(cptr, MAC, MAC_len);
|
||||
+ EVP_DigestFinal_ex(cptr, MAC, &tmp_len);
|
||||
+ *MAC_len = tmp_len;
|
||||
EVP_MD_CTX_cleanup(cptr);
|
||||
}
|
||||
#endif
|
@ -1,10 +0,0 @@
|
||||
--- net-snmp-5.3.1/snmplib/snmp_parse_args.c.orig 2005-11-23 10:11:40.000000000 +0100
|
||||
+++ net-snmp-5.3.1/snmplib/snmp_parse_args.c 2007-06-14 13:10:54.000000000 +0200
|
||||
@@ -275,6 +275,7 @@
|
||||
break;
|
||||
|
||||
case 'M':
|
||||
+ netsnmp_get_mib_directory(); /* prepare the default directories */
|
||||
netsnmp_set_mib_directory(optarg);
|
||||
break;
|
||||
#endif /* DISABLE_MIB_LOADING */
|
@ -1,163 +0,0 @@
|
||||
--- net-snmp-5.3.1.pre2/configure.in.xxx 2006-05-05 23:22:23.000000000 +0200
|
||||
+++ net-snmp-5.3.1.pre2/configure.in 2006-05-26 12:51:52.000000000 +0200
|
||||
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
#
|
||||
-AC_INIT([Net-SNMP], [5.3.1.pre1], [net-snmp-coders@lists.sourceforge.net])
|
||||
+AC_INIT([Net-SNMP], [5.3.1.pre2], [net-snmp-coders@lists.sourceforge.net])
|
||||
AC_PREREQ([2.59])
|
||||
AC_CONFIG_SRCDIR([agent/mibgroup/ucd-snmp/extensible.c])
|
||||
AC_REVISION([$Revision: 5.206.2.5 $])
|
||||
--- net-snmp-5.3.1.pre2/configure.xxx 2006-05-26 12:51:52.000000000 +0200
|
||||
+++ net-snmp-5.3.1.pre2/configure 2006-05-26 12:53:49.000000000 +0200
|
||||
@@ -1,7 +1,7 @@
|
||||
#! /bin/sh
|
||||
# From configure.in Revision: 5.206.2.4 .
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
-# Generated by GNU Autoconf 2.59 for Net-SNMP 5.3.1.pre1.
|
||||
+# Generated by GNU Autoconf 2.59 for Net-SNMP 5.3.1.pre2.
|
||||
#
|
||||
# Report bugs to <net-snmp-coders@lists.sourceforge.net>.
|
||||
#
|
||||
@@ -429,8 +429,8 @@
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='Net-SNMP'
|
||||
PACKAGE_TARNAME='net-snmp'
|
||||
-PACKAGE_VERSION='5.3.1.pre1'
|
||||
-PACKAGE_STRING='Net-SNMP 5.3.1.pre1'
|
||||
+PACKAGE_VERSION='5.3.1.pre2'
|
||||
+PACKAGE_STRING='Net-SNMP 5.3.1.pre2'
|
||||
PACKAGE_BUGREPORT='net-snmp-coders@lists.sourceforge.net'
|
||||
|
||||
ac_unique_file="agent/mibgroup/ucd-snmp/extensible.c"
|
||||
@@ -940,7 +940,7 @@
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
-\`configure' configures Net-SNMP 5.3.1.pre1 to adapt to many kinds of systems.
|
||||
+\`configure' configures Net-SNMP 5.3.1.pre2 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1002,7 +1002,7 @@
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
- short | recursive ) echo "Configuration of Net-SNMP 5.3.1.pre1:";;
|
||||
+ short | recursive ) echo "Configuration of Net-SNMP 5.3.1.pre2:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1385,7 +1385,7 @@
|
||||
test -n "$ac_init_help" && exit 0
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
-Net-SNMP configure 5.3.1.pre1
|
||||
+Net-SNMP configure 5.3.1.pre2
|
||||
generated by GNU Autoconf 2.59
|
||||
|
||||
Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
@@ -1399,7 +1399,7 @@
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
-It was created by Net-SNMP $as_me 5.3.1.pre1, which was
|
||||
+It was created by Net-SNMP $as_me 5.3.1.pre2, which was
|
||||
generated by GNU Autoconf 2.59. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -34894,7 +34894,7 @@
|
||||
} >&5
|
||||
cat >&5 <<_CSEOF
|
||||
|
||||
-This file was extended by Net-SNMP $as_me 5.3.1.pre1, which was
|
||||
+This file was extended by Net-SNMP $as_me 5.3.1.pre2, which was
|
||||
generated by GNU Autoconf 2.59. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -34957,7 +34957,7 @@
|
||||
|
||||
cat >>$CONFIG_STATUS <<_ACEOF
|
||||
ac_cs_version="\\
|
||||
-Net-SNMP config.status 5.3.1.pre1
|
||||
+Net-SNMP config.status 5.3.1.pre2
|
||||
configured by $0, generated by GNU Autoconf 2.59,
|
||||
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
|
||||
|
||||
--- net-snmp-5.3.1.pre2/configure.mnttab.xxx 2006-05-13 08:49:56.000000000 +0200
|
||||
+++ net-snmp-5.3.1.pre2/configure.mnttab 2006-05-26 12:51:52.000000000 +0200
|
||||
@@ -1,7 +1,7 @@
|
||||
#! /bin/sh
|
||||
# From configure.in Revision: 5.206.2.4 .
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
-# Generated by GNU Autoconf 2.59 for Net-SNMP 5.3.1.pre1.
|
||||
+# Generated by GNU Autoconf 2.59 for Net-SNMP 5.3.1.pre2.
|
||||
#
|
||||
# Report bugs to <net-snmp-coders@lists.sourceforge.net>.
|
||||
#
|
||||
@@ -429,8 +429,8 @@
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='Net-SNMP'
|
||||
PACKAGE_TARNAME='net-snmp'
|
||||
-PACKAGE_VERSION='5.3.1.pre1'
|
||||
-PACKAGE_STRING='Net-SNMP 5.3.1.pre1'
|
||||
+PACKAGE_VERSION='5.3.1.pre2'
|
||||
+PACKAGE_STRING='Net-SNMP 5.3.1.pre2'
|
||||
PACKAGE_BUGREPORT='net-snmp-coders@lists.sourceforge.net'
|
||||
|
||||
ac_unique_file="agent/mibgroup/ucd-snmp/extensible.c"
|
||||
@@ -940,7 +940,7 @@
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
-\`configure' configures Net-SNMP 5.3.1.pre1 to adapt to many kinds of systems.
|
||||
+\`configure' configures Net-SNMP 5.3.1.pre2 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1002,7 +1002,7 @@
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
- short | recursive ) echo "Configuration of Net-SNMP 5.3.1.pre1:";;
|
||||
+ short | recursive ) echo "Configuration of Net-SNMP 5.3.1.pre2:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1385,7 +1385,7 @@
|
||||
test -n "$ac_init_help" && exit 0
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
-Net-SNMP configure 5.3.1.pre1
|
||||
+Net-SNMP configure 5.3.1.pre2
|
||||
generated by GNU Autoconf 2.59
|
||||
|
||||
Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
@@ -1399,7 +1399,7 @@
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
-It was created by Net-SNMP $as_me 5.3.1.pre1, which was
|
||||
+It was created by Net-SNMP $as_me 5.3.1.pre2, which was
|
||||
generated by GNU Autoconf 2.59. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -34902,7 +34902,7 @@
|
||||
} >&5
|
||||
cat >&5 <<_CSEOF
|
||||
|
||||
-This file was extended by Net-SNMP $as_me 5.3.1.pre1, which was
|
||||
+This file was extended by Net-SNMP $as_me 5.3.1.pre2, which was
|
||||
generated by GNU Autoconf 2.59. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -34965,7 +34965,7 @@
|
||||
|
||||
cat >>$CONFIG_STATUS <<_ACEOF
|
||||
ac_cs_version="\\
|
||||
-Net-SNMP config.status 5.3.1.pre1
|
||||
+Net-SNMP config.status 5.3.1.pre2
|
||||
configured by $0, generated by GNU Autoconf 2.59,
|
||||
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
|
||||
|
@ -1,49 +0,0 @@
|
||||
--- net-snmp-5.4/agent/mibgroup/agentx/master_admin.c.old 2006-03-09 01:13:18.000000000 +0100
|
||||
+++ net-snmp-5.4/agent/mibgroup/agentx/master_admin.c 2007-01-23 10:48:49.000000000 +0100
|
||||
@@ -138,9 +138,7 @@
|
||||
snmp_call_callbacks(SNMP_CALLBACK_APPLICATION,
|
||||
SNMPD_CALLBACK_REQ_UNREG_SYSOR_SESS,
|
||||
(void*)session);
|
||||
- if (session->myvoid != NULL) {
|
||||
- free(session->myvoid);
|
||||
- }
|
||||
+ SNMP_FREE(session->myvoid);
|
||||
/*
|
||||
* The following is necessary to avoid locking up the agent when
|
||||
* a sugagent dies during a set request. We must clean up the
|
||||
@@ -171,14 +169,9 @@
|
||||
|
||||
*prevNext = sp->next;
|
||||
|
||||
- if (sp->securityAuthProto != NULL) {
|
||||
- free(sp->securityAuthProto);
|
||||
- }
|
||||
- if (sp->securityName != NULL) {
|
||||
- free(sp->securityName);
|
||||
- }
|
||||
- free(sp);
|
||||
- sp = NULL;
|
||||
+ SNMP_FREE(sp->securityAuthProto);
|
||||
+ SNMP_FREE(sp->securityName);
|
||||
+ SNMP_FREE(sp);
|
||||
|
||||
DEBUGMSGTL(("agentx/master", "closed %08p, %d okay\n",
|
||||
session, sessid));
|
||||
@@ -343,7 +336,7 @@
|
||||
return AGENTX_ERR_INDEX_NONE_AVAILABLE; /* XXX */
|
||||
} else {
|
||||
(void) snmp_clone_var(res, vp);
|
||||
- free(res);
|
||||
+ SNMP_FREE(res);
|
||||
}
|
||||
vp->next_variable = next;
|
||||
}
|
||||
@@ -370,7 +363,7 @@
|
||||
if (res != SNMP_ERR_NOERROR) {
|
||||
for (vp2 = pdu->variables; vp2 != vp; vp2 = vp2->next_variable) {
|
||||
rv = register_index(vp2, ALLOCATE_THIS_INDEX, session);
|
||||
- free(rv);
|
||||
+ SNMP_FREE(rv);
|
||||
}
|
||||
return AGENTX_ERR_INDEX_NOT_ALLOCATED; /* Probably */
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
--- net-snmp-5.4/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c.old 2006-09-15 02:48:40.000000000 +0200
|
||||
+++ net-snmp-5.4/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c 2006-12-07 12:35:27.000000000 +0100
|
||||
@@ -19,7 +19,8 @@
|
||||
#if defined (NETSNMP_ENABLE_IPV6)
|
||||
#include <linux/types.h>
|
||||
#include <asm/types.h>
|
||||
-#include <linux/rtnetlink.h>
|
||||
+/* #include <linux/rtnetlink.h> */
|
||||
+#include <linux/if_addr.h>
|
||||
#endif
|
||||
|
||||
#include "ipaddress_ioctl.h"
|
@ -1,86 +0,0 @@
|
||||
Index: agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable.c
|
||||
===================================================================
|
||||
RCS file: /cvsroot/net-snmp/net-snmp/agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable.c,v
|
||||
retrieving revision 1.17
|
||||
retrieving revision 1.18
|
||||
diff -u -p -r1.17 -r1.18
|
||||
--- agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable.c 25 Jan 2006 16:25:56 -0000 1.17
|
||||
+++ agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable.c 6 Dec 2006 15:10:40 -0000 1.18
|
||||
@@ -2,7 +2,7 @@
|
||||
* Note: this file originally auto-generated by mib2c using
|
||||
* version : 1.48 $ of : mfd-top.m2c,v $
|
||||
*
|
||||
- * $Id: ipAddressTable.c,v 1.17 2006/01/25 16:25:56 dts12 Exp $
|
||||
+ * $Id: ipAddressTable.c,v 1.18 2006/12/06 15:10:40 rstory Exp $
|
||||
*/
|
||||
/** \page MFD helper for ipAddressTable
|
||||
*
|
||||
@@ -156,6 +156,10 @@ ipAddressTable_rowreq_ctx_cleanup(ipAddr
|
||||
/*
|
||||
* TODO:211:o: |-> Perform extra ipAddressTable rowreq cleanup.
|
||||
*/
|
||||
+ if (NULL != rowreq_ctx->data) {
|
||||
+ ipAddressTable_release_data(rowreq_ctx->data);
|
||||
+ rowreq_ctx->data = NULL;
|
||||
+ }
|
||||
} /* ipAddressTable_rowreq_ctx_cleanup */
|
||||
|
||||
/**
|
||||
Index: agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable.c
|
||||
===================================================================
|
||||
RCS file: /cvsroot/net-snmp/net-snmp/agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable.c,v
|
||||
retrieving revision 1.12
|
||||
retrieving revision 1.13
|
||||
diff -u -p -r1.12 -r1.13
|
||||
--- agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable.c 12 Jun 2006 20:05:20 -0000 1.12
|
||||
+++ agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable.c 6 Dec 2006 15:01:26 -0000 1.13
|
||||
@@ -2,7 +2,7 @@
|
||||
* Note: this file originally auto-generated by mib2c using
|
||||
* version : 1.48 $ of : mfd-top.m2c,v $
|
||||
*
|
||||
- * $Id: inetCidrRouteTable.c,v 1.12 2006/06/12 20:05:20 rstory Exp $
|
||||
+ * $Id: inetCidrRouteTable.c,v 1.13 2006/12/06 15:01:26 rstory Exp $
|
||||
*/
|
||||
/** \page MFD helper for inetCidrRouteTable
|
||||
*
|
||||
@@ -205,6 +205,10 @@ inetCidrRouteTable_rowreq_ctx_cleanup(in
|
||||
/*
|
||||
* TODO:211:o: |-> Perform extra inetCidrRouteTable rowreq cleanup.
|
||||
*/
|
||||
+ if (NULL != rowreq_ctx->data) {
|
||||
+ inetCidrRouteTable_release_data(rowreq_ctx->data);
|
||||
+ rowreq_ctx->data = NULL;
|
||||
+ }
|
||||
} /* inetCidrRouteTable_rowreq_ctx_cleanup */
|
||||
|
||||
/**
|
||||
Index: agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.c
|
||||
===================================================================
|
||||
RCS file: /cvsroot/net-snmp/net-snmp/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.c,v
|
||||
retrieving revision 1.11
|
||||
retrieving revision 1.12
|
||||
diff -u -p -r1.11 -r1.12
|
||||
--- agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.c 25 Jan 2006 16:25:54 -0000 1.11
|
||||
+++ agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.c 6 Dec 2006 15:01:26 -0000 1.12
|
||||
@@ -2,7 +2,7 @@
|
||||
* Note: this file originally auto-generated by mib2c using
|
||||
* version : 1.48 $ of : mfd-top.m2c,v $
|
||||
*
|
||||
- * $Id: ipCidrRouteTable.c,v 1.11 2006/01/25 16:25:54 dts12 Exp $
|
||||
+ * $Id: ipCidrRouteTable.c,v 1.12 2006/12/06 15:01:26 rstory Exp $
|
||||
*/
|
||||
/** \page MFD helper for ipCidrRouteTable
|
||||
*
|
||||
@@ -160,6 +160,10 @@ ipCidrRouteTable_rowreq_ctx_cleanup(ipCi
|
||||
/*
|
||||
* TODO:211:o: |-> Perform extra ipCidrRouteTable rowreq cleanup.
|
||||
*/
|
||||
+ if (NULL != rowreq_ctx->data) {
|
||||
+ ipCidrRouteTable_release_data(rowreq_ctx->data);
|
||||
+ rowreq_ctx->data = NULL;
|
||||
+ }
|
||||
} /* ipCidrRouteTable_rowreq_ctx_cleanup */
|
||||
|
||||
/**
|
||||
|
||||
|
@ -1,13 +0,0 @@
|
||||
--- net-snmp-5.4/agent/mibgroup/if-mib/ifTable/ifTable_data_access.c.old 2006-10-19 22:38:00.000000000 +0200
|
||||
+++ net-snmp-5.4/agent/mibgroup/if-mib/ifTable/ifTable_data_access.c 2007-03-12 15:47:16.000000000 +0100
|
||||
@@ -204,8 +204,8 @@
|
||||
DEBUGMSGTL(("ifTable:access", "updating existing entry\n"));
|
||||
|
||||
#ifdef USING_IF_MIB_IFXTABLE_IFXTABLE_MODULE
|
||||
- netsnmp_assert(strcmp(rowreq_ctx->data.ifName,
|
||||
- ifentry->name) == 0);
|
||||
+ int rc = strcmp(rowreq_ctx->data.ifName,ifentry->name);
|
||||
+ netsnmp_assert(rc == 0);
|
||||
#endif
|
||||
/*
|
||||
* if the interface was missing, but came back, clear the
|
@ -1,145 +0,0 @@
|
||||
--- net-snmp-5.4/configure.libdir.fix 2007-02-26 12:25:08.000000000 +0100
|
||||
+++ net-snmp-5.4/configure.libdir 2007-02-26 12:28:03.000000000 +0100
|
||||
@@ -27039,7 +27039,7 @@
|
||||
if test "$with_libwrap" != "no"; then
|
||||
if test "$with_libwrap" != "yes"; then
|
||||
CPPFLAGS="${CPPFLAGS} -I$with_libwrap/include"
|
||||
- LDFLAGS="${LDFLAGS} -L$with_libwrap/lib"
|
||||
+ LDFLAGS="${LDFLAGS} -L$with_libwrap"
|
||||
fi
|
||||
|
||||
_libs=${LIBS}
|
||||
@@ -27242,7 +27242,7 @@
|
||||
#define NETSNMP_USE_LIBWRAP 1
|
||||
_ACEOF
|
||||
|
||||
- test "$with_libwrap" != no -a "$with_libwrap" != yes && WRAPLIBS="-L$with_libwrap/lib"
|
||||
+ test "$with_libwrap" != no -a "$with_libwrap" != yes && WRAPLIBS="-L$with_libwrap"
|
||||
WRAPLIBS="$WRAPLIBS -lwrap"
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
@@ -27470,7 +27470,7 @@
|
||||
#define NETSNMP_USE_LIBWRAP 1
|
||||
_ACEOF
|
||||
|
||||
- test "$with_libwrap" != no -a "$with_libwrap" != yes && WRAPLIBS="-L$with_libwrap/lib"
|
||||
+ test "$with_libwrap" != no -a "$with_libwrap" != yes && WRAPLIBS="-L$with_libwrap"
|
||||
WRAPLIBS="$WRAPLIBS -lwrap -lnsl"
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
--- net-snmp-5.4/configure.mnttab.fix 2006-11-24 18:56:15.000000000 +0100
|
||||
+++ net-snmp-5.4/configure.mnttab 2007-02-26 12:28:14.000000000 +0100
|
||||
@@ -27047,7 +27047,7 @@
|
||||
if test "$with_libwrap" != "no"; then
|
||||
if test "$with_libwrap" != "yes"; then
|
||||
CPPFLAGS="${CPPFLAGS} -I$with_libwrap/include"
|
||||
- LDFLAGS="${LDFLAGS} -L$with_libwrap/lib"
|
||||
+ LDFLAGS="${LDFLAGS} -L$with_libwrap"
|
||||
fi
|
||||
|
||||
_libs=${LIBS}
|
||||
@@ -27250,7 +27250,7 @@
|
||||
#define NETSNMP_USE_LIBWRAP 1
|
||||
_ACEOF
|
||||
|
||||
- test "$with_libwrap" != no -a "$with_libwrap" != yes && WRAPLIBS="-L$with_libwrap/lib"
|
||||
+ test "$with_libwrap" != no -a "$with_libwrap" != yes && WRAPLIBS="-L$with_libwrap"
|
||||
WRAPLIBS="$WRAPLIBS -lwrap"
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
@@ -27478,7 +27478,7 @@
|
||||
#define NETSNMP_USE_LIBWRAP 1
|
||||
_ACEOF
|
||||
|
||||
- test "$with_libwrap" != no -a "$with_libwrap" != yes && WRAPLIBS="-L$with_libwrap/lib"
|
||||
+ test "$with_libwrap" != no -a "$with_libwrap" != yes && WRAPLIBS="-L$with_libwrap"
|
||||
WRAPLIBS="$WRAPLIBS -lwrap -lnsl"
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
--- net-snmp-5.4/configure.fix 2007-02-26 12:25:08.000000000 +0100
|
||||
+++ net-snmp-5.4/configure 2007-02-26 12:27:24.000000000 +0100
|
||||
@@ -27039,7 +27039,7 @@
|
||||
if test "$with_libwrap" != "no"; then
|
||||
if test "$with_libwrap" != "yes"; then
|
||||
CPPFLAGS="${CPPFLAGS} -I$with_libwrap/include"
|
||||
- LDFLAGS="${LDFLAGS} -L$with_libwrap/lib"
|
||||
+ LDFLAGS="${LDFLAGS} -L$with_libwrap"
|
||||
fi
|
||||
|
||||
_libs=${LIBS}
|
||||
@@ -27242,7 +27242,7 @@
|
||||
#define NETSNMP_USE_LIBWRAP 1
|
||||
_ACEOF
|
||||
|
||||
- test "$with_libwrap" != no -a "$with_libwrap" != yes && WRAPLIBS="-L$with_libwrap/lib"
|
||||
+ test "$with_libwrap" != no -a "$with_libwrap" != yes && WRAPLIBS="-L$with_libwrap"
|
||||
WRAPLIBS="$WRAPLIBS -lwrap"
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
@@ -27470,7 +27470,7 @@
|
||||
#define NETSNMP_USE_LIBWRAP 1
|
||||
_ACEOF
|
||||
|
||||
- test "$with_libwrap" != no -a "$with_libwrap" != yes && WRAPLIBS="-L$with_libwrap/lib"
|
||||
+ test "$with_libwrap" != no -a "$with_libwrap" != yes && WRAPLIBS="-L$with_libwrap"
|
||||
WRAPLIBS="$WRAPLIBS -lwrap -lnsl"
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
--- net-snmp-5.4/configure.in.fix 2006-11-24 18:53:18.000000000 +0100
|
||||
+++ net-snmp-5.4/configure.in 2007-02-26 12:27:50.000000000 +0100
|
||||
@@ -2683,7 +2683,7 @@
|
||||
if test "$with_libwrap" != "no"; then
|
||||
if test "$with_libwrap" != "yes"; then
|
||||
CPPFLAGS="${CPPFLAGS} -I$with_libwrap/include"
|
||||
- LDFLAGS="${LDFLAGS} -L$with_libwrap/lib"
|
||||
+ LDFLAGS="${LDFLAGS} -L$with_libwrap"
|
||||
fi
|
||||
|
||||
_libs=${LIBS}
|
||||
@@ -2700,7 +2700,7 @@
|
||||
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE(NETSNMP_USE_LIBWRAP)
|
||||
- test "$with_libwrap" != no -a "$with_libwrap" != yes && WRAPLIBS="-L$with_libwrap/lib"
|
||||
+ test "$with_libwrap" != no -a "$with_libwrap" != yes && WRAPLIBS="-L$with_libwrap"
|
||||
WRAPLIBS="$WRAPLIBS -lwrap"],
|
||||
[
|
||||
AC_MSG_RESULT([no])
|
||||
@@ -2716,7 +2716,7 @@
|
||||
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(NETSNMP_USE_LIBWRAP)
|
||||
- test "$with_libwrap" != no -a "$with_libwrap" != yes && WRAPLIBS="-L$with_libwrap/lib"
|
||||
+ test "$with_libwrap" != no -a "$with_libwrap" != yes && WRAPLIBS="-L$with_libwrap"
|
||||
WRAPLIBS="$WRAPLIBS -lwrap -lnsl",
|
||||
|
||||
AC_MSG_RESULT(no)
|
||||
--- net-snmp-5.4/configure.ethtool-config.fix 2007-02-26 12:25:08.000000000 +0100
|
||||
+++ net-snmp-5.4/configure.ethtool-config 2007-02-26 12:27:38.000000000 +0100
|
||||
@@ -27039,7 +27039,7 @@
|
||||
if test "$with_libwrap" != "no"; then
|
||||
if test "$with_libwrap" != "yes"; then
|
||||
CPPFLAGS="${CPPFLAGS} -I$with_libwrap/include"
|
||||
- LDFLAGS="${LDFLAGS} -L$with_libwrap/lib"
|
||||
+ LDFLAGS="${LDFLAGS} -L$with_libwrap"
|
||||
fi
|
||||
|
||||
_libs=${LIBS}
|
||||
@@ -27242,7 +27242,7 @@
|
||||
#define NETSNMP_USE_LIBWRAP 1
|
||||
_ACEOF
|
||||
|
||||
- test "$with_libwrap" != no -a "$with_libwrap" != yes && WRAPLIBS="-L$with_libwrap/lib"
|
||||
+ test "$with_libwrap" != no -a "$with_libwrap" != yes && WRAPLIBS="-L$with_libwrap"
|
||||
WRAPLIBS="$WRAPLIBS -lwrap"
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
@@ -27470,7 +27470,7 @@
|
||||
#define NETSNMP_USE_LIBWRAP 1
|
||||
_ACEOF
|
||||
|
||||
- test "$with_libwrap" != no -a "$with_libwrap" != yes && WRAPLIBS="-L$with_libwrap/lib"
|
||||
+ test "$with_libwrap" != no -a "$with_libwrap" != yes && WRAPLIBS="-L$with_libwrap"
|
||||
WRAPLIBS="$WRAPLIBS -lwrap -lnsl"
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
@ -1,20 +0,0 @@
|
||||
--- net-snmp-5.4/agent/mibgroup/tcp-mib/data_access/tcpConn_linux.c.old 2006-12-08 15:29:56.000000000 +0200
|
||||
+++ net-snmp-5.4/agent/mibgroup/tcp-mib/data_access/tcpConn_linux.c 2006-12-08 15:30:39.000000000 +0200
|
||||
@@ -275,15 +275,6 @@
|
||||
if (0 == log_open_err)
|
||||
log_open_err = 1;
|
||||
|
||||
- netsnmp_assert(NULL != container);
|
||||
-
|
||||
-#undef PROCFILE
|
||||
-#define PROCFILE "/proc/net/tcp6"
|
||||
- if (!(in = fopen(PROCFILE, "r"))) {
|
||||
- snmp_log(LOG_ERR,"could not open " PROCFILE "\n");
|
||||
- return -2;
|
||||
- }
|
||||
-
|
||||
fgets(line, sizeof(line), in); /* skip header */
|
||||
|
||||
/*
|
||||
|
||||
|
@ -1,46 +0,0 @@
|
||||
--- snmplib/snmpUDPDomain.c 2006/09/19 23:42:17 15274
|
||||
+++ snmplib/snmpUDPDomain.c 2006/12/28 23:29:44 15683
|
||||
@@ -586,28 +586,24 @@
|
||||
int rc = 0;
|
||||
char *str = NULL;
|
||||
char *client_socket = NULL;
|
||||
- netsnmp_udp_addr_pair *addr_pair = NULL;
|
||||
+ netsnmp_udp_addr_pair addr_pair;
|
||||
|
||||
if (addr == NULL || addr->sin_family != AF_INET) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- addr_pair = (netsnmp_udp_addr_pair *) malloc(sizeof(netsnmp_udp_addr_pair));
|
||||
- if (addr_pair == NULL) {
|
||||
- return NULL;
|
||||
- }
|
||||
- memset(addr_pair, 0, sizeof(netsnmp_udp_addr_pair));
|
||||
- memcpy(&(addr_pair->remote_addr), addr, sizeof(struct sockaddr_in));
|
||||
+ memset(&addr_pair, 0, sizeof(netsnmp_udp_addr_pair));
|
||||
+ memcpy(&(addr_pair.remote_addr), addr, sizeof(struct sockaddr_in));
|
||||
|
||||
t = (netsnmp_transport *) malloc(sizeof(netsnmp_transport));
|
||||
if (t == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- str = netsnmp_udp_fmtaddr(NULL, (void *)addr_pair,
|
||||
+ str = netsnmp_udp_fmtaddr(NULL, (void *)&addr_pair,
|
||||
sizeof(netsnmp_udp_addr_pair));
|
||||
- DEBUGMSGTL(("netsnmp_udp", "open %s %s:%d\n", local ? "local" : "remote",
|
||||
- str,addr->sin_port));
|
||||
+ DEBUGMSGTL(("netsnmp_udp", "open %s %s\n", local ? "local" : "remote",
|
||||
+ str));
|
||||
free(str);
|
||||
|
||||
memset(t, 0, sizeof(netsnmp_transport));
|
||||
@@ -690,7 +686,7 @@
|
||||
t->remote[4] = (htons(addr->sin_port) & 0xff00) >> 8;
|
||||
t->remote[5] = (htons(addr->sin_port) & 0x00ff) >> 0;
|
||||
t->remote_length = 6;
|
||||
- memcpy(t->data, addr_pair, sizeof(netsnmp_udp_addr_pair));
|
||||
+ memcpy(t->data, &addr_pair, sizeof(netsnmp_udp_addr_pair));
|
||||
t->data_length = sizeof(netsnmp_udp_addr_pair);
|
||||
}
|
||||
|
@ -1,12 +0,0 @@
|
||||
Already fixed upstream, should appear in 5.4.1
|
||||
--- net-snmp-5.4/agent/mibgroup/udp-mib/data_access/udp_endpoint_linux.c.orig 2006-09-19 05:26:57.000000000 +0200
|
||||
+++ net-snmp-5.4/agent/mibgroup/udp-mib/data_access/udp_endpoint_linux.c 2007-05-03 13:21:55.000000000 +0200
|
||||
@@ -194,7 +194,7 @@
|
||||
offset, line_info->start));
|
||||
return PMLP_RC_MEMORY_UNUSED;
|
||||
}
|
||||
- ep->loc_addr_len = offset;
|
||||
+ ep->rmt_addr_len = offset;
|
||||
ptr += (offset * 2);
|
||||
++ptr; /* skip ':' */
|
||||
|
@ -80,15 +80,15 @@
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
hardcode_shlibpath_var=no
|
||||
@@ -9350,7 +9350,7 @@
|
||||
@@ -9504,7 +9504,7 @@
|
||||
shlibpath_overrides_runpath=unknown
|
||||
version_type=none
|
||||
dynamic_linker="$host_os ld.so"
|
||||
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
|
||||
+sys_lib_dlsearch_path_spec="/lib $LIBDIR"
|
||||
|
||||
if test "$GCC" = yes; then
|
||||
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
|
||||
if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
|
||||
case $host_os in
|
||||
@@ -9363,7 +9363,7 @@
|
||||
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
|
||||
fi
|
@ -1,178 +1,3 @@
|
||||
--- net-snmp-5.4/apps/snmptrapd_log.c.orig 2006-09-15 02:48:43.000000000 +0200
|
||||
+++ net-snmp-5.4/apps/snmptrapd_log.c 2007-05-03 12:19:58.000000000 +0200
|
||||
@@ -626,6 +626,8 @@
|
||||
char fmt_cmd = options->cmd; /* what we're formatting */
|
||||
u_char *temp_buf = NULL;
|
||||
size_t temp_buf_len = 64, temp_out_len = 0;
|
||||
+ char *tstr;
|
||||
+ unsigned int oflags;
|
||||
|
||||
if ((temp_buf = calloc(temp_buf_len, 1)) == NULL) {
|
||||
return 0;
|
||||
@@ -681,125 +683,59 @@
|
||||
* Write the numerical transport information.
|
||||
*/
|
||||
if (transport != NULL && transport->f_fmtaddr != NULL) {
|
||||
- char *tstr =
|
||||
- transport->f_fmtaddr(transport, pdu->transport_data,
|
||||
- pdu->transport_data_length);
|
||||
- if (!snmp_strcat
|
||||
- (&temp_buf, &temp_buf_len, &temp_out_len, 1, (u_char *)tstr)) {
|
||||
- if (tstr != NULL) {
|
||||
- free(tstr);
|
||||
- }
|
||||
- if (temp_buf != NULL) {
|
||||
- free(temp_buf);
|
||||
- }
|
||||
+ oflags = transport->flags;
|
||||
+ transport->flags &= ~NETSNMP_TRANSPORT_FLAG_HOSTNAME;
|
||||
+ tstr = transport->f_fmtaddr(transport, pdu->transport_data,
|
||||
+ pdu->transport_data_length);
|
||||
+ transport->flags = oflags;
|
||||
+
|
||||
+ if (!tstr) goto noip;
|
||||
+ if (!snmp_strcat(&temp_buf, &temp_buf_len, &temp_out_len,
|
||||
+ 1, (u_char *)tstr)) {
|
||||
+ SNMP_FREE(temp_buf);
|
||||
+ SNMP_FREE(tstr);
|
||||
return 0;
|
||||
}
|
||||
- if (tstr != NULL) {
|
||||
- free(tstr);
|
||||
- }
|
||||
+ SNMP_FREE(tstr);
|
||||
} else {
|
||||
- if (!snmp_strcat
|
||||
- (&temp_buf, &temp_buf_len, &temp_out_len, 1,
|
||||
- "<UNKNOWN>")) {
|
||||
- if (temp_buf != NULL) {
|
||||
- free(temp_buf);
|
||||
- }
|
||||
+noip:
|
||||
+ if (!snmp_strcat(&temp_buf, &temp_buf_len, &temp_out_len, 1,
|
||||
+ (const u_char*)"<UNKNOWN>")) {
|
||||
+ SNMP_FREE(temp_buf);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
- /*
|
||||
- * Write a host name.
|
||||
- */
|
||||
case CHR_PDU_NAME:
|
||||
/*
|
||||
- * Right, apparently a name lookup is wanted. This is only reasonable
|
||||
- * for the UDP and TCP transport domains (we don't want to try to be
|
||||
- * too clever here).
|
||||
+ * Try to convert the numerical transport information
|
||||
+ * into a hostname. Or rather, have the transport-specific
|
||||
+ * address formatting routine do this.
|
||||
+ * Otherwise falls back to the numeric address format.
|
||||
*/
|
||||
-#ifdef NETSNMP_TRANSPORT_TCP_DOMAIN
|
||||
- if (transport != NULL && (transport->domain == netsnmpUDPDomain ||
|
||||
- transport->domain ==
|
||||
- netsnmp_snmpTCPDomain)) {
|
||||
-#else
|
||||
- if (transport != NULL && transport->domain == netsnmpUDPDomain) {
|
||||
-#endif
|
||||
- /*
|
||||
- * This is kind of bletcherous -- it breaks the opacity of
|
||||
- * transport_data but never mind -- the alternative is a lot of
|
||||
- * munging strings from f_fmtaddr.
|
||||
- */
|
||||
- struct sockaddr_in *addr =
|
||||
- (struct sockaddr_in *) pdu->transport_data;
|
||||
- if (addr != NULL
|
||||
- && pdu->transport_data_length ==
|
||||
- sizeof(struct sockaddr_in)) {
|
||||
- if (!netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID,
|
||||
- NETSNMP_DS_APP_NUMERIC_IP)) {
|
||||
- host =
|
||||
- gethostbyaddr((char *) &(addr->sin_addr),
|
||||
- sizeof(struct in_addr), AF_INET);
|
||||
- }
|
||||
- if (host != NULL) {
|
||||
- if (!snmp_strcat
|
||||
- (&temp_buf, &temp_buf_len, &temp_out_len, 1,
|
||||
- (u_char *)host->h_name)) {
|
||||
- if (temp_buf != NULL) {
|
||||
- free(temp_buf);
|
||||
- }
|
||||
- return 0;
|
||||
- }
|
||||
- } else {
|
||||
- if (!snmp_strcat
|
||||
- (&temp_buf, &temp_buf_len, &temp_out_len, 1,
|
||||
- (u_char *)inet_ntoa(addr->sin_addr))) {
|
||||
- if (temp_buf != NULL) {
|
||||
- free(temp_buf);
|
||||
- }
|
||||
- return 0;
|
||||
- }
|
||||
- }
|
||||
- } else {
|
||||
- if (!snmp_strcat
|
||||
- (&temp_buf, &temp_buf_len, &temp_out_len, 1,
|
||||
- "<UNKNOWN>")) {
|
||||
- if (temp_buf != NULL) {
|
||||
- free(temp_buf);
|
||||
- }
|
||||
- return 0;
|
||||
- }
|
||||
- }
|
||||
- } else if (transport != NULL && transport->f_fmtaddr != NULL) {
|
||||
- /*
|
||||
- * Some other domain for which we do not know how to do a name
|
||||
- * lookup. Fall back to the formatted transport address.
|
||||
- */
|
||||
- char *tstr =
|
||||
- transport->f_fmtaddr(transport, pdu->transport_data,
|
||||
- pdu->transport_data_length);
|
||||
- if (!snmp_strcat
|
||||
- (&temp_buf, &temp_buf_len, &temp_out_len, 1, (u_char *)tstr)) {
|
||||
- if (tstr != NULL) {
|
||||
- free(tstr);
|
||||
- }
|
||||
- if (temp_buf != NULL) {
|
||||
- free(temp_buf);
|
||||
- }
|
||||
+ if (transport != NULL && transport->f_fmtaddr != NULL) {
|
||||
+ oflags = transport->flags;
|
||||
+ if (!netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID,
|
||||
+ NETSNMP_DS_APP_NUMERIC_IP))
|
||||
+ transport->flags |= NETSNMP_TRANSPORT_FLAG_HOSTNAME;
|
||||
+ tstr = transport->f_fmtaddr(transport, pdu->transport_data,
|
||||
+ pdu->transport_data_length);
|
||||
+ transport->flags = oflags;
|
||||
+
|
||||
+ if (!tstr) goto nohost;
|
||||
+ if (!snmp_strcat(&temp_buf, &temp_buf_len, &temp_out_len,
|
||||
+ 1, (u_char *)tstr)) {
|
||||
+ SNMP_FREE(temp_buf);
|
||||
+ SNMP_FREE(tstr);
|
||||
return 0;
|
||||
}
|
||||
- if (tstr != NULL) {
|
||||
- free(tstr);
|
||||
- }
|
||||
+ SNMP_FREE(tstr);
|
||||
} else {
|
||||
- /*
|
||||
- * We are kind of stuck!
|
||||
- */
|
||||
+nohost:
|
||||
if (!snmp_strcat(&temp_buf, &temp_buf_len, &temp_out_len, 1,
|
||||
- "<UNKNOWN>")) {
|
||||
- if (temp_buf != NULL) {
|
||||
- free(temp_buf);
|
||||
- }
|
||||
+ (const u_char*)"<UNKNOWN>")) {
|
||||
+ SNMP_FREE(temp_buf);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
--- net-snmp-5.4/snmplib/snmpUDPDomain.c.orig 2006-09-20 01:42:17.000000000 +0200
|
||||
+++ net-snmp-5.4/snmplib/snmpUDPDomain.c 2007-05-03 12:17:30.000000000 +0200
|
||||
@@ -87,6 +87,7 @@
|
||||
@ -204,3 +29,184 @@
|
||||
|
||||
/* The standard SNMP domains. */
|
||||
|
||||
--- net-snmp-5.4.1/apps/snmptrapd_log.c.orig 2007-05-31 16:39:14.000000000 +0200
|
||||
+++ net-snmp-5.4.1/apps/snmptrapd_log.c 2007-08-07 13:46:40.000000000 +0200
|
||||
@@ -626,6 +626,8 @@ realloc_handle_ip_fmt(u_char ** buf, siz
|
||||
char fmt_cmd = options->cmd; /* what we're formatting */
|
||||
u_char *temp_buf = NULL;
|
||||
size_t temp_buf_len = 64, temp_out_len = 0;
|
||||
+ char *tstr;
|
||||
+ unsigned int oflags;
|
||||
|
||||
if ((temp_buf = calloc(temp_buf_len, 1)) == NULL) {
|
||||
return 0;
|
||||
@@ -681,130 +683,59 @@ realloc_handle_ip_fmt(u_char ** buf, siz
|
||||
* Write the numerical transport information.
|
||||
*/
|
||||
if (transport != NULL && transport->f_fmtaddr != NULL) {
|
||||
- char *tstr =
|
||||
- transport->f_fmtaddr(transport, pdu->transport_data,
|
||||
- pdu->transport_data_length);
|
||||
- if (!snmp_strcat
|
||||
- (&temp_buf, &temp_buf_len, &temp_out_len, 1, (u_char *)tstr)) {
|
||||
- if (tstr != NULL) {
|
||||
- free(tstr);
|
||||
- }
|
||||
- if (temp_buf != NULL) {
|
||||
- free(temp_buf);
|
||||
- }
|
||||
+ oflags = transport->flags;
|
||||
+ transport->flags &= ~NETSNMP_TRANSPORT_FLAG_HOSTNAME;
|
||||
+ tstr = transport->f_fmtaddr(transport, pdu->transport_data,
|
||||
+ pdu->transport_data_length);
|
||||
+ transport->flags = oflags;
|
||||
+
|
||||
+ if (!tstr) goto noip;
|
||||
+ if (!snmp_strcat(&temp_buf, &temp_buf_len, &temp_out_len,
|
||||
+ 1, (u_char *)tstr)) {
|
||||
+ SNMP_FREE(temp_buf);
|
||||
+ SNMP_FREE(tstr);
|
||||
return 0;
|
||||
}
|
||||
- if (tstr != NULL) {
|
||||
- free(tstr);
|
||||
- }
|
||||
+ SNMP_FREE(tstr);
|
||||
} else {
|
||||
- if (!snmp_strcat
|
||||
- (&temp_buf, &temp_buf_len, &temp_out_len, 1,
|
||||
- (const u_char*)"<UNKNOWN>")) {
|
||||
- if (temp_buf != NULL) {
|
||||
- free(temp_buf);
|
||||
- }
|
||||
+noip:
|
||||
+ if (!snmp_strcat(&temp_buf, &temp_buf_len, &temp_out_len, 1,
|
||||
+ (const u_char*)"<UNKNOWN>")) {
|
||||
+ SNMP_FREE(temp_buf);
|
||||
return 0;
|
||||
- }
|
||||
+ }
|
||||
}
|
||||
break;
|
||||
|
||||
- /*
|
||||
- * Write a host name.
|
||||
- */
|
||||
case CHR_PDU_NAME:
|
||||
/*
|
||||
- * Right, apparently a name lookup is wanted. This is only reasonable
|
||||
- * for the UDP and TCP transport domains (we don't want to try to be
|
||||
- * too clever here).
|
||||
+ * Try to convert the numerical transport information
|
||||
+ * into a hostname. Or rather, have the transport-specific
|
||||
+ * address formatting routine do this.
|
||||
+ * Otherwise falls back to the numeric address format.
|
||||
*/
|
||||
-#ifdef NETSNMP_TRANSPORT_TCP_DOMAIN
|
||||
- if (transport != NULL && (transport->domain == netsnmpUDPDomain ||
|
||||
- transport->domain ==
|
||||
- netsnmp_snmpTCPDomain)) {
|
||||
-#else
|
||||
- if (transport != NULL && transport->domain == netsnmpUDPDomain) {
|
||||
-#endif
|
||||
- /*
|
||||
- * This is kind of bletcherous -- it breaks the opacity of
|
||||
- * transport_data but never mind -- the alternative is a lot of
|
||||
- * munging strings from f_fmtaddr.
|
||||
- */
|
||||
-typedef struct netsnmp_udp_addr_pair_s { /* From snmpUDPDomain.c */
|
||||
- struct sockaddr_in remote_addr;
|
||||
- struct in_addr local_addr;
|
||||
-} netsnmp_udp_addr_pair;
|
||||
-
|
||||
- netsnmp_udp_addr_pair *addr =
|
||||
- (netsnmp_udp_addr_pair *) pdu->transport_data;
|
||||
- if (addr != NULL
|
||||
- && pdu->transport_data_length ==
|
||||
- sizeof(netsnmp_udp_addr_pair)) {
|
||||
- if (!netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID,
|
||||
- NETSNMP_DS_APP_NUMERIC_IP)) {
|
||||
- host =
|
||||
- gethostbyaddr((char *) &(addr->remote_addr.sin_addr),
|
||||
- sizeof(struct in_addr), AF_INET);
|
||||
- }
|
||||
- if (host != NULL) {
|
||||
- if (!snmp_strcat
|
||||
- (&temp_buf, &temp_buf_len, &temp_out_len, 1,
|
||||
- (u_char *)host->h_name)) {
|
||||
- if (temp_buf != NULL) {
|
||||
- free(temp_buf);
|
||||
- }
|
||||
- return 0;
|
||||
- }
|
||||
- } else {
|
||||
- if (!snmp_strcat
|
||||
- (&temp_buf, &temp_buf_len, &temp_out_len, 1,
|
||||
- (u_char *)inet_ntoa(addr->remote_addr.sin_addr))) {
|
||||
- if (temp_buf != NULL) {
|
||||
- free(temp_buf);
|
||||
- }
|
||||
- return 0;
|
||||
- }
|
||||
- }
|
||||
- } else {
|
||||
- if (!snmp_strcat
|
||||
- (&temp_buf, &temp_buf_len, &temp_out_len, 1,
|
||||
- (const u_char*)"<UNKNOWN>")) {
|
||||
- if (temp_buf != NULL) {
|
||||
- free(temp_buf);
|
||||
- }
|
||||
- return 0;
|
||||
- }
|
||||
- }
|
||||
- } else if (transport != NULL && transport->f_fmtaddr != NULL) {
|
||||
- /*
|
||||
- * Some other domain for which we do not know how to do a name
|
||||
- * lookup. Fall back to the formatted transport address.
|
||||
- */
|
||||
- char *tstr =
|
||||
- transport->f_fmtaddr(transport, pdu->transport_data,
|
||||
- pdu->transport_data_length);
|
||||
- if (!snmp_strcat
|
||||
- (&temp_buf, &temp_buf_len, &temp_out_len, 1, (u_char *)tstr)) {
|
||||
- if (tstr != NULL) {
|
||||
- free(tstr);
|
||||
- }
|
||||
- if (temp_buf != NULL) {
|
||||
- free(temp_buf);
|
||||
- }
|
||||
+ if (transport != NULL && transport->f_fmtaddr != NULL) {
|
||||
+ oflags = transport->flags;
|
||||
+ if (!netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID,
|
||||
+ NETSNMP_DS_APP_NUMERIC_IP))
|
||||
+ transport->flags |= NETSNMP_TRANSPORT_FLAG_HOSTNAME;
|
||||
+ tstr = transport->f_fmtaddr(transport, pdu->transport_data,
|
||||
+ pdu->transport_data_length);
|
||||
+ transport->flags = oflags;
|
||||
+
|
||||
+ if (!tstr) goto nohost;
|
||||
+ if (!snmp_strcat(&temp_buf, &temp_buf_len, &temp_out_len,
|
||||
+ 1, (u_char *)tstr)) {
|
||||
+ SNMP_FREE(temp_buf);
|
||||
+ SNMP_FREE(tstr);
|
||||
return 0;
|
||||
}
|
||||
- if (tstr != NULL) {
|
||||
- free(tstr);
|
||||
- }
|
||||
- } else {
|
||||
- /*
|
||||
- * We are kind of stuck!
|
||||
- */
|
||||
+ SNMP_FREE(tstr);
|
||||
+ } else {
|
||||
+nohost:
|
||||
if (!snmp_strcat(&temp_buf, &temp_buf_len, &temp_out_len, 1,
|
||||
(const u_char*)"<UNKNOWN>")) {
|
||||
- if (temp_buf != NULL) {
|
||||
- free(temp_buf);
|
||||
- }
|
||||
+ SNMP_FREE(temp_buf);
|
||||
return 0;
|
||||
}
|
||||
}
|
22
net-snmp-5.4.1-pie.patch
Normal file
22
net-snmp-5.4.1-pie.patch
Normal file
@ -0,0 +1,22 @@
|
||||
--- net-snmp-5.4.1/apps/Makefile.in.orig 2007-07-05 01:26:56.000000000 +0200
|
||||
+++ net-snmp-5.4.1/apps/Makefile.in 2007-08-07 11:05:41.000000000 +0200
|
||||
@@ -115,7 +115,7 @@ snmptest$(EXEEXT): snmptest.$(OSUFFIX
|
||||
$(LINK) ${CFLAGS} -o $@ snmptest.$(OSUFFIX) $(LOCAL_LIBS) ${LDFLAGS} ${LIBS}
|
||||
|
||||
snmptrapd$(EXEEXT): $(TRAPD_OBJECTS) $(USETRAPLIBS) $(INSTALLLIBS)
|
||||
- $(LINK) ${CFLAGS} -o $@ $(TRAPD_OBJECTS) $(INSTALLLIBS) $(LOCAL_LIBS) ${LDFLAGS} ${TRAPLIBS}
|
||||
+ $(LINK) ${CFLAGS} -o $@ -pie $(TRAPD_OBJECTS) $(INSTALLLIBS) $(LOCAL_LIBS) ${LDFLAGS} ${TRAPLIBS}
|
||||
|
||||
snmptrap$(EXEEXT): snmptrap.$(OSUFFIX) $(USELIBS)
|
||||
$(LINK) ${CFLAGS} -o $@ snmptrap.$(OSUFFIX) $(LOCAL_LIBS) ${LDFLAGS} ${LIBS}
|
||||
--- net-snmp-5.4.1/agent/Makefile.in.orig 2007-07-05 01:26:56.000000000 +0200
|
||||
+++ net-snmp-5.4.1/agent/Makefile.in 2007-08-07 11:05:19.000000000 +0200
|
||||
@@ -139,7 +139,7 @@ getmibstat.o: mibgroup/kernel_sunos5.c
|
||||
$(CC) $(CFLAGS) -o $@ -D_GETMIBSTAT_TEST -DDODEBUG -c $?
|
||||
|
||||
snmpd$(EXEEXT): ${LAGENTOBJS} $(USELIBS) $(AGENTLIB) $(HELPERLIB) $(MIBLIB) $(LIBTARG)
|
||||
- $(LINK) $(CFLAGS) -o $@ ${LAGENTOBJS} $(LOCAL_LIBS) ${LDFLAGS} ${OUR_AGENT_LIBS}
|
||||
+ $(LINK) $(CFLAGS) -o $@ -pie ${LAGENTOBJS} $(LOCAL_LIBS) ${LDFLAGS} ${OUR_AGENT_LIBS}
|
||||
|
||||
|
||||
libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION): ${LLIBAGENTOBJS} $(USELIBS)
|
@ -6,8 +6,9 @@
|
||||
return rc;
|
||||
- }
|
||||
+ }
|
||||
+
|
||||
|
||||
+
|
||||
-
|
||||
+ NETSNMP_STATIC_INLINE
|
||||
+ int CONTAINER_TRY_INSERT(netsnmp_container *x, const void *k)
|
||||
+ {
|
||||
+ const void *res = NULL;
|
||||
@ -66,13 +67,15 @@
|
||||
/*------------------------------------------------------------------
|
||||
* These functions should EXACTLY match the inline version in
|
||||
* container.h. If you change one, change them both.
|
||||
--- net-snmp-5.4/agent/mibgroup/ip-mib/data_access/ipaddress_ioctl.c.orig 2005-10-31 05:32:17.000000000 +0100
|
||||
+++ net-snmp-5.4/agent/mibgroup/ip-mib/data_access/ipaddress_ioctl.c 2007-05-04 12:03:17.000000000 +0200
|
||||
@@ -272,7 +272,15 @@
|
||||
--- net-snmp-5.4.1/agent/mibgroup/ip-mib/data_access/ipaddress_ioctl.c.orig 2007-05-17 23:53:28.000000000 +0200
|
||||
+++ net-snmp-5.4.1/agent/mibgroup/ip-mib/data_access/ipaddress_ioctl.c 2007-08-07 13:49:49.000000000 +0200
|
||||
@@ -272,11 +272,15 @@ _netsnmp_ioctl_ipaddress_container_load_
|
||||
/*
|
||||
* add entry to container
|
||||
*/
|
||||
- CONTAINER_INSERT(container, entry);
|
||||
- if (CONTAINER_INSERT(container, entry) < 0)
|
||||
- {
|
||||
- DEBUGMSGTL(("access:ipaddress:container","error with ipaddress_entry: insert into container failed.\n"));
|
||||
+ rc = CONTAINER_TRY_INSERT(container, entry);
|
||||
+ if (rc < 0) {
|
||||
+ static int logged = 0;
|
||||
@ -80,14 +83,15 @@
|
||||
+ snmp_log(LOG_NOTICE, "Duplicate IP address detected, some interfaces may not be visible in IP-MIB\n");
|
||||
+ logged = 1;
|
||||
+ }
|
||||
+ netsnmp_access_ipaddress_entry_free(entry);
|
||||
+ }
|
||||
+ rc = 0;
|
||||
netsnmp_access_ipaddress_entry_free(entry);
|
||||
- continue;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
--- net-snmp-5.4/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c.orig 2006-09-15 02:48:40.000000000 +0200
|
||||
+++ net-snmp-5.4/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c 2007-05-04 12:03:44.000000000 +0200
|
||||
@@ -324,7 +324,16 @@
|
||||
--- net-snmp-5.4.1/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c.orig 2006-09-15 02:48:50.000000000 +0200
|
||||
+++ net-snmp-5.4.1/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c 2007-08-07 13:47:55.000000000 +0200
|
||||
@@ -324,7 +324,16 @@ _load_v6(netsnmp_container *container, i
|
||||
/*
|
||||
* add entry to container
|
||||
*/
|
145
net-snmp-5.4.1-strange_libpath.patch
Normal file
145
net-snmp-5.4.1-strange_libpath.patch
Normal file
@ -0,0 +1,145 @@
|
||||
--- net-snmp-5.4.1/configure.mnttab.orig 2007-07-27 19:04:19.000000000 +0200
|
||||
+++ net-snmp-5.4.1/configure.mnttab 2007-08-07 13:32:45.000000000 +0200
|
||||
@@ -27930,7 +27930,7 @@ if test "${with_libwrap+set}" = set; the
|
||||
if test "$with_libwrap" != "no"; then
|
||||
if test "$with_libwrap" != "yes"; then
|
||||
CPPFLAGS="${CPPFLAGS} -I$with_libwrap/include"
|
||||
- LDFLAGS="${LDFLAGS} -L$with_libwrap/lib"
|
||||
+ LDFLAGS="${LDFLAGS} -L$with_libwrap"
|
||||
fi
|
||||
|
||||
_libs=${LIBS}
|
||||
@@ -28134,7 +28134,7 @@ echo "${ECHO_T}yes" >&6
|
||||
#define NETSNMP_USE_LIBWRAP 1
|
||||
_ACEOF
|
||||
|
||||
- test "$with_libwrap" != no -a "$with_libwrap" != yes && _wraplibs="-L$with_libwrap/lib"
|
||||
+ test "$with_libwrap" != no -a "$with_libwrap" != yes && _wraplibs="-L$with_libwrap"
|
||||
_wraplibs="$_wraplibs -lwrap"
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
@@ -28362,7 +28362,7 @@ echo "${ECHO_T}yes" >&6
|
||||
#define NETSNMP_USE_LIBWRAP 1
|
||||
_ACEOF
|
||||
|
||||
- test "$with_libwrap" != no -a "$with_libwrap" != yes && _wraplibs="-L$with_libwrap/lib"
|
||||
+ test "$with_libwrap" != no -a "$with_libwrap" != yes && _wraplibs="-L$with_libwrap"
|
||||
_wraplibs="$_wraplibs -lwrap -lnsl"
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
--- net-snmp-5.4.1/configure.libdir.orig 2007-08-07 13:31:31.000000000 +0200
|
||||
+++ net-snmp-5.4.1/configure.libdir 2007-08-07 13:32:05.000000000 +0200
|
||||
@@ -27922,7 +27922,7 @@ if test "${with_libwrap+set}" = set; the
|
||||
if test "$with_libwrap" != "no"; then
|
||||
if test "$with_libwrap" != "yes"; then
|
||||
CPPFLAGS="${CPPFLAGS} -I$with_libwrap/include"
|
||||
- LDFLAGS="${LDFLAGS} -L$with_libwrap/lib"
|
||||
+ LDFLAGS="${LDFLAGS} -L$with_libwrap"
|
||||
fi
|
||||
|
||||
_libs=${LIBS}
|
||||
@@ -28126,7 +28126,7 @@ echo "${ECHO_T}yes" >&6
|
||||
#define NETSNMP_USE_LIBWRAP 1
|
||||
_ACEOF
|
||||
|
||||
- test "$with_libwrap" != no -a "$with_libwrap" != yes && _wraplibs="-L$with_libwrap/lib"
|
||||
+ test "$with_libwrap" != no -a "$with_libwrap" != yes && _wraplibs="-L$with_libwrap"
|
||||
_wraplibs="$_wraplibs -lwrap"
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
@@ -28354,7 +28354,7 @@ echo "${ECHO_T}yes" >&6
|
||||
#define NETSNMP_USE_LIBWRAP 1
|
||||
_ACEOF
|
||||
|
||||
- test "$with_libwrap" != no -a "$with_libwrap" != yes && _wraplibs="-L$with_libwrap/lib"
|
||||
+ test "$with_libwrap" != no -a "$with_libwrap" != yes && _wraplibs="-L$with_libwrap"
|
||||
_wraplibs="$_wraplibs -lwrap -lnsl"
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
--- net-snmp-5.4.1/configure.orig 2007-08-07 13:31:31.000000000 +0200
|
||||
+++ net-snmp-5.4.1/configure 2007-08-07 13:33:29.000000000 +0200
|
||||
@@ -27922,7 +27922,7 @@ if test "${with_libwrap+set}" = set; the
|
||||
if test "$with_libwrap" != "no"; then
|
||||
if test "$with_libwrap" != "yes"; then
|
||||
CPPFLAGS="${CPPFLAGS} -I$with_libwrap/include"
|
||||
- LDFLAGS="${LDFLAGS} -L$with_libwrap/lib"
|
||||
+ LDFLAGS="${LDFLAGS} -L$with_libwrap"
|
||||
fi
|
||||
|
||||
_libs=${LIBS}
|
||||
@@ -28126,7 +28126,7 @@ echo "${ECHO_T}yes" >&6
|
||||
#define NETSNMP_USE_LIBWRAP 1
|
||||
_ACEOF
|
||||
|
||||
- test "$with_libwrap" != no -a "$with_libwrap" != yes && _wraplibs="-L$with_libwrap/lib"
|
||||
+ test "$with_libwrap" != no -a "$with_libwrap" != yes && _wraplibs="-L$with_libwrap"
|
||||
_wraplibs="$_wraplibs -lwrap"
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
@@ -28354,7 +28354,7 @@ echo "${ECHO_T}yes" >&6
|
||||
#define NETSNMP_USE_LIBWRAP 1
|
||||
_ACEOF
|
||||
|
||||
- test "$with_libwrap" != no -a "$with_libwrap" != yes && _wraplibs="-L$with_libwrap/lib"
|
||||
+ test "$with_libwrap" != no -a "$with_libwrap" != yes && _wraplibs="-L$with_libwrap"
|
||||
_wraplibs="$_wraplibs -lwrap -lnsl"
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
--- net-snmp-5.4.1/configure.in.orig 2007-07-27 19:02:00.000000000 +0200
|
||||
+++ net-snmp-5.4.1/configure.in 2007-08-07 13:33:55.000000000 +0200
|
||||
@@ -2714,7 +2714,7 @@ AC_ARG_WITH(libwrap,
|
||||
if test "$with_libwrap" != "no"; then
|
||||
if test "$with_libwrap" != "yes"; then
|
||||
CPPFLAGS="${CPPFLAGS} -I$with_libwrap/include"
|
||||
- LDFLAGS="${LDFLAGS} -L$with_libwrap/lib"
|
||||
+ LDFLAGS="${LDFLAGS} -L$with_libwrap"
|
||||
fi
|
||||
|
||||
_libs=${LIBS}
|
||||
@@ -2732,7 +2732,7 @@ AC_ARG_WITH(libwrap,
|
||||
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE(NETSNMP_USE_LIBWRAP)
|
||||
- test "$with_libwrap" != no -a "$with_libwrap" != yes && _wraplibs="-L$with_libwrap/lib"
|
||||
+ test "$with_libwrap" != no -a "$with_libwrap" != yes && _wraplibs="-L$with_libwrap"
|
||||
_wraplibs="$_wraplibs -lwrap"],
|
||||
[
|
||||
AC_MSG_RESULT([no])
|
||||
@@ -2748,7 +2748,7 @@ AC_ARG_WITH(libwrap,
|
||||
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(NETSNMP_USE_LIBWRAP)
|
||||
- test "$with_libwrap" != no -a "$with_libwrap" != yes && _wraplibs="-L$with_libwrap/lib"
|
||||
+ test "$with_libwrap" != no -a "$with_libwrap" != yes && _wraplibs="-L$with_libwrap"
|
||||
_wraplibs="$_wraplibs -lwrap -lnsl",
|
||||
|
||||
AC_MSG_RESULT(no)
|
||||
--- net-snmp-5.4.1/configure.libpath.orig 2007-08-07 13:31:31.000000000 +0200
|
||||
+++ net-snmp-5.4.1/configure.libpath 2007-08-07 13:34:52.000000000 +0200
|
||||
@@ -27922,7 +27922,7 @@ if test "${with_libwrap+set}" = set; the
|
||||
if test "$with_libwrap" != "no"; then
|
||||
if test "$with_libwrap" != "yes"; then
|
||||
CPPFLAGS="${CPPFLAGS} -I$with_libwrap/include"
|
||||
- LDFLAGS="${LDFLAGS} -L$with_libwrap/lib"
|
||||
+ LDFLAGS="${LDFLAGS} -L$with_libwrap"
|
||||
fi
|
||||
|
||||
_libs=${LIBS}
|
||||
@@ -28126,7 +28126,7 @@ echo "${ECHO_T}yes" >&6
|
||||
#define NETSNMP_USE_LIBWRAP 1
|
||||
_ACEOF
|
||||
|
||||
- test "$with_libwrap" != no -a "$with_libwrap" != yes && _wraplibs="-L$with_libwrap/lib"
|
||||
+ test "$with_libwrap" != no -a "$with_libwrap" != yes && _wraplibs="-L$with_libwrap"
|
||||
_wraplibs="$_wraplibs -lwrap"
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
@@ -28354,7 +28354,7 @@ echo "${ECHO_T}yes" >&6
|
||||
#define NETSNMP_USE_LIBWRAP 1
|
||||
_ACEOF
|
||||
|
||||
- test "$with_libwrap" != no -a "$with_libwrap" != yes && _wraplibs="-L$with_libwrap/lib"
|
||||
+ test "$with_libwrap" != no -a "$with_libwrap" != yes && _wraplibs="-L$with_libwrap"
|
||||
_wraplibs="$_wraplibs -lwrap -lnsl"
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
@ -2,15 +2,15 @@
|
||||
|
||||
# Arches on which we need to prevent arch conflicts on net-snmp-config.h
|
||||
%define multilib_arches %{ix86} ia64 ppc ppc64 s390 s390x x86_64
|
||||
%define major_ver 5.4
|
||||
%define major_ver 5.4.1
|
||||
|
||||
Summary: A collection of SNMP protocol tools and libraries
|
||||
Name: net-snmp
|
||||
Version: %{major_ver}
|
||||
Release: 16%{?dist}
|
||||
Release: 1%{?dist}
|
||||
Epoch: 1
|
||||
|
||||
License: BSDish
|
||||
License: MIT
|
||||
Group: System Environment/Daemons
|
||||
URL: http://net-snmp.sourceforge.net/
|
||||
Source0: http://dl.sourceforge.net/net-snmp/net-snmp-%{major_ver}.tar.gz
|
||||
@ -23,29 +23,20 @@ Source6: net-snmp-config.h
|
||||
Source7: net-snmp-config
|
||||
Source8: net-snmp-trapd.redhat.conf
|
||||
Patch1: ucd-snmp-4.2.4.pre3-mnttab.patch
|
||||
#Patch2: net-snmp-5.0.6-libtool.patch
|
||||
Patch2: net-snmp-5.0.8-ipv6-sock-close.patch
|
||||
Patch3: net-snmp-5.0.8-readonly.patch
|
||||
Patch4: net-snmp-5.1.1-pie.patch
|
||||
Patch4: net-snmp-5.4.1-pie.patch
|
||||
Patch5: net-snmp-5.4-64bit.patch
|
||||
Patch6: net-snmp-5.1.2-dir-fix.patch
|
||||
Patch7: net-snmp-5.2.1-file_offset.patch
|
||||
Patch8: net-snmp-5.3.1-multilib.patch
|
||||
Patch9: net-snmp-5.4-config_libdir.patch
|
||||
#Patch10: net-snmp-5.4-if_addr.patch
|
||||
Patch11: net-snmp-5.4-ip-addr-route-leaks.patch
|
||||
Patch12: net-snmp-5.4-tcpConn-tcp6-fopen.patch
|
||||
Patch13: net-snmp-5.4-ethtool-config.patch
|
||||
Patch14: net-snmp-5.4-free.patch
|
||||
Patch15: net-snmp-5.4-strange_libpath.patch
|
||||
Patch16: net-snmp-5.4-snmpassert.patch
|
||||
Patch17: net-snmp-5.4-hostname.patch
|
||||
Patch18: net-snmp-5.4-udp-endpoint.patch
|
||||
Patch19: net-snmp-5.3.1-shared-ip.patch
|
||||
Patch20: net-snmp-5.3.1-mib-option.patch
|
||||
Patch21: net-snmp-5.4-exec-crash.patch
|
||||
Patch22: net-snmp-5.1.2-snmpconf-selinux.patch
|
||||
Patch23: net-snmp-5.4-transport-leak.patch
|
||||
Patch9: net-snmp-5.4.1-config_libdir.patch
|
||||
#Patch10: net-snmp-5.4.1-ethtool-config.patch
|
||||
Patch11: net-snmp-5.4.1-strange_libpath.patch
|
||||
Patch12: net-snmp-5.4.1-hostname.patch
|
||||
Patch13: net-snmp-5.4.1-shared-ip.patch
|
||||
Patch14: net-snmp-5.4-exec-crash.patch
|
||||
Patch15: net-snmp-5.1.2-snmpconf-selinux.patch
|
||||
|
||||
Requires(pre): /sbin/chkconfig
|
||||
Requires(post): /sbin/chkconfig
|
||||
@ -152,24 +143,12 @@ and applications.
|
||||
%patch7 -p1 -b .file_offset
|
||||
%patch8 -p1 -b .multilib
|
||||
%patch9 -p1 -b .libdir
|
||||
#%patch10 -p1 -b .if_addr
|
||||
|
||||
#in net-snmp 5.4.1
|
||||
%patch11 -p0 -b .route-leak
|
||||
%patch12 -p1 -b .tcp6-fopen
|
||||
|
||||
%patch13 -p1 -b .ethtool-config
|
||||
%patch14 -p1 -b .free
|
||||
%patch15 -p1 -b .strange_libpath
|
||||
%patch16 -p1 -b .verboselog
|
||||
|
||||
%patch17 -p1 -b .hostname
|
||||
%patch18 -p1 -b .udp-endpoint
|
||||
%patch19 -p1 -b .shared-ip
|
||||
%patch20 -p1 -b .mib-option
|
||||
%patch21 -p1 -b .exec-crash
|
||||
%patch22 -p1 -b .selinux
|
||||
%patch23 -p0 -b .transport-leak
|
||||
#%patch10 -p1 -b .ethtool
|
||||
%patch11 -p1 -b .libpath
|
||||
%patch12 -p1 -b .hostname
|
||||
%patch13 -p1 -b .shared-ip
|
||||
%patch14 -p1 -b .exec
|
||||
%patch15 -p1 -b .selinux
|
||||
|
||||
# Do this patch with a perl hack...
|
||||
perl -pi -e "s|'\\\$install_libdir'|'%{_libdir}'|" ltmain.sh
|
||||
@ -376,6 +355,10 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||
%{_libdir}/lib*.so.*
|
||||
|
||||
%changelog
|
||||
* Tue Aug 7 2007 Safranek <jsafranek@redhat.com> 5.4.1-1
|
||||
- Lincense: field changed to MIT
|
||||
- 5.4.1 integrated
|
||||
|
||||
* Mon Jul 31 2007 Safranek <jsafranek@redhat.com> 5.4-16
|
||||
- supported lm_sensors on ppc64 (#249255)
|
||||
- snmpconf generates config files with proper selinux context
|
||||
|
Loading…
Reference in New Issue
Block a user