From c2a658425f49e315f6c0c07965fbf966adc70124 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C5=A0afr=C3=A1nek?= Date: Thu, 28 Jun 2007 08:56:14 +0000 Subject: [PATCH] fix crash when multiple exec statements have the same name Resolves: #243536 --- net-snmp-5.4-exec-crash.patch | 12 ++++++++++++ net-snmp.redhat.conf | 2 +- net-snmp.spec | 8 ++++++-- 3 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 net-snmp-5.4-exec-crash.patch diff --git a/net-snmp-5.4-exec-crash.patch b/net-snmp-5.4-exec-crash.patch new file mode 100644 index 0000000..22bb399 --- /dev/null +++ b/net-snmp-5.4-exec-crash.patch @@ -0,0 +1,12 @@ +--- net-snmp-5.4/agent/mibgroup/agent/extend.c.orig 2006-10-18 21:07:35.000000000 +0200 ++++ net-snmp-5.4/agent/mibgroup/agent/extend.c 2007-06-27 14:30:08.000000000 +0200 +@@ -448,6 +448,9 @@ + extension->command = strdup( exec_command ); + if (cptr) + extension->args = strdup( cptr ); ++ } else { ++ snmp_log(LOG_ERR, "Duplicate MIBOID '%s' detected in exec statement, only the first one will be used.\n", exec_name); ++ return; + } + + #ifndef USING_UCD_SNMP_EXTENSIBLE_MODULE diff --git a/net-snmp.redhat.conf b/net-snmp.redhat.conf index 51dce4e..c6a2083 100644 --- a/net-snmp.redhat.conf +++ b/net-snmp.redhat.conf @@ -253,7 +253,7 @@ syscontact Root (configure /etc/snmp/snmp.local.conf) # # exec NAME PROGRAM [ARGS ...] # -# NAME: A generic name. +# NAME: A generic name. The name must be unique for each exec statement. # PROGRAM: The program to run. Include the path! # ARGS: optional arguments to be passed to the program diff --git a/net-snmp.spec b/net-snmp.spec index d097b06..ba8f819 100644 --- a/net-snmp.spec +++ b/net-snmp.spec @@ -7,7 +7,7 @@ Summary: A collection of SNMP protocol tools and libraries Name: net-snmp Version: %{major_ver} -Release: 13%{?dist} +Release: 14%{?dist} Epoch: 1 License: BSDish @@ -43,6 +43,7 @@ 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 Requires(pre): /sbin/chkconfig Requires(post): /sbin/chkconfig @@ -164,6 +165,7 @@ and applications. %patch18 -p1 -b .udp-endpoint %patch19 -p1 -b .shared-ip %patch20 -p1 -b .mib-option +%patch21 -p1 -b .exec-crash # Do this patch with a perl hack... perl -pi -e "s|'\\\$install_libdir'|'%{_libdir}'|" ltmain.sh @@ -370,11 +372,13 @@ rm -rf ${RPM_BUILD_ROOT} %{_libdir}/lib*.so.* %changelog -* Thu May 3 2007 Jan Safranek +* Thu May 3 2007 Jan Safranek 5.4-14 - fix snmptrapd hostname logging (#238587) - fix udpEndpointProcess remote IP address (#236551) - fix -M option of net-snmp-utils (#244784) - default snmptrapd.conf added (#243536) +- fix crash when multiple exec statements have the same name + (#243536) * Mon Mar 12 2007 Radek Vokál - 1:5.4-13 - fix overly verbose log message (#221911)