[Pkg-nagios-changes] [pkg-nagios] r1311 - in nagios-plugins/trunk/debian: . patches
Jan Wagner
waja-guest at alioth.debian.org
Fri Jan 25 22:37:40 UTC 2008
Author: waja-guest
Date: 2008-01-25 22:37:40 +0000 (Fri, 25 Jan 2008)
New Revision: 1311
Added:
nagios-plugins/trunk/debian/patches/29_check_ntp_fixsefault_deprecate.dpatch
Modified:
nagios-plugins/trunk/debian/changelog
nagios-plugins/trunk/debian/patches/00list
Log:
include segfault fix
Modified: nagios-plugins/trunk/debian/changelog
===================================================================
--- nagios-plugins/trunk/debian/changelog 2008-01-25 11:25:13 UTC (rev 1310)
+++ nagios-plugins/trunk/debian/changelog 2008-01-25 22:37:40 UTC (rev 1311)
@@ -8,6 +8,8 @@
* add typo fix for check_mailq into 50_misc_typos.dpatch (closes: #435525).
* add 28_check_pgsql_include_for_8.3.dpatch to get check_pgsql working
together with libpq-dev (closes: #462509).
+ * add 29_check_ntp_fixsefault_deprecate.dpatch to fix segfaults for
+ check_ntp and check_ntp_time
-- Sean Finney <seanius at debian.org> Fri, 07 Dec 2007 01:01:17 +0100
Modified: nagios-plugins/trunk/debian/patches/00list
===================================================================
--- nagios-plugins/trunk/debian/patches/00list 2008-01-25 11:25:13 UTC (rev 1310)
+++ nagios-plugins/trunk/debian/patches/00list 2008-01-25 22:37:40 UTC (rev 1311)
@@ -6,4 +6,5 @@
26_implicit-basename.dpatch
27_check_radius_segfault.dpatch
28_check_pgsql_include_for_8.3.dpatch
+29_check_ntp_fixsefault_deprecate.dpatch
50_misc_typos.dpatch
Added: nagios-plugins/trunk/debian/patches/29_check_ntp_fixsefault_deprecate.dpatch
===================================================================
--- nagios-plugins/trunk/debian/patches/29_check_ntp_fixsefault_deprecate.dpatch (rev 0)
+++ nagios-plugins/trunk/debian/patches/29_check_ntp_fixsefault_deprecate.dpatch 2008-01-25 22:37:40 UTC (rev 1311)
@@ -0,0 +1,81 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 29_check_ntp_fixsefault_deprecate.dpatch by Thomas Guyot-Sionnest <dermoth at aei.ca>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix check_ntp_time and check_ntp segfault, add deprecate hints
+
+ at DPATCH@
+--- nagios-plugins-1.4.11/plugins/check_ntp_time.c 2007/12/11 05:57:35 1861
++++ nagios-plugins-1.4.11/plugins/check_ntp_time.c 2008/01/05 14:09:29 1887
+@@ -274,7 +274,7 @@
+ /* if we haven't reached the current list's end, move everyone
+ * over one to the right, and insert the new candidate */
+ if(i<csize){
+- for(j=5; j>i; j--){
++ for(j=4; j>i; j--){
+ candidates[j]=candidates[j-1];
+ }
+ }
+@@ -337,6 +337,7 @@
+ servers=(ntp_server_results*)malloc(sizeof(ntp_server_results)*num_hosts);
+ if(servers==NULL) die(STATE_UNKNOWN, "can not allocate server array");
+ memset(servers, 0, sizeof(ntp_server_results)*num_hosts);
++ DBG(printf("Found %d peers to check\n", num_hosts));
+
+ /* setup each socket for writing, and the corresponding struct pollfd */
+ ai_tmp=ai;
+--- nagios-plugins-1.4.11/plugins/check_ntp.c 2007/12/11 05:57:35 1861
++++ nagios-plugins-1.4.11/plugins/check_ntp.c 2008/01/05 14:09:29 1887
+@@ -329,7 +329,7 @@
+ /* if we haven't reached the current list's end, move everyone
+ * over one to the right, and insert the new candidate */
+ if(i<csize){
+- for(j=5; j>i; j--){
++ for(j=4; j>i; j--){
+ candidates[j]=candidates[j-1];
+ }
+ }
+@@ -392,6 +392,7 @@
+ servers=(ntp_server_results*)malloc(sizeof(ntp_server_results)*num_hosts);
+ if(servers==NULL) die(STATE_UNKNOWN, "can not allocate server array");
+ memset(servers, 0, sizeof(ntp_server_results)*num_hosts);
++ DBG(printf("Found %d peers to check\n", num_hosts));
+
+ /* setup each socket for writing, and the corresponding struct pollfd */
+ ai_tmp=ai;
+@@ -837,11 +838,11 @@
+
+ printf ("Copyright (c) 2006 Sean Finney\n");
+ printf (COPYRIGHT, copyright, email);
+-
+- printf ("%s\n", _("This plugin checks the selected ntp server"));
+
+- printf ("\n\n");
+-
++ printf ("%s\n", _("This plugin checks the selected ntp server"));
++
++ printf ("\n\n");
++
+ print_usage();
+ printf (_(UT_HELP_VRSN));
+ printf (_(UT_HOST_PORT), 'p', "123");
+@@ -871,11 +872,17 @@
+ printf(" %s\n", ("./check_ntp -H ntpserv -w 0.5 -c 1 -j -1:100 -k -1:200"));
+
+ printf (_(UT_SUPPORT));
++
++ printf("\n");
++ printf ("%s\n", _("WARNING: check_ntp is deprecated. Please use check_ntp_peer or"));
++ printf ("%s\n\n", _("check_ntp_time istead."));
+ }
+
+ void
+ print_usage(void)
+ {
+- printf (_("Usage:"));
+- printf(" %s -H <host> [-w <warn>] [-c <crit>] [-j <warn>] [-k <crit>] [-v verbose]\n", progname);
++ printf ("%s\n", _("WARNING: check_ntp is deprecated. Please use check_ntp_peer or"));
++ printf ("%s\n\n", _("check_ntp_time istead."));
++ printf (_("Usage:"));
++ printf(" %s -H <host> [-w <warn>] [-c <crit>] [-j <warn>] [-k <crit>] [-v verbose]\n", progname);
+ }
More information about the Pkg-nagios-changes
mailing list