diff --git a/net-snmp-5.5-mktemp-size.patch b/net-snmp-5.5-mktemp-size.patch new file mode 100644 index 0000000..e55b57a --- /dev/null +++ b/net-snmp-5.5-mktemp-size.patch @@ -0,0 +1,32 @@ +616347 - snmptrapd dies when starting external script + +Source: upstream, SVN rev. 19231 + +Index: net-snmp/snmplib/system.c +=================================================================== +--- net-snmp/snmplib/system.c (revision 19230) ++++ net-snmp/snmplib/system.c (revision 19231) +@@ -158,6 +158,10 @@ + #include + #endif + ++#if HAVE_LIMITS_H ++#include ++#endif ++ + #include + #include + #include +@@ -1027,7 +1031,11 @@ + const char * + netsnmp_mktemp(void) + { +- static char name[32]; ++#ifdef PATH_MAX ++ static char name[PATH_MAX]; ++#else ++ static char name[256]; ++#endif + int fd = -1; + + strcpy(name, get_temp_file_pattern()); diff --git a/net-snmp.spec b/net-snmp.spec index 7cb84a0..d215ca8 100644 --- a/net-snmp.spec +++ b/net-snmp.spec @@ -11,7 +11,7 @@ Summary: A collection of SNMP protocol tools and libraries Name: net-snmp Version: 5.5 -Release: 16%{?dist} +Release: 17%{?dist} Epoch: 1 License: BSD @@ -35,6 +35,7 @@ Patch6: net-snmp-5.5-missing-bcast.patch Patch7: net-snmp-5.5-tcp-pid.patch Patch8: net-snmp-5.5-test-tmpdir.patch Patch9: net-snmp-5.5-include-struct.patch +Patch10: net-snmp-5.5-mktemp-size.patch Requires(post): chkconfig Requires(preun): chkconfig @@ -168,6 +169,7 @@ Net-SNMP toolkit library. # no backup of this one, it would break tests! %patch8 -p1 %patch9 -p1 -b .include-struct +%patch10 -p1 -b .mktemp-size %build MIBS="host agentx smux \ @@ -416,6 +418,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_datadir}/snmp/mibs/* %changelog +* Tue Jul 20 2010 Jan Safranek - 1:5.5-17 +- fixed temporary filename generation in snmptrapd (#616347) + * Mon Jun 28 2010 Jan Safranek - 1:5.5-16 - rebuild for new perl