[Pkg-net-snmp-commits] r196 - branches/net-snmp54-dev/debian/patches trunk/debian/patches

jochen at alioth.debian.org jochen at alioth.debian.org
Thu Aug 2 12:29:00 UTC 2007


Author: jochen
Date: 2007-08-02 12:29:00 +0000 (Thu, 02 Aug 2007)
New Revision: 196

Added:
   branches/net-snmp54-dev/debian/patches/41_snmptrapd_close_handles.README
   branches/net-snmp54-dev/debian/patches/41_snmptrapd_close_handles.patch
   trunk/debian/patches/41_snmptrapd_close_handles.README
   trunk/debian/patches/41_snmptrapd_close_handles.patch
Log:
Add patch to snmptrapd to make it close its file handles. (Merge R193)


Copied: branches/net-snmp54-dev/debian/patches/41_snmptrapd_close_handles.README (from rev 193, branches/net-snmp53/debian/patches/41_snmptrapd_close_handles.README)
===================================================================
--- branches/net-snmp54-dev/debian/patches/41_snmptrapd_close_handles.README	                        (rev 0)
+++ branches/net-snmp54-dev/debian/patches/41_snmptrapd_close_handles.README	2007-08-02 12:29:00 UTC (rev 196)
@@ -0,0 +1 @@
+Close all non standard file handles in snmptrapd.c (copied from snmpd.c)

Copied: branches/net-snmp54-dev/debian/patches/41_snmptrapd_close_handles.patch (from rev 193, branches/net-snmp53/debian/patches/41_snmptrapd_close_handles.patch)
===================================================================
--- branches/net-snmp54-dev/debian/patches/41_snmptrapd_close_handles.patch	                        (rev 0)
+++ branches/net-snmp54-dev/debian/patches/41_snmptrapd_close_handles.patch	2007-08-02 12:29:00 UTC (rev 196)
@@ -0,0 +1,19 @@
+--- net-snmp-5.3.1/apps/snmptrapd.c.orig	2007-07-06 17:02:00.000000000 +0200
++++ net-snmp-5.3.1/apps/snmptrapd.c	2007-07-31 16:45:38.000000000 +0200
+@@ -596,6 +596,16 @@
+ #endif
+     netsnmp_trapd_handler *traph;
+ 
++#ifndef WIN32
++    /*
++     * close all non-standard file descriptors we may have
++     * inherited from the shell.
++     */
++    for (i = getdtablesize() - 1; i > 2; --i) {
++	(void) close(i);
++    }
++#endif /* #WIN32 */
++
+ #ifdef SIGTERM
+     signal(SIGTERM, term_handler);
+ #endif

Copied: trunk/debian/patches/41_snmptrapd_close_handles.README (from rev 193, branches/net-snmp53/debian/patches/41_snmptrapd_close_handles.README)
===================================================================
--- trunk/debian/patches/41_snmptrapd_close_handles.README	                        (rev 0)
+++ trunk/debian/patches/41_snmptrapd_close_handles.README	2007-08-02 12:29:00 UTC (rev 196)
@@ -0,0 +1 @@
+Close all non standard file handles in snmptrapd.c (copied from snmpd.c)

Copied: trunk/debian/patches/41_snmptrapd_close_handles.patch (from rev 193, branches/net-snmp53/debian/patches/41_snmptrapd_close_handles.patch)
===================================================================
--- trunk/debian/patches/41_snmptrapd_close_handles.patch	                        (rev 0)
+++ trunk/debian/patches/41_snmptrapd_close_handles.patch	2007-08-02 12:29:00 UTC (rev 196)
@@ -0,0 +1,19 @@
+--- net-snmp-5.3.1/apps/snmptrapd.c.orig	2007-07-06 17:02:00.000000000 +0200
++++ net-snmp-5.3.1/apps/snmptrapd.c	2007-07-31 16:45:38.000000000 +0200
+@@ -596,6 +596,16 @@
+ #endif
+     netsnmp_trapd_handler *traph;
+ 
++#ifndef WIN32
++    /*
++     * close all non-standard file descriptors we may have
++     * inherited from the shell.
++     */
++    for (i = getdtablesize() - 1; i > 2; --i) {
++	(void) close(i);
++    }
++#endif /* #WIN32 */
++
+ #ifdef SIGTERM
+     signal(SIGTERM, term_handler);
+ #endif




More information about the Pkg-net-snmp-commits mailing list