new upstream release
This commit is contained in:
		
							parent
							
								
									45f4cff944
								
							
						
					
					
						commit
						80699c70d0
					
				
					 21 changed files with 21 additions and 1028 deletions
				
			
		
							
								
								
									
										26
									
								
								debian/changelog
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										26
									
								
								debian/changelog
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -1,12 +1,28 @@
 | 
			
		|||
nagios-plugins (1.4.14-6) UNRELEASED; urgency=low
 | 
			
		||||
nagios-plugins (1.4.15-1) UNRELEASED; urgency=low
 | 
			
		||||
 | 
			
		||||
  * New upstream release (Closes: #588273)
 | 
			
		||||
  * Droped the following upstream integrated patches
 | 
			
		||||
     - 03_check_smtp_help.dpatch
 | 
			
		||||
     - 06_checkircd.dpatch
 | 
			
		||||
     - 18_check_game_cmdline.dpatch
 | 
			
		||||
     - 22_check_smb_hostaddress.dpatch
 | 
			
		||||
     - 32_check_ldap_pointer.dpatch
 | 
			
		||||
     - 33_fix_emb_check_disk_smb.dpatch
 | 
			
		||||
     - 34_fix_smbclient_check_disk_smb.dpatch
 | 
			
		||||
     - 35_check_http_date.dpatch
 | 
			
		||||
     - 36_check_ldap_empty_base.dpatch
 | 
			
		||||
     - 37_check_radius_nas-ip-address.dpatch
 | 
			
		||||
     - 39_check_ircd_fix_epn.dpatch
 | 
			
		||||
     - 40_check_http_proxy_auth.dpatch
 | 
			
		||||
     - 41_check_ping_detect_args.dpatch
 | 
			
		||||
     - 42_check_linux_raid_fix_r10.dpatch
 | 
			
		||||
     - 42_check_linux_raid_fix_rebuild.dpatch
 | 
			
		||||
     - 43_check_http_large_pages_mleak.dpatch
 | 
			
		||||
     - 44_check_snmp_perfdata.dpatch
 | 
			
		||||
     - 45_check_http_sni_optional.dpatch
 | 
			
		||||
  * Rename 13_subst.in_again.dpatch to 01_subst.in.dpatch
 | 
			
		||||
  * Add missing 42_check_linux_raid_fix_rebuild.dpatch to patch list
 | 
			
		||||
  * Fix ssh_disk and make ssh_disk* better readable, thanks
 | 
			
		||||
    Paul Slootman (Closes: #582272)
 | 
			
		||||
  * Add 46_check_disk_fix_help.dpatch, since --help seems to imply the
 | 
			
		||||
    possibility to suffix unit values to warn/crit parameters, thanks
 | 
			
		||||
    Justin T Pryzby for reporting (Closes: #588273)
 | 
			
		||||
 | 
			
		||||
 -- Jan Wagner <waja@cyconet.org>  Sat, 08 May 2010 22:22:24 +0200
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										19
									
								
								debian/patches/00list
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										19
									
								
								debian/patches/00list
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -1,22 +1,3 @@
 | 
			
		|||
01_subst.in.dpatch
 | 
			
		||||
02_check_icmp_links.dpatch
 | 
			
		||||
# commited upstream
 | 
			
		||||
03_check_smtp_help.dpatch
 | 
			
		||||
06_checkircd.dpatch
 | 
			
		||||
18_check_game_cmdline.dpatch
 | 
			
		||||
22_check_smb_hostaddress.dpatch
 | 
			
		||||
32_check_ldap_pointer.dpatch
 | 
			
		||||
33_fix_emb_check_disk_smb.dpatch
 | 
			
		||||
34_fix_smbclient_check_disk_smb.dpatch
 | 
			
		||||
35_check_http_date.dpatch
 | 
			
		||||
36_check_ldap_empty_base.dpatch
 | 
			
		||||
37_check_radius_nas-ip-address.dpatch
 | 
			
		||||
39_check_ircd_fix_epn.dpatch
 | 
			
		||||
40_check_http_proxy_auth.dpatch
 | 
			
		||||
41_check_ping_detect_args.dpatch
 | 
			
		||||
42_check_linux_raid_fix_r10.dpatch
 | 
			
		||||
42_check_linux_raid_fix_rebuild.dpatch
 | 
			
		||||
43_check_http_large_pages_mleak.dpatch
 | 
			
		||||
44_check_snmp_perfdata.dpatch
 | 
			
		||||
45_check_http_sni_optional.dpatch
 | 
			
		||||
46_check_disk_fix_help.dpatch
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										30
									
								
								debian/patches/03_check_smtp_help.dpatch
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										30
									
								
								debian/patches/03_check_smtp_help.dpatch
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -1,30 +0,0 @@
 | 
			
		|||
#! /bin/sh /usr/share/dpatch/dpatch-run
 | 
			
		||||
## 01_check_smtp_help.dpatch by Jan Wagner <waja@cyconet.org>
 | 
			
		||||
##
 | 
			
		||||
## DP: Add -F to help output (bugs.debian.org/578333)
 | 
			
		||||
## DP: Upstream bug is: https://sourceforge.net/tracker/?func=detail&aid=2989193&group_id=29880&atid=397597
 | 
			
		||||
 | 
			
		||||
@DPATCH@
 | 
			
		||||
diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' nagios-plugins-1.4.14~/plugins/check_smtp.c nagios-plugins-1.4.14/plugins/check_smtp.c
 | 
			
		||||
--- nagios-plugins-1.4.14~/plugins/check_smtp.c	2009-06-06 09:04:49.000000000 +0200
 | 
			
		||||
+++ nagios-plugins-1.4.14/plugins/check_smtp.c	2010-04-19 10:54:02.000000000 +0200
 | 
			
		||||
@@ -782,6 +782,8 @@
 | 
			
		||||
   printf ("    %s\n", _("Expected response to command (may be used repeatedly)"));
 | 
			
		||||
   printf (" %s\n", "-f, --from=STRING");
 | 
			
		||||
   printf ("    %s\n", _("FROM-address to include in MAIL command, required by Exchange 2000")),
 | 
			
		||||
+  printf (" %s\n", "-F, --fqdn=STRING");
 | 
			
		||||
+  printf ("    %s\n", _("FQDN used for HELO"));
 | 
			
		||||
 #ifdef HAVE_SSL
 | 
			
		||||
   printf (" %s\n", "-D, --certificate=INTEGER");
 | 
			
		||||
   printf ("    %s\n", _("Minimum number of days a certificate has to be valid."));
 | 
			
		||||
@@ -823,8 +825,8 @@
 | 
			
		||||
 print_usage (void)
 | 
			
		||||
 {
 | 
			
		||||
   printf (_("Usage:"));
 | 
			
		||||
-	printf ("%s -H host [-p port] [-e expect] [-C command] [-f from addr]", progname);
 | 
			
		||||
+  printf ("%s -H host [-p port] [-e expect] [-C command] [-f from addr]\n", progname);
 | 
			
		||||
   printf ("[-A authtype -U authuser -P authpass] [-w warn] [-c crit] [-t timeout]\n");
 | 
			
		||||
-  printf ("[-S] [-D days] [-v] [-4|-6]\n");
 | 
			
		||||
+  printf ("[-F fqdn] [-S] [-D days] [-v] [-4|-6]\n");
 | 
			
		||||
 }
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										88
									
								
								debian/patches/06_checkircd.dpatch
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										88
									
								
								debian/patches/06_checkircd.dpatch
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -1,88 +0,0 @@
 | 
			
		|||
#! /bin/sh -e
 | 
			
		||||
## 06_checkircd.dpatch 
 | 
			
		||||
## From: Thomas Guyot-Sionnest <dermoth@aei.ca>
 | 
			
		||||
## Date: Sat, 19 Sep 2009 05:44:10 +0000 (-0400)
 | 
			
		||||
## Subject: Fix check_ircd binding to wrong interface (#668778)
 | 
			
		||||
## X-Git-Url: http://repo.or.cz/w/nagiosplugins.git?a=commitdiff_plain;h=bc3c8c7cfbdbce716e8987bee211f69911ea8db2
 | 
			
		||||
##
 | 
			
		||||
## DP: Make it working on multihomed host, by choosing the kernel the correct interface
 | 
			
		||||
 | 
			
		||||
if [ $# -lt 1 ]; then
 | 
			
		||||
    echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
 | 
			
		||||
    exit 1
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
 | 
			
		||||
patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
 | 
			
		||||
 | 
			
		||||
case "$1" in
 | 
			
		||||
    -patch) patch -p1 ${patch_opts} < $0;;
 | 
			
		||||
    -unpatch) patch -R -p1 ${patch_opts} < $0;;
 | 
			
		||||
    *)
 | 
			
		||||
        echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
 | 
			
		||||
        exit 1;;
 | 
			
		||||
esac
 | 
			
		||||
 | 
			
		||||
exit 0
 | 
			
		||||
 | 
			
		||||
@DPATCH@
 | 
			
		||||
diff --git a/plugins-scripts/check_ircd.pl b/plugins-scripts/check_ircd.pl
 | 
			
		||||
index cc730cf..3fbce2e 100755
 | 
			
		||||
--- a/plugins-scripts/check_ircd.pl
 | 
			
		||||
+++ b/plugins-scripts/check_ircd.pl
 | 
			
		||||
@@ -59,7 +59,7 @@ use utils qw($TIMEOUT %ERRORS &print_revision &support &usage);
 | 
			
		||||
 sub print_help ();
 | 
			
		||||
 sub print_usage ();
 | 
			
		||||
 sub connection ($$$$);
 | 
			
		||||
-sub bindRemote ($$$);
 | 
			
		||||
+sub bindRemote ($$);
 | 
			
		||||
 
 | 
			
		||||
 # -------------------------------------------------------------[ Enviroment ]--
 | 
			
		||||
 
 | 
			
		||||
@@ -141,28 +141,20 @@ Perl Check IRCD plugin for Nagios
 | 
			
		||||
 
 | 
			
		||||
 # -------------------------------------------------------------[ bindRemote ]--
 | 
			
		||||
 
 | 
			
		||||
-sub bindRemote ($$$)
 | 
			
		||||
+sub bindRemote ($$)
 | 
			
		||||
 {
 | 
			
		||||
-	my ($in_remotehost, $in_remoteport, $in_hostname) = @_;
 | 
			
		||||
+	my ($in_remotehost, $in_remoteport) = @_;
 | 
			
		||||
 	my $proto = getprotobyname('tcp');
 | 
			
		||||
 	my $sockaddr;
 | 
			
		||||
-	my $this;
 | 
			
		||||
-	my $thisaddr = gethostbyname($in_hostname);
 | 
			
		||||
 	my $that;
 | 
			
		||||
 	my ($name, $aliases,$type,$len,$thataddr) = gethostbyname($in_remotehost);
 | 
			
		||||
-#	($name,$aliases,$type,$len,$thisaddr) = gethostbyname($in_hostname);
 | 
			
		||||
 
 | 
			
		||||
 	if (!socket(ClientSocket,AF_INET, SOCK_STREAM, $proto)) {
 | 
			
		||||
 	    print "IRCD UNKNOWN: Could not start socket ($!)\n";
 | 
			
		||||
 	    exit $ERRORS{"UNKNOWN"};
 | 
			
		||||
 	}
 | 
			
		||||
 	$sockaddr = 'S n a4 x8';
 | 
			
		||||
-	$this = pack($sockaddr, AF_INET, 0, $thisaddr);
 | 
			
		||||
 	$that = pack($sockaddr, AF_INET, $in_remoteport, $thataddr);
 | 
			
		||||
-	if (!bind(ClientSocket, $this)) {
 | 
			
		||||
-	    print "IRCD UNKNOWN: Could not bind socket ($!)\n";
 | 
			
		||||
-	    exit $ERRORS{"UNKNOWN"};
 | 
			
		||||
-	}
 | 
			
		||||
 	if (!connect(ClientSocket, $that)) { 
 | 
			
		||||
 	    print "IRCD UNKNOWN: Could not connect socket ($!)\n";
 | 
			
		||||
 	    exit $ERRORS{"UNKNOWN"};
 | 
			
		||||
@@ -221,13 +213,10 @@ MAIN:
 | 
			
		||||
 	
 | 
			
		||||
 	alarm($TIMEOUT);
 | 
			
		||||
 
 | 
			
		||||
-	chomp($hostname = `/bin/hostname`);
 | 
			
		||||
-	$hostname = $1 if ($hostname =~ /([-.a-zA-Z0-9]+)/);
 | 
			
		||||
 	my ($name, $alias, $proto) = getprotobyname('tcp');
 | 
			
		||||
-	print "MAIN(debug): hostname = $hostname\n" if $verbose;
 | 
			
		||||
 
 | 
			
		||||
-	print "MAIN(debug): binding to remote host: $remotehost -> $remoteport -> $hostname\n" if $verbose;
 | 
			
		||||
-	my $ClientSocket = &bindRemote($remotehost,$remoteport,$hostname);
 | 
			
		||||
+	print "MAIN(debug): binding to remote host: $remotehost -> $remoteport\n" if $verbose;
 | 
			
		||||
+	my $ClientSocket = &bindRemote($remotehost,$remoteport);
 | 
			
		||||
 	
 | 
			
		||||
 	print ClientSocket "NICK $NICK\nUSER $USER_INFO\n";
 | 
			
		||||
 	
 | 
			
		||||
							
								
								
									
										18
									
								
								debian/patches/18_check_game_cmdline.dpatch
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										18
									
								
								debian/patches/18_check_game_cmdline.dpatch
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -1,18 +0,0 @@
 | 
			
		|||
#! /bin/sh /usr/share/dpatch/dpatch-run
 | 
			
		||||
## 18_check_game_cmdline.dpatch by  <seanius@debian.org>
 | 
			
		||||
##
 | 
			
		||||
## DP: Fix usage. (bugs.debian.org/307905)
 | 
			
		||||
 | 
			
		||||
@DPATCH@
 | 
			
		||||
diff -urNad nagios-plugins~/plugins/check_game.c nagios-plugins/plugins/check_game.c
 | 
			
		||||
--- nagios-plugins~/plugins/check_game.c	2005-10-11 16:45:44.000000000 +0200
 | 
			
		||||
+++ nagios-plugins/plugins/check_game.c	2005-10-11 16:47:07.000000000 +0200
 | 
			
		||||
@@ -328,7 +328,7 @@
 | 
			
		||||
 print_usage (void)
 | 
			
		||||
 {
 | 
			
		||||
   printf (_("Usage:"));
 | 
			
		||||
-  printf (" %s <game> <ip_address> [-p port] [-gf game_field] [-mf map_field] [-pf ping_field]\n", progname);
 | 
			
		||||
+  printf (" %s [-hvV] [-P port] [-t timeout] [-g game_field] [-m map_field] [-p ping_field] [-G game-time] [-H hostname] <game> <ip_address>\n", progname);
 | 
			
		||||
 }
 | 
			
		||||
 
 | 
			
		||||
 /******************************************************************************
 | 
			
		||||
							
								
								
									
										89
									
								
								debian/patches/22_check_smb_hostaddress.dpatch
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										89
									
								
								debian/patches/22_check_smb_hostaddress.dpatch
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -1,89 +0,0 @@
 | 
			
		|||
#! /bin/sh /usr/share/dpatch/dpatch-run
 | 
			
		||||
## 22_check_smb_hostaddress.dpatch by  <seanius@localhost.localdomain>
 | 
			
		||||
##
 | 
			
		||||
## DP: Allow checking disk usage via host addresses.
 | 
			
		||||
 | 
			
		||||
@DPATCH@
 | 
			
		||||
diff -urNad sid~/plugins-scripts/check_disk_smb.pl sid/plugins-scripts/check_disk_smb.pl
 | 
			
		||||
--- sid~/plugins-scripts/check_disk_smb.pl	2005-10-31 21:44:20.000000000 +0100
 | 
			
		||||
+++ sid/plugins-scripts/check_disk_smb.pl	2005-10-31 21:44:41.000000000 +0100
 | 
			
		||||
@@ -23,7 +23,7 @@
 | 
			
		||||
 use POSIX;
 | 
			
		||||
 use strict;
 | 
			
		||||
 use Getopt::Long;
 | 
			
		||||
-use vars qw($opt_P $opt_V $opt_h $opt_H $opt_s $opt_W $opt_u $opt_p $opt_w $opt_c $verbose);
 | 
			
		||||
+use vars qw($opt_P $opt_V $opt_h $opt_H $opt_s $opt_W $opt_u $opt_p $opt_w $opt_c $opt_a $verbose);
 | 
			
		||||
 use vars qw($PROGNAME);
 | 
			
		||||
 use lib utils.pm ;
 | 
			
		||||
 use utils qw($TIMEOUT %ERRORS &print_revision &support &usage);
 | 
			
		||||
@@ -49,7 +49,8 @@
 | 
			
		||||
 	 "u=s" => \$opt_u, "username=s" => \$opt_u,
 | 
			
		||||
 	 "s=s" => \$opt_s, "share=s"    => \$opt_s,
 | 
			
		||||
 	 "W=s" => \$opt_W, "workgroup=s" => \$opt_W,
 | 
			
		||||
-	 "H=s" => \$opt_H, "hostname=s" => \$opt_H);
 | 
			
		||||
+	 "H=s" => \$opt_H, "hostname=s" => \$opt_H,
 | 
			
		||||
+	 "a=s" => \$opt_a, "address=s" => \$opt_a);
 | 
			
		||||
 
 | 
			
		||||
 if ($opt_V) {
 | 
			
		||||
 	print_revision($PROGNAME,'$Revision$'); #'
 | 
			
		||||
@@ -65,7 +66,7 @@
 | 
			
		||||
 # Options checking
 | 
			
		||||
 
 | 
			
		||||
 ($opt_H) || ($opt_H = shift) || usage("Host name not specified\n");
 | 
			
		||||
-my $host = $1 if ($opt_H =~ /^([-_.A-Za-z0-9]+\$?)$/);
 | 
			
		||||
+my $host = $1 if ($opt_H =~ /^([-_.A-Za-z0-9 ]+\$?)$/);
 | 
			
		||||
 ($host) || usage("Invalid host: $opt_H\n");
 | 
			
		||||
 
 | 
			
		||||
 ($opt_s) || ($opt_s = shift) || usage("Share volume not specified\n");
 | 
			
		||||
@@ -142,6 +143,8 @@
 | 
			
		||||
 
 | 
			
		||||
 my $workgroup = $1 if (defined($opt_W) && $opt_W =~ /(.*)/);
 | 
			
		||||
 
 | 
			
		||||
+my $address = $1 if (defined($opt_a) && $opt_a =~ /(.*)/);
 | 
			
		||||
+
 | 
			
		||||
 # end of options checking
 | 
			
		||||
 
 | 
			
		||||
 
 | 
			
		||||
@@ -160,10 +163,21 @@
 | 
			
		||||
 # Execute an "ls" on the share using smbclient program
 | 
			
		||||
 # get the results into $res
 | 
			
		||||
 if (defined($workgroup)) {
 | 
			
		||||
-	$res = qx/$smbclient \/\/$host\/$share -W $workgroup -U $user%$pass $smbclientoptions -c ls/;
 | 
			
		||||
+	if (defined($address)) {
 | 
			
		||||
+		print "$smbclient " . "\/\/$host\/$share" ." $pass -W $workgroup -U $user $smbclientoptions -I $address -c ls\n" if ($verbose);
 | 
			
		||||
+		$res = qx/$smbclient "\/\/$host\/$share" $pass -W $workgroup -U $user $smbclientoptions -I $address -c ls/;
 | 
			
		||||
+	} else {
 | 
			
		||||
+		print "$smbclient " . "\/\/$host\/$share" ." $pass -W $workgroup -U $user $smbclientoptions -c ls\n" if ($verbose);
 | 
			
		||||
+		$res = qx/$smbclient "\/\/$host\/$share" $pass -W $workgroup -U $user $smbclientoptions -c ls/;
 | 
			
		||||
+	}
 | 
			
		||||
 } else {
 | 
			
		||||
-	print "$smbclient " . "\/\/$host\/$share" ." $pass -U $user $smbclientoptions -c ls\n" if ($verbose);
 | 
			
		||||
-	$res = qx/$smbclient \/\/$host\/$share -U $user%$pass $smbclientoptions -c ls/;
 | 
			
		||||
+	if (defined($address)) {
 | 
			
		||||
+		print "$smbclient " . "\/\/$host\/$share" ." $pass -U $user $smbclientoptions -I $address -c ls\n" if ($verbose);
 | 
			
		||||
+		$res = qx/$smbclient "\/\/$host\/$share" $pass -U $user $smbclientoptions -I $address -c ls/;
 | 
			
		||||
+	} else {
 | 
			
		||||
+		print "$smbclient " . "\/\/$host\/$share" ." $pass -U $user $smbclientoptions -c ls\n" if ($verbose);
 | 
			
		||||
+		$res = qx/$smbclient "\/\/$host\/$share" $pass -U $user $smbclientoptions -c ls/;
 | 
			
		||||
+	}
 | 
			
		||||
 }
 | 
			
		||||
 #Turn off alarm
 | 
			
		||||
 alarm(0);
 | 
			
		||||
@@ -239,7 +253,7 @@
 | 
			
		||||
 
 | 
			
		||||
 sub print_usage () {
 | 
			
		||||
 	print "Usage: $PROGNAME -H <host> -s <share> -u <user> -p <password> 
 | 
			
		||||
-      -w <warn> -c <crit> [-W <workgroup>] [-P <port>]\n";
 | 
			
		||||
+      -w <warn> -c <crit> [-W <workgroup>] [-P <port>] [-a <IP>]\n";
 | 
			
		||||
 }
 | 
			
		||||
 
 | 
			
		||||
 sub print_help () {
 | 
			
		||||
@@ -257,6 +271,8 @@
 | 
			
		||||
    Share name to be tested
 | 
			
		||||
 -W, --workgroup=STRING
 | 
			
		||||
    Workgroup or Domain used (Defaults to \"WORKGROUP\")
 | 
			
		||||
+-a, --address=IP
 | 
			
		||||
+   IP-address of HOST (only necessary if HOST is in another network)
 | 
			
		||||
 -u, --user=STRING
 | 
			
		||||
    Username to log in to server. (Defaults to \"guest\")
 | 
			
		||||
 -p, --password=STRING
 | 
			
		||||
							
								
								
									
										18
									
								
								debian/patches/32_check_ldap_pointer.dpatch
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										18
									
								
								debian/patches/32_check_ldap_pointer.dpatch
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -1,18 +0,0 @@
 | 
			
		|||
#! /bin/sh /usr/share/dpatch/dpatch-run
 | 
			
		||||
## 32_check_ldap_pointer.dpatch by Jan Wagner <waja@cyconet.org>
 | 
			
		||||
## patch provided by dann frazier <dannf@debian.org>
 | 
			
		||||
##
 | 
			
		||||
## DP: Using deprecated interfaces of libldap API (bugs.debian.org/463322)
 | 
			
		||||
## DP: Upstream bug is: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1922579&group_id=29880
 | 
			
		||||
 | 
			
		||||
@DPATCH@
 | 
			
		||||
--- nagios-plugins-1.4.11.orig/plugins/check_ldap.c	2007-07-07 16:20:40.000000000 -0600
 | 
			
		||||
+++ nagios-plugins-1.4.11/plugins/check_ldap.c	2008-01-30 15:14:14.000000000 -0700
 | 
			
		||||
@@ -42,6 +42,7 @@
 | 
			
		||||
 #include "utils.h"
 | 
			
		||||
 
 | 
			
		||||
 #include <lber.h>
 | 
			
		||||
+#define LDAP_DEPRECATED 1
 | 
			
		||||
 #include <ldap.h>
 | 
			
		||||
 
 | 
			
		||||
 enum {
 | 
			
		||||
							
								
								
									
										44
									
								
								debian/patches/33_fix_emb_check_disk_smb.dpatch
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										44
									
								
								debian/patches/33_fix_emb_check_disk_smb.dpatch
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -1,44 +0,0 @@
 | 
			
		|||
#! /bin/sh /usr/share/dpatch/dpatch-run
 | 
			
		||||
## 32_check_ldap_pointer.dpatch by Jan Wagner <waja@cyconet.org>
 | 
			
		||||
## patch provided by Stephane Chazelas <stephane@artesyncp.com>
 | 
			
		||||
##
 | 
			
		||||
## DP: fix processing vi embedded perl interpreter (bugs.debian.org/478906)
 | 
			
		||||
## DP: Upstream bug is: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1985338&group_id=29880
 | 
			
		||||
 | 
			
		||||
@DPATCH@
 | 
			
		||||
diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' nagios-plugins-1.4.14~/plugins-scripts/check_disk_smb.pl nagios-plugins-1.4.14/plugins-scripts/check_disk_smb.pl
 | 
			
		||||
--- nagios-plugins-1.4.14~/plugins-scripts/check_disk_smb.pl	2010-04-12 16:34:17.000000000 +0200
 | 
			
		||||
+++ nagios-plugins-1.4.14/plugins-scripts/check_disk_smb.pl	2010-04-12 16:37:57.000000000 +0200
 | 
			
		||||
@@ -64,26 +64,26 @@
 | 
			
		||||
 
 | 
			
		||||
 # Options checking
 | 
			
		||||
 
 | 
			
		||||
-($opt_H) || ($opt_H = shift) || usage("Host name not specified\n");
 | 
			
		||||
+($opt_H) || ($opt_H = shift @ARGV) || usage("Host name not specified\n");
 | 
			
		||||
 my $host = $1 if ($opt_H =~ /^([-_.A-Za-z0-9 ]+\$?)$/);
 | 
			
		||||
 ($host) || usage("Invalid host: $opt_H\n");
 | 
			
		||||
 
 | 
			
		||||
-($opt_s) || ($opt_s = shift) || usage("Share volume not specified\n");
 | 
			
		||||
+($opt_s) || ($opt_s = shift @ARGV) || usage("Share volume not specified\n");
 | 
			
		||||
 my $share = $1 if ($opt_s =~ /^([-_.A-Za-z0-9]+\$?)$/);
 | 
			
		||||
 ($share) || usage("Invalid share: $opt_s\n");
 | 
			
		||||
 
 | 
			
		||||
-($opt_u) || ($opt_u = shift) || ($opt_u = "guest");
 | 
			
		||||
+($opt_u) || ($opt_u = shift @ARGV) || ($opt_u = "guest");
 | 
			
		||||
 my $user = $1 if ($opt_u =~ /^([-_.A-Za-z0-9\\]+)$/);
 | 
			
		||||
 ($user) || usage("Invalid user: $opt_u\n");
 | 
			
		||||
 
 | 
			
		||||
-($opt_p) || ($opt_p = shift) || ($opt_p = "");
 | 
			
		||||
+($opt_p) || ($opt_p = shift @ARGV) || ($opt_p = "");
 | 
			
		||||
 my $pass = $1 if ($opt_p =~ /(.*)/);
 | 
			
		||||
 
 | 
			
		||||
-($opt_w) || ($opt_w = shift) || ($opt_w = 85);
 | 
			
		||||
+($opt_w) || ($opt_w = shift @ARGV) || ($opt_w = 85);
 | 
			
		||||
 my $warn = $1 if ($opt_w =~ /^([0-9]{1,2}\%?|100\%?|[0-9]+[kMG])$/);
 | 
			
		||||
 ($warn) || usage("Invalid warning threshold: $opt_w\n");
 | 
			
		||||
 
 | 
			
		||||
-($opt_c) || ($opt_c = shift) || ($opt_c = 95);
 | 
			
		||||
+($opt_c) || ($opt_c = shift @ARGV) || ($opt_c = 95);
 | 
			
		||||
 my $crit = $1 if ($opt_c =~ /^([0-9]{1,2}\%?|100\%?|[0-9]+[kMG])$/);
 | 
			
		||||
 ($crit) || usage("Invalid critical threshold: $opt_c\n");
 | 
			
		||||
 
 | 
			
		||||
| 
						 | 
				
			
			@ -1,137 +0,0 @@
 | 
			
		|||
#! /bin/sh /usr/share/dpatch/dpatch-run
 | 
			
		||||
## 34_fix_smbclient_check_disk_smb.dpatch by Jan Wagner <waja@cyconet.org>
 | 
			
		||||
## patch provided by Stephane Chazelas <stephane@artesyncp.com>
 | 
			
		||||
##
 | 
			
		||||
## DP: Fixes use of smbclient (bugs.debian.org/478942)
 | 
			
		||||
## DP: Upstream bug is: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1986260&group_id=29880
 | 
			
		||||
 | 
			
		||||
@DPATCH@
 | 
			
		||||
diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' nagios-plugins-1.4.14~/plugins-scripts/check_disk_smb.pl nagios-plugins-1.4.14/plugins-scripts/check_disk_smb.pl
 | 
			
		||||
--- nagios-plugins-1.4.14~/plugins-scripts/check_disk_smb.pl	2010-04-11 12:41:42.000000000 +0200
 | 
			
		||||
+++ nagios-plugins-1.4.14/plugins-scripts/check_disk_smb.pl	2010-04-11 12:42:34.000000000 +0200
 | 
			
		||||
@@ -25,17 +25,13 @@
 | 
			
		||||
 use vars qw($opt_P $opt_V $opt_h $opt_H $opt_s $opt_W $opt_u $opt_p $opt_w $opt_c $opt_a $verbose);
 | 
			
		||||
 use vars qw($PROGNAME);
 | 
			
		||||
 use lib utils.pm ;
 | 
			
		||||
-use utils qw($TIMEOUT %ERRORS &print_revision &support &usage);
 | 
			
		||||
+use utils qw($TIMEOUT %ERRORS &print_revision &support &usage &output_and_error_of);
 | 
			
		||||
 
 | 
			
		||||
 sub print_help ();
 | 
			
		||||
 sub print_usage ();
 | 
			
		||||
 
 | 
			
		||||
 $PROGNAME = "check_disk_smb";
 | 
			
		||||
 
 | 
			
		||||
-$ENV{'PATH'}='';
 | 
			
		||||
-$ENV{'BASH_ENV'}=''; 
 | 
			
		||||
-$ENV{'ENV'}='';
 | 
			
		||||
-
 | 
			
		||||
 Getopt::Long::Configure('bundling');
 | 
			
		||||
 GetOptions
 | 
			
		||||
 	("v"   => \$verbose, "verbose"    => \$verbose,
 | 
			
		||||
@@ -58,9 +54,7 @@
 | 
			
		||||
 
 | 
			
		||||
 if ($opt_h) {print_help(); exit $ERRORS{'OK'};}
 | 
			
		||||
 
 | 
			
		||||
-my $smbclient= "$utils::PATH_TO_SMBCLIENT " ;
 | 
			
		||||
-my $smbclientoptions= $opt_P ? "-p $opt_P " : "";
 | 
			
		||||
-
 | 
			
		||||
+my $smbclient = $utils::PATH_TO_SMBCLIENT;
 | 
			
		||||
 
 | 
			
		||||
 # Options checking
 | 
			
		||||
 
 | 
			
		||||
@@ -72,11 +66,11 @@
 | 
			
		||||
 my $share = $1 if ($opt_s =~ /^([-_.A-Za-z0-9]+\$?)$/);
 | 
			
		||||
 ($share) || usage("Invalid share: $opt_s\n");
 | 
			
		||||
 
 | 
			
		||||
-($opt_u) || ($opt_u = shift @ARGV) || ($opt_u = "guest");
 | 
			
		||||
-my $user = $1 if ($opt_u =~ /^([-_.A-Za-z0-9\\]+)$/);
 | 
			
		||||
-($user) || usage("Invalid user: $opt_u\n");
 | 
			
		||||
+defined($opt_u) || ($opt_u = shift @ARGV) || ($opt_u = "guest");
 | 
			
		||||
+my $user = $1 if ($opt_u =~ /^([-_.A-Za-z0-9\\]*)$/);
 | 
			
		||||
+defined($user) || usage("Invalid user: $opt_u\n");
 | 
			
		||||
 
 | 
			
		||||
-($opt_p) || ($opt_p = shift @ARGV) || ($opt_p = "");
 | 
			
		||||
+defined($opt_p) || ($opt_p = shift @ARGV) || ($opt_p = "");
 | 
			
		||||
 my $pass = $1 if ($opt_p =~ /(.*)/);
 | 
			
		||||
 $pass = "-N" if ($opt_p eq "");
 | 
			
		||||
 
 | 
			
		||||
@@ -162,23 +156,19 @@
 | 
			
		||||
 
 | 
			
		||||
 # Execute an "ls" on the share using smbclient program
 | 
			
		||||
 # get the results into $res
 | 
			
		||||
-if (defined($workgroup)) {
 | 
			
		||||
-	if (defined($address)) {
 | 
			
		||||
-		print "$smbclient " . "\/\/$host\/$share" ." $pass -W $workgroup -U $user $smbclientoptions -I $address -c ls\n" if ($verbose);
 | 
			
		||||
-		$res = qx/$smbclient "\/\/$host\/$share" $pass -W $workgroup -U $user $smbclientoptions -I $address -c ls/;
 | 
			
		||||
-	} else {
 | 
			
		||||
-		print "$smbclient " . "\/\/$host\/$share" ." $pass -W $workgroup -U $user $smbclientoptions -c ls\n" if ($verbose);
 | 
			
		||||
-		$res = qx/$smbclient "\/\/$host\/$share" $pass -W $workgroup -U $user $smbclientoptions -c ls/;
 | 
			
		||||
-	}
 | 
			
		||||
-} else {
 | 
			
		||||
-	if (defined($address)) {
 | 
			
		||||
-		print "$smbclient " . "\/\/$host\/$share" ." $pass -U $user $smbclientoptions -I $address -c ls\n" if ($verbose);
 | 
			
		||||
-		$res = qx/$smbclient "\/\/$host\/$share" $pass -U $user $smbclientoptions -I $address -c ls/;
 | 
			
		||||
-	} else {
 | 
			
		||||
-		print "$smbclient " . "\/\/$host\/$share" ." $pass -U $user $smbclientoptions -c ls\n" if ($verbose);
 | 
			
		||||
-		$res = qx/$smbclient "\/\/$host\/$share" $pass -U $user $smbclientoptions -c ls/;
 | 
			
		||||
-	}
 | 
			
		||||
-}
 | 
			
		||||
+my @cmd = (
 | 
			
		||||
+  $smbclient,
 | 
			
		||||
+  "//$host/$share",
 | 
			
		||||
+  "-U", "$user%$pass",
 | 
			
		||||
+  defined($workgroup) ? ("-W", $workgroup) : (),
 | 
			
		||||
+  defined($address) ? ("-I", $address) : (),
 | 
			
		||||
+  defined($opt_P) ? ("-p", $opt_P) : (),
 | 
			
		||||
+  "-c", "ls"
 | 
			
		||||
+);
 | 
			
		||||
+
 | 
			
		||||
+print join(" ", @cmd) . "\n" if ($verbose);
 | 
			
		||||
+$res = output_and_error_of(@cmd) or exit $ERRORS{"UNKNOWN"};
 | 
			
		||||
+
 | 
			
		||||
 #Turn off alarm
 | 
			
		||||
 alarm(0);
 | 
			
		||||
 
 | 
			
		||||
diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' nagios-plugins-1.4.14~/plugins-scripts/utils.pm.in nagios-plugins-1.4.14/plugins-scripts/utils.pm.in
 | 
			
		||||
--- nagios-plugins-1.4.14~/plugins-scripts/utils.pm.in	2008-11-30 22:23:18.000000000 +0100
 | 
			
		||||
+++ nagios-plugins-1.4.14/plugins-scripts/utils.pm.in	2010-04-11 12:41:43.000000000 +0200
 | 
			
		||||
@@ -7,7 +7,8 @@
 | 
			
		||||
 
 | 
			
		||||
 require Exporter;
 | 
			
		||||
 @ISA = qw(Exporter);
 | 
			
		||||
-@EXPORT_OK = qw($TIMEOUT %ERRORS &print_revision &support &usage);
 | 
			
		||||
+@EXPORT_OK = qw($TIMEOUT %ERRORS &print_revision &support &usage
 | 
			
		||||
+		&output_of &output_and_error_of);
 | 
			
		||||
 
 | 
			
		||||
 #use strict;
 | 
			
		||||
 #use vars($TIMEOUT %ERRORS);
 | 
			
		||||
@@ -64,4 +65,29 @@
 | 
			
		||||
 	}
 | 
			
		||||
 }
 | 
			
		||||
 
 | 
			
		||||
+sub output_of {
 | 
			
		||||
+	local *CMD;
 | 
			
		||||
+	local $/ = undef;
 | 
			
		||||
+	if (open CMD, "-|", @_) {
 | 
			
		||||
+		return <CMD>;
 | 
			
		||||
+		close CMD;
 | 
			
		||||
+	}
 | 
			
		||||
+	return undef;
 | 
			
		||||
+}
 | 
			
		||||
+
 | 
			
		||||
+sub output_and_error_of {
 | 
			
		||||
+	local *CMD;
 | 
			
		||||
+	local $/ = undef;
 | 
			
		||||
+	my $pid = open CMD, "-|";
 | 
			
		||||
+	if (defined($pid)) {
 | 
			
		||||
+		if ($pid) {
 | 
			
		||||
+			return <CMD>;
 | 
			
		||||
+		} else {
 | 
			
		||||
+			open STDERR, ">&STDOUT" and exec @_;
 | 
			
		||||
+			exit(1);
 | 
			
		||||
+		}
 | 
			
		||||
+	}
 | 
			
		||||
+	return undef;
 | 
			
		||||
+}
 | 
			
		||||
+
 | 
			
		||||
 1;
 | 
			
		||||
							
								
								
									
										23
									
								
								debian/patches/35_check_http_date.dpatch
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										23
									
								
								debian/patches/35_check_http_date.dpatch
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -1,23 +0,0 @@
 | 
			
		|||
#! /bin/sh /usr/share/dpatch/dpatch-run
 | 
			
		||||
## 35_check_http_date.dpatch by Jan Wagner <waja@cyconet.org>
 | 
			
		||||
## patch provided by Hilko Bengen <bengen@debian.org>
 | 
			
		||||
##
 | 
			
		||||
## DP: Prevents check_http from trying to extract Date or
 | 
			
		||||
## DP: Last-Modified header from file content.N (bugs.debian.org/460097)
 | 
			
		||||
 | 
			
		||||
@DPATCH@
 | 
			
		||||
diff -urNad nagios-plugins-1.4.12~/plugins/check_http.c nagios-plugins-1.4.12/plugins/check_http.c
 | 
			
		||||
--- nagios-plugins-1.4.12~/plugins/check_http.c	2008-05-07 12:02:42.000000000 +0200
 | 
			
		||||
+++ nagios-plugins-1.4.12/plugins/check_http.c	2008-06-06 13:03:33.000000000 +0200
 | 
			
		||||
@@ -598,7 +598,10 @@
 | 
			
		||||
     /* Skip to the end of the header, including continuation lines. */
 | 
			
		||||
     while (*s && !(*s == '\n' && (s[1] != ' ' && s[1] != '\t')))
 | 
			
		||||
       s++;
 | 
			
		||||
-    s++;
 | 
			
		||||
+
 | 
			
		||||
+    /* Avoid stepping over end-of-string marker */
 | 
			
		||||
+    if (*s)
 | 
			
		||||
+      s++;
 | 
			
		||||
 
 | 
			
		||||
     /* Process this header. */
 | 
			
		||||
     if (value && value > field+2) {
 | 
			
		||||
							
								
								
									
										20
									
								
								debian/patches/36_check_ldap_empty_base.dpatch
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										20
									
								
								debian/patches/36_check_ldap_empty_base.dpatch
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -1,20 +0,0 @@
 | 
			
		|||
#! /bin/sh /usr/share/dpatch/dpatch-run
 | 
			
		||||
## 36_check_ldap_empty_base.dpatch by Jan Wagner <waja@cyconet.org>
 | 
			
		||||
## patch provided by Stephane Chazelas <stephane@artesyncp.com>
 | 
			
		||||
##
 | 
			
		||||
## DP: allow empty ldap base (bugs.debian.org/479984)
 | 
			
		||||
## DP: Upstream bug is: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1985489&group_id=29880
 | 
			
		||||
 | 
			
		||||
@DPATCH@
 | 
			
		||||
diff -urNad nagios-plugins-1.4.12~/plugins/check_ldap.c nagios-plugins-1.4.12/plugins/check_ldap.c
 | 
			
		||||
--- nagios-plugins-1.4.12~/plugins/check_ldap.c	2008-06-06 13:40:44.000000000 +0200
 | 
			
		||||
+++ nagios-plugins-1.4.12/plugins/check_ldap.c	2008-06-06 13:42:02.000000000 +0200
 | 
			
		||||
@@ -378,7 +378,7 @@
 | 
			
		||||
 	if (ld_host==NULL || strlen(ld_host)==0)
 | 
			
		||||
 		usage4 (_("Please specify the host name\n"));
 | 
			
		||||
 
 | 
			
		||||
-	if (ld_base==NULL || strlen(ld_base)==0)
 | 
			
		||||
+	if (ld_base == NULL)
 | 
			
		||||
 		usage4 (_("Please specify the LDAP base\n"));
 | 
			
		||||
 
 | 
			
		||||
 	return OK;
 | 
			
		||||
							
								
								
									
										104
									
								
								debian/patches/37_check_radius_nas-ip-address.dpatch
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										104
									
								
								debian/patches/37_check_radius_nas-ip-address.dpatch
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -1,104 +0,0 @@
 | 
			
		|||
#! /bin/sh /usr/share/dpatch/dpatch-run
 | 
			
		||||
## 37_check_radius_nas-ip-address.dpatch by Jan Wagner <waja@cyconet.org>
 | 
			
		||||
## patch provided by Josip Rodin <joy@debbugs.entuzijast.net>
 | 
			
		||||
##
 | 
			
		||||
## DP: add nas-ip-address option (bugs.debian.org/482947)
 | 
			
		||||
## DP: Upstream bug is: http://sourceforge.net/tracker/index.php?func=detail&aid=1975646&group_id=29880&atid=397599
 | 
			
		||||
 | 
			
		||||
@DPATCH@
 | 
			
		||||
diff -urNad nagios-plugins-1.4.13+git200906171632~/plugins/check_radius.c nagios-plugins-1.4.13+git200906171632/plugins/check_radius.c
 | 
			
		||||
--- nagios-plugins-1.4.13+git200906171632~/plugins/check_radius.c	2009-06-17 22:33:18.000000000 +0200
 | 
			
		||||
+++ nagios-plugins-1.4.13+git200906171632/plugins/check_radius.c	2009-06-17 22:46:08.000000000 +0200
 | 
			
		||||
@@ -69,6 +69,7 @@
 | 
			
		||||
 char *username = NULL;
 | 
			
		||||
 char *password = NULL;
 | 
			
		||||
 char *nasid = NULL;
 | 
			
		||||
+char *nasipaddress = NULL;
 | 
			
		||||
 char *expect = NULL;
 | 
			
		||||
 char *config_file = NULL;
 | 
			
		||||
 unsigned short port = PW_AUTH_UDP_PORT;
 | 
			
		||||
@@ -169,19 +170,26 @@
 | 
			
		||||
 	memset (&data, 0, sizeof(data));
 | 
			
		||||
 	if (!(my_rc_avpair_add (&data.send_pairs, PW_SERVICE_TYPE, &service, 0) &&
 | 
			
		||||
 				my_rc_avpair_add (&data.send_pairs, PW_USER_NAME, username, 0) &&
 | 
			
		||||
-				my_rc_avpair_add (&data.send_pairs, PW_USER_PASSWORD, password, 0) &&
 | 
			
		||||
-				(nasid==NULL || my_rc_avpair_add (&data.send_pairs, PW_NAS_IDENTIFIER, nasid, 0))))
 | 
			
		||||
+				my_rc_avpair_add (&data.send_pairs, PW_USER_PASSWORD, password, 0)
 | 
			
		||||
+				))
 | 
			
		||||
 		die (STATE_UNKNOWN, _("Out of Memory?"));
 | 
			
		||||
 
 | 
			
		||||
-	/*
 | 
			
		||||
-	 * Fill in NAS-IP-Address
 | 
			
		||||
-	 */
 | 
			
		||||
-
 | 
			
		||||
-	if ((client_id = my_rc_own_ipaddress ()) == 0)
 | 
			
		||||
-		return (ERROR_RC);
 | 
			
		||||
+	if (nasid != NULL) {
 | 
			
		||||
+		if (!(my_rc_avpair_add (&data.send_pairs, PW_NAS_IDENTIFIER, nasid, 0)))
 | 
			
		||||
+			die (STATE_UNKNOWN, _("Invalid NAS-Identifier"));
 | 
			
		||||
+	}
 | 
			
		||||
 
 | 
			
		||||
-	if (my_rc_avpair_add (&(data.send_pairs), PW_NAS_IP_ADDRESS, &client_id, 0) ==
 | 
			
		||||
-			NULL) return (ERROR_RC);
 | 
			
		||||
+	if (nasipaddress != NULL) {
 | 
			
		||||
+		if (rc_good_ipaddr (nasipaddress))
 | 
			
		||||
+			die (STATE_UNKNOWN, _("Invalid NAS-IP-Address"));
 | 
			
		||||
+		if ((client_id = rc_get_ipaddr(nasipaddress)) == 0)
 | 
			
		||||
+			die (STATE_UNKNOWN, _("Invalid NAS-IP-Address"));
 | 
			
		||||
+	} else {
 | 
			
		||||
+		if ((client_id = my_rc_own_ipaddress ()) == 0)
 | 
			
		||||
+			die (STATE_UNKNOWN, _("Can't find local IP for NAS-IP-Address"));
 | 
			
		||||
+	}
 | 
			
		||||
+	if (my_rc_avpair_add (&(data.send_pairs), PW_NAS_IP_ADDRESS, &client_id, 0) == NULL)
 | 
			
		||||
+		die (STATE_UNKNOWN, _("Invalid NAS-IP-Address"));
 | 
			
		||||
 
 | 
			
		||||
 	my_rc_buildreq (&data, PW_ACCESS_REQUEST, server, port, (int)timeout_interval,
 | 
			
		||||
 	             retries);
 | 
			
		||||
@@ -219,6 +227,7 @@
 | 
			
		||||
 		{"username", required_argument, 0, 'u'},
 | 
			
		||||
 		{"password", required_argument, 0, 'p'},
 | 
			
		||||
 		{"nas-id", required_argument, 0, 'n'},
 | 
			
		||||
+		{"nas-ip-address", required_argument, 0, 'N'},
 | 
			
		||||
 		{"filename", required_argument, 0, 'F'},
 | 
			
		||||
 		{"expect", required_argument, 0, 'e'},
 | 
			
		||||
 		{"retries", required_argument, 0, 'r'},
 | 
			
		||||
@@ -230,7 +239,7 @@
 | 
			
		||||
 	};
 | 
			
		||||
 
 | 
			
		||||
 	while (1) {
 | 
			
		||||
-		c = getopt_long (argc, argv, "+hVvH:P:F:u:p:n:t:r:e:", longopts,
 | 
			
		||||
+		c = getopt_long (argc, argv, "+hVvH:P:F:u:p:n:N:t:r:e:", longopts,
 | 
			
		||||
 									 &option);
 | 
			
		||||
 
 | 
			
		||||
 		if (c == -1 || c == EOF || c == 1)
 | 
			
		||||
@@ -275,6 +284,9 @@
 | 
			
		||||
 		case 'n':									/* nas id */
 | 
			
		||||
 			nasid = optarg;
 | 
			
		||||
 			break;
 | 
			
		||||
+		case 'N':									/* nas ip address */
 | 
			
		||||
+			nasipaddress = optarg;
 | 
			
		||||
+			break;
 | 
			
		||||
 		case 'F':									/* configuration file */
 | 
			
		||||
 			config_file = optarg;
 | 
			
		||||
 			break;
 | 
			
		||||
@@ -338,6 +350,8 @@
 | 
			
		||||
   printf ("    %s\n", _("Password for autentication (SECURITY RISK)"));
 | 
			
		||||
   printf (" %s\n", "-n, --nas-id=STRING");
 | 
			
		||||
   printf ("    %s\n", _("NAS identifier"));
 | 
			
		||||
+  printf (" %s\n", "-N, --nas-ip-address=STRING");
 | 
			
		||||
+  printf ("    %s\n", _("NAS IP Address"));
 | 
			
		||||
   printf (" %s\n", "-F, --filename=STRING");
 | 
			
		||||
   printf ("    %s\n", _("Configuration file"));
 | 
			
		||||
   printf (" %s\n", "-e, --expect=STRING");
 | 
			
		||||
@@ -373,8 +387,9 @@
 | 
			
		||||
 print_usage (void)
 | 
			
		||||
 {
 | 
			
		||||
   printf (_("Usage:"));
 | 
			
		||||
-	printf ("%s -H host -F config_file -u username -p password [-n nas-id] [-P port]\n\
 | 
			
		||||
-                  [-t timeout] [-r retries] [-e expect]\n", progname);
 | 
			
		||||
+	printf ("%s -H host -F config_file -u username -p password\n\
 | 
			
		||||
+			[-P port] [-t timeout] [-r retries] [-e expect]\n\
 | 
			
		||||
+			[-n nas-id] [-N nas-ip-addr]\n", progname);
 | 
			
		||||
 }
 | 
			
		||||
 
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										40
									
								
								debian/patches/39_check_ircd_fix_epn.dpatch
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										40
									
								
								debian/patches/39_check_ircd_fix_epn.dpatch
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -1,40 +0,0 @@
 | 
			
		|||
#! /bin/sh /usr/share/dpatch/dpatch-run
 | 
			
		||||
## 39_check_ircd_fix_epn.dpatch by Alexander Wirt <formorer@formorer.de>
 | 
			
		||||
## From: Holger Weiss <holger@zedat.fu-berlin.de>
 | 
			
		||||
## Date: Mon, 12 Apr 2010 13:36:33 +0000 (+0200)
 | 
			
		||||
## Subject: Fix Failure when run via ePN
 | 
			
		||||
## X-Git-Url: http://nagiosplug.git.sf.net/git/gitweb.cgi?p=nagiosplug%2Fnagiosplug;a=commitdiff_plain;h=7a661c7aed2a0bad4ce1e3786bc707cd2b07c128
 | 
			
		||||
##
 | 
			
		||||
## DP: Fixes epn in check_ircd (#545940) (bugs.debian.org/545940)
 | 
			
		||||
## DP: Upstream bug is: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=2864973&group_id=29880
 | 
			
		||||
 | 
			
		||||
@DPATCH@
 | 
			
		||||
 | 
			
		||||
diff --git a/plugins-scripts/check_ircd.pl b/plugins-scripts/check_ircd.pl
 | 
			
		||||
index 3fbce2e..42a9bca 100755
 | 
			
		||||
--- a/plugins-scripts/check_ircd.pl
 | 
			
		||||
+++ b/plugins-scripts/check_ircd.pl
 | 
			
		||||
@@ -187,19 +187,19 @@ MAIN:
 | 
			
		||||
 
 | 
			
		||||
 	if ($opt_h) {print_help(); exit $ERRORS{'OK'};}
 | 
			
		||||
 
 | 
			
		||||
-	($opt_H) || ($opt_H = shift) || usage("Host name/address not specified\n");
 | 
			
		||||
+	($opt_H) || ($opt_H = shift @ARGV) || usage("Host name/address not specified\n");
 | 
			
		||||
 	my $remotehost = $1 if ($opt_H =~ /([-.A-Za-z0-9]+)/);
 | 
			
		||||
 	($remotehost) || usage("Invalid host: $opt_H\n");
 | 
			
		||||
 
 | 
			
		||||
-	($opt_w) || ($opt_w = shift) || ($opt_w = 50);
 | 
			
		||||
+	($opt_w) || ($opt_w = shift @ARGV) || ($opt_w = 50);
 | 
			
		||||
 	my $warn = $1 if ($opt_w =~ /^([0-9]+)$/);
 | 
			
		||||
 	($warn) || usage("Invalid warning threshold: $opt_w\n");
 | 
			
		||||
 
 | 
			
		||||
-	($opt_c) || ($opt_c = shift) || ($opt_c = 100);
 | 
			
		||||
+	($opt_c) || ($opt_c = shift @ARGV) || ($opt_c = 100);
 | 
			
		||||
 	my $crit = $1 if ($opt_c =~ /^([0-9]+)$/);
 | 
			
		||||
 	($crit) || usage("Invalid critical threshold: $opt_c\n");
 | 
			
		||||
 
 | 
			
		||||
-	($opt_p) || ($opt_p = shift) || ($opt_p = 6667);
 | 
			
		||||
+	($opt_p) || ($opt_p = shift @ARGV) || ($opt_p = 6667);
 | 
			
		||||
 	my $remoteport = $1 if ($opt_p =~ /^([0-9]+)$/);
 | 
			
		||||
 	($remoteport) || usage("Invalid port: $opt_p\n");
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										82
									
								
								debian/patches/40_check_http_proxy_auth.dpatch
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										82
									
								
								debian/patches/40_check_http_proxy_auth.dpatch
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -1,82 +0,0 @@
 | 
			
		|||
#! /bin/sh /usr/share/dpatch/dpatch-run
 | 
			
		||||
## 40_check_http_proxy_auth.dpatch
 | 
			
		||||
## From: Thomas Guyot-Sionnest <dermoth@aei.ca>
 | 
			
		||||
## Date: Tue, 22 Sep 2009 01:20:33 +0000 (-0400)
 | 
			
		||||
## Subject: Add proxy-authorization option to check_http (Peter Doherty - #2863772, Bryan Irvine...
 | 
			
		||||
## X-Git-Url: http://repo.or.cz/w/nagiosplugins.git?a=commitdiff_plain;h=08199792ba8bf19c2dbdc27f68689e571d4240a9
 | 
			
		||||
##
 | 
			
		||||
## DP: Add proxy-authorization option to check_http
 | 
			
		||||
 | 
			
		||||
@DPATCH@
 | 
			
		||||
 | 
			
		||||
diff --git a/plugins/check_http.c b/plugins/check_http.c
 | 
			
		||||
index 79f6adf..b4e6004 100644
 | 
			
		||||
--- a/plugins/check_http.c
 | 
			
		||||
+++ b/plugins/check_http.c
 | 
			
		||||
@@ -105,6 +105,7 @@ int check_warning_time = FALSE;
 | 
			
		||||
 double critical_time = 0;
 | 
			
		||||
 int check_critical_time = FALSE;
 | 
			
		||||
 char user_auth[MAX_INPUT_BUFFER] = "";
 | 
			
		||||
+char proxy_auth[MAX_INPUT_BUFFER] = "";
 | 
			
		||||
 int display_html = FALSE;
 | 
			
		||||
 char **http_opt_headers;
 | 
			
		||||
 int http_opt_headers_count = 0;
 | 
			
		||||
@@ -192,6 +193,7 @@ process_arguments (int argc, char **argv)
 | 
			
		||||
     {"url", required_argument, 0, 'u'},
 | 
			
		||||
     {"port", required_argument, 0, 'p'},
 | 
			
		||||
     {"authorization", required_argument, 0, 'a'},
 | 
			
		||||
+    {"proxy_authorization", required_argument, 0, 'b'},
 | 
			
		||||
     {"string", required_argument, 0, 's'},
 | 
			
		||||
     {"expect", required_argument, 0, 'e'},
 | 
			
		||||
     {"regex", required_argument, 0, 'r'},
 | 
			
		||||
@@ -229,7 +231,7 @@ process_arguments (int argc, char **argv)
 | 
			
		||||
   }
 | 
			
		||||
 
 | 
			
		||||
   while (1) {
 | 
			
		||||
-    c = getopt_long (argc, argv, "Vvh46t:c:w:A:k:H:P:j:T:I:a:e:p:s:R:r:u:f:C:nlLSm:M:N", longopts, &option);
 | 
			
		||||
+    c = getopt_long (argc, argv, "Vvh46t:c:w:A:k:H:P:j:T:I:a:b:e:p:s:R:r:u:f:C:nlLSm:M:N", longopts, &option);
 | 
			
		||||
     if (c == -1 || c == EOF)
 | 
			
		||||
       break;
 | 
			
		||||
 
 | 
			
		||||
@@ -350,6 +352,10 @@ process_arguments (int argc, char **argv)
 | 
			
		||||
       strncpy (user_auth, optarg, MAX_INPUT_BUFFER - 1);
 | 
			
		||||
       user_auth[MAX_INPUT_BUFFER - 1] = 0;
 | 
			
		||||
       break;
 | 
			
		||||
+    case 'b': /* proxy-authorization info */
 | 
			
		||||
+      strncpy (proxy_auth, optarg, MAX_INPUT_BUFFER - 1);
 | 
			
		||||
+      proxy_auth[MAX_INPUT_BUFFER - 1] = 0;
 | 
			
		||||
+      break;
 | 
			
		||||
     case 'P': /* HTTP POST data in URL encoded format; ignored if settings already */
 | 
			
		||||
       if (! http_post_data)
 | 
			
		||||
         http_post_data = strdup (optarg);
 | 
			
		||||
@@ -836,6 +842,12 @@ check_http (void)
 | 
			
		||||
     asprintf (&buf, "%sAuthorization: Basic %s\r\n", buf, auth);
 | 
			
		||||
   }
 | 
			
		||||
 
 | 
			
		||||
+  /* optionally send the proxy authentication info */
 | 
			
		||||
+  if (strlen(proxy_auth)) {
 | 
			
		||||
+    base64_encode_alloc (proxy_auth, strlen (proxy_auth), &auth);
 | 
			
		||||
+    asprintf (&buf, "%sProxy-Authorization: Basic %s\r\n", buf, auth);
 | 
			
		||||
+  }
 | 
			
		||||
+
 | 
			
		||||
   /* either send http POST data (any data, not only POST)*/
 | 
			
		||||
   if (http_post_data) {
 | 
			
		||||
     if (http_content_type) {
 | 
			
		||||
@@ -1346,6 +1358,8 @@ print_help (void)
 | 
			
		||||
 
 | 
			
		||||
   printf (" %s\n", "-a, --authorization=AUTH_PAIR");
 | 
			
		||||
   printf ("    %s\n", _("Username:password on sites with basic authentication"));
 | 
			
		||||
+  printf (" %s\n", "-b, --proxy-authorization=AUTH_PAIR");
 | 
			
		||||
+  printf (" 	%s\n", _("Username:password on proxy-servers with basic authentication"));
 | 
			
		||||
   printf (" %s\n", "-A, --useragent=STRING");
 | 
			
		||||
   printf ("    %s\n", _("String to be sent in http header as \"User Agent\""));
 | 
			
		||||
   printf (" %s\n", "-k, --header=STRING");
 | 
			
		||||
@@ -1407,7 +1421,7 @@ print_usage (void)
 | 
			
		||||
   printf (_("Usage:"));
 | 
			
		||||
   printf (" %s -H <vhost> | -I <IP-address> [-u <uri>] [-p <port>]\n",progname);
 | 
			
		||||
   printf ("       [-w <warn time>] [-c <critical time>] [-t <timeout>] [-L]\n");
 | 
			
		||||
-  printf ("       [-a auth] [-f <ok | warn | critcal | follow | sticky | stickyport>]\n");
 | 
			
		||||
+  printf ("       [-a auth] [-b proxy_auth] [-f <ok | warn | critcal | follow | sticky | stickyport>]\n");
 | 
			
		||||
   printf ("       [-e <expect>] [-s string] [-l] [-r <regex> | -R <case-insensitive regex>]\n");
 | 
			
		||||
   printf ("       [-P string] [-m <min_pg_size>:<max_pg_size>] [-4|-6] [-N] [-M <age>]\n");
 | 
			
		||||
   printf ("       [-A string] [-k string] [-S] [-C <age>] [-T <content-type>] [-j method]\n");
 | 
			
		||||
							
								
								
									
										88
									
								
								debian/patches/41_check_ping_detect_args.dpatch
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										88
									
								
								debian/patches/41_check_ping_detect_args.dpatch
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -1,88 +0,0 @@
 | 
			
		|||
#! /bin/sh /usr/share/dpatch/dpatch-run
 | 
			
		||||
## 41_check_ping_detect_args.dpatch
 | 
			
		||||
## From: Thomas Guyot-Sionnest <dermoth@aei.ca>
 | 
			
		||||
## Date: Fri, 4 Dec 2009 20:24:15 +0000 (-0500)
 | 
			
		||||
## Subject: Detect arguments passed via --with-ping[6]-command (#2908236)
 | 
			
		||||
## X-Git-Url: http://nagiosplug.git.sf.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=commitdiff_plain;h=96a23a4c117a9c2665ca09e5964eacf028dbcdcf
 | 
			
		||||
##
 | 
			
		||||
## DP: Detect arguments passed via --with-ping[6]-command (SF #2908236 / Debian #555532)
 | 
			
		||||
 | 
			
		||||
@DPATCH@
 | 
			
		||||
diff -urNad nagios-plugins-1.4.14~/configure nagios-plugins-1.4.14/configure
 | 
			
		||||
--- nagios-plugins-1.4.14~/configure	2009-09-16 10:38:03.000000000 +0200
 | 
			
		||||
+++ nagios-plugins-1.4.14/configure	2009-12-05 21:29:08.000000000 +0100
 | 
			
		||||
@@ -26308,10 +26308,17 @@
 | 
			
		||||
 then
 | 
			
		||||
 	{ echo "$as_me:$LINENO: result: (command-line) $with_ping_command" >&5
 | 
			
		||||
 echo "${ECHO_T}(command-line) $with_ping_command" >&6; }
 | 
			
		||||
-	if test -n "$ac_cv_ping_packets_first"
 | 
			
		||||
+	if echo "$with_ping_command" | grep '%d.*%d.*%s' >/dev/null
 | 
			
		||||
 	then
 | 
			
		||||
 		ac_cv_ping_packets_first=yes
 | 
			
		||||
 		ac_cv_ping_has_timeout=yes
 | 
			
		||||
+	elif echo "$with_ping_command" | grep '%d.*%s.*%d' >/dev/null || \
 | 
			
		||||
+	     echo "$with_ping_command" | grep '%s.*%d.*%d' >/dev/null
 | 
			
		||||
+	then
 | 
			
		||||
+		ac_cv_ping_has_timeout=yes
 | 
			
		||||
+	elif echo "$with_ping_command" | grep '%d.*%s' >/dev/null
 | 
			
		||||
+	then
 | 
			
		||||
+		ac_cv_ping_packets_first=yes
 | 
			
		||||
 	fi
 | 
			
		||||
 
 | 
			
		||||
 elif [ "z$ac_cv_uname_s" = "zUnixWare" ] && \
 | 
			
		||||
@@ -26436,7 +26443,15 @@
 | 
			
		||||
 then
 | 
			
		||||
 	{ echo "$as_me:$LINENO: result: (command-line) $with_ping6_command" >&5
 | 
			
		||||
 echo "${ECHO_T}(command-line) $with_ping6_command" >&6; }
 | 
			
		||||
-	if test -n "$ac_cv_ping6_packets_first"
 | 
			
		||||
+	if echo "$with_ping6_command" | grep '%d.*%d.*%s' >/dev/null
 | 
			
		||||
+	then
 | 
			
		||||
+		ac_cv_ping6_packets_first=yes
 | 
			
		||||
+	elif echo "$with_ping6_command" | grep '%d.*%s.*%d' >/dev/null || \
 | 
			
		||||
+	     echo "$with_ping6_command" | grep '%s.*%d.*%d' >/dev/null
 | 
			
		||||
+	then
 | 
			
		||||
+		# Just keep same logic as ping (IPv4) if we ever need ac_cv_ping6_has_timeout
 | 
			
		||||
+		true
 | 
			
		||||
+	elif echo "$with_ping6_command" | grep '%d.*%s' >/dev/null
 | 
			
		||||
 	then
 | 
			
		||||
 		ac_cv_ping6_packets_first=yes
 | 
			
		||||
 	fi
 | 
			
		||||
diff -urNad nagios-plugins-1.4.14~/configure.in nagios-plugins-1.4.14/configure.in
 | 
			
		||||
--- nagios-plugins-1.4.14~/configure.in	2009-09-16 10:20:34.000000000 +0200
 | 
			
		||||
+++ nagios-plugins-1.4.14/configure.in	2009-12-05 21:29:08.000000000 +0100
 | 
			
		||||
@@ -869,10 +869,17 @@
 | 
			
		||||
 if test -n "$with_ping_command"
 | 
			
		||||
 then
 | 
			
		||||
 	AC_MSG_RESULT([(command-line) $with_ping_command])
 | 
			
		||||
-	if test -n "$ac_cv_ping_packets_first"
 | 
			
		||||
+	if echo "$with_ping_command" | grep '%d.*%d.*%s' >/dev/null
 | 
			
		||||
 	then
 | 
			
		||||
 		ac_cv_ping_packets_first=yes
 | 
			
		||||
 		ac_cv_ping_has_timeout=yes
 | 
			
		||||
+	elif echo "$with_ping_command" | grep '%d.*%s.*%d' >/dev/null || \
 | 
			
		||||
+	     echo "$with_ping_command" | grep '%s.*%d.*%d' >/dev/null
 | 
			
		||||
+	then
 | 
			
		||||
+		ac_cv_ping_has_timeout=yes
 | 
			
		||||
+	elif echo "$with_ping_command" | grep '%d.*%s' >/dev/null
 | 
			
		||||
+	then
 | 
			
		||||
+		ac_cv_ping_packets_first=yes
 | 
			
		||||
 	fi
 | 
			
		||||
 
 | 
			
		||||
 elif [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \
 | 
			
		||||
@@ -973,7 +980,15 @@
 | 
			
		||||
 if test -n "$with_ping6_command"
 | 
			
		||||
 then
 | 
			
		||||
 	AC_MSG_RESULT([(command-line) $with_ping6_command])
 | 
			
		||||
-	if test -n "$ac_cv_ping6_packets_first"
 | 
			
		||||
+	if echo "$with_ping6_command" | grep '%d.*%d.*%s' >/dev/null
 | 
			
		||||
+	then
 | 
			
		||||
+		ac_cv_ping6_packets_first=yes
 | 
			
		||||
+	elif echo "$with_ping6_command" | grep '%d.*%s.*%d' >/dev/null || \
 | 
			
		||||
+	     echo "$with_ping6_command" | grep '%s.*%d.*%d' >/dev/null
 | 
			
		||||
+	then
 | 
			
		||||
+		# Just keep same logic as ping (IPv4) if we ever need ac_cv_ping6_has_timeout
 | 
			
		||||
+		true
 | 
			
		||||
+	elif echo "$with_ping6_command" | grep '%d.*%s' >/dev/null
 | 
			
		||||
 	then
 | 
			
		||||
 		ac_cv_ping6_packets_first=yes
 | 
			
		||||
 	fi
 | 
			
		||||
| 
						 | 
				
			
			@ -1,18 +0,0 @@
 | 
			
		|||
#! /bin/sh /usr/share/dpatch/dpatch-run
 | 
			
		||||
## 42_check_linux_raid_fix_r10.dpatch by Matija Nalis <mnalis-debianbug@voyager.hr> 
 | 
			
		||||
##
 | 
			
		||||
## DP: Make Raid10+ working
 | 
			
		||||
 | 
			
		||||
@DPATCH@
 | 
			
		||||
diff -urNad nagios-plugins-1.4.14~/contrib/check_linux_raid.pl nagios-plugins-1.4.14/contrib/check_linux_raid.pl
 | 
			
		||||
--- nagios-plugins-1.4.14~/contrib/check_linux_raid.pl	2009-12-08 19:46:00.000000000 +0100
 | 
			
		||||
+++ nagios-plugins-1.4.14/contrib/check_linux_raid.pl	2009-12-08 19:46:31.000000000 +0100
 | 
			
		||||
@@ -44,7 +44,7 @@
 | 
			
		||||
 
 | 
			
		||||
 my $nextdev;
 | 
			
		||||
 if(defined $ARGV[0]) { $nextdev = shift; }
 | 
			
		||||
-else { $nextdev = "md[0-9]"; }
 | 
			
		||||
+else { $nextdev = "md[0-9]+"; }
 | 
			
		||||
 
 | 
			
		||||
 my $code = "UNKNOWN";
 | 
			
		||||
 my $msg = "";
 | 
			
		||||
| 
						 | 
				
			
			@ -1,17 +0,0 @@
 | 
			
		|||
#! /bin/sh /usr/share/dpatch/dpatch-run
 | 
			
		||||
## 42_check_linux_raid_fix_rebuild.dpatch by Christoph Martin <martin@uni-mainz.de>
 | 
			
		||||
##
 | 
			
		||||
## DP: Return Warning when rebuilding volume
 | 
			
		||||
 | 
			
		||||
@DPATCH@
 | 
			
		||||
diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' nagios-plugins-1.4.14~/contrib/check_linux_raid.pl nagios-plugins-1.4.14/contrib/check_linux_raid.pl
 | 
			
		||||
--- nagios-plugins-1.4.14~/contrib/check_linux_raid.pl	2010-03-19 15:35:24.000000000 +0100
 | 
			
		||||
+++ nagios-plugins-1.4.14/contrib/check_linux_raid.pl	2010-03-19 15:37:35.000000000 +0100
 | 
			
		||||
@@ -64,6 +64,7 @@
 | 
			
		||||
 			} elsif (/recovery = (.*?)\s/) {  
 | 
			
		||||
 				$recovery{$device} = $1;
 | 
			
		||||
 				($finish{$device}) = /finish=(.*?min)/;
 | 
			
		||||
+				$device=undef;
 | 
			
		||||
 			} elsif (/^\s*$/) {
 | 
			
		||||
 				$device=undef;
 | 
			
		||||
 			}
 | 
			
		||||
| 
						 | 
				
			
			@ -1,41 +0,0 @@
 | 
			
		|||
#! /bin/sh /usr/share/dpatch/dpatch-run
 | 
			
		||||
## 43_check_http_large_pages_mleak.dpatch
 | 
			
		||||
## From: Ton Voon <ton.voon@opsera.com>
 | 
			
		||||
## Date: Fri, 26 Feb 2010 12:47:38 +0000
 | 
			
		||||
## Subject: [PATCH] Fix memory leak in check_http for large pages (Jimmy Bergman - #2957455)
 | 
			
		||||
## X-Git-Url: http://repo.or.cz/w/nagiosplugins.git?a=commitdiff_plain;h=6b782ebfd4832c1fe621556bcf894162b8caa8aa
 | 
			
		||||
##
 | 
			
		||||
## DP:  Fix memory leak in check_http for large pages
 | 
			
		||||
 | 
			
		||||
@DPATCH@
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 plugins/check_http.c |    5 ++++-
 | 
			
		||||
 1 file changed, 4 insertions(+), 1 deletions(-)
 | 
			
		||||
 | 
			
		||||
diff --git a/plugins/check_http.c b/plugins/check_http.c
 | 
			
		||||
index 0a4b12b..5cdf144 100644
 | 
			
		||||
--- a/plugins/check_http.c
 | 
			
		||||
+++ b/plugins/check_http.c
 | 
			
		||||
@@ -784,6 +784,7 @@ check_http (void)
 | 
			
		||||
   int i = 0;
 | 
			
		||||
   size_t pagesize = 0;
 | 
			
		||||
   char *full_page;
 | 
			
		||||
+  char *full_page_new;
 | 
			
		||||
   char *buf;
 | 
			
		||||
   char *pos;
 | 
			
		||||
   long microsec;
 | 
			
		||||
@@ -871,7 +872,9 @@ check_http (void)
 | 
			
		||||
   full_page = strdup("");
 | 
			
		||||
   while ((i = my_recv (buffer, MAX_INPUT_BUFFER-1)) > 0) {
 | 
			
		||||
     buffer[i] = '\0';
 | 
			
		||||
-    asprintf (&full_page, "%s%s", full_page, buffer);
 | 
			
		||||
+    asprintf (&full_page_new, "%s%s", full_page, buffer);
 | 
			
		||||
+    free (full_page);
 | 
			
		||||
+    full_page = full_page_new;
 | 
			
		||||
     pagesize += i;
 | 
			
		||||
 
 | 
			
		||||
                 if (no_body && document_headers_done (full_page)) {
 | 
			
		||||
-- 
 | 
			
		||||
1.6.3
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										41
									
								
								debian/patches/44_check_snmp_perfdata.dpatch
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										41
									
								
								debian/patches/44_check_snmp_perfdata.dpatch
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -1,41 +0,0 @@
 | 
			
		|||
#! /bin/sh /usr/share/dpatch/dpatch-run
 | 
			
		||||
## 44_check_snmp_perfdata.dpatch
 | 
			
		||||
## From: Thomas Guyot-Sionnest <dermoth@aei.ca>
 | 
			
		||||
## Date: Wed, 31 Mar 2010 06:45:45 +0000 (02:45 -0400)
 | 
			
		||||
## Subject: [PATCH] Fix regression introduced in #1867716 where partially valid performance strings would not be printed anymore
 | 
			
		||||
## X-Git-Url: http://repo.or.cz/w/nagiosplugins.git/blobdiff/e7e9a99117d7e0a7189393b3a04366393620efab..e5690e3ddaebdd98bfd96c2303453e4e0d7ed318:/plugins/check_snmp.c
 | 
			
		||||
##
 | 
			
		||||
## DP: Fix regression introduced in #1867716
 | 
			
		||||
 | 
			
		||||
@DPATCH@
 | 
			
		||||
 | 
			
		||||
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c
 | 
			
		||||
index dcb3138..fdb5819 100644
 | 
			
		||||
--- a/plugins/check_snmp.c
 | 
			
		||||
+++ b/plugins/check_snmp.c
 | 
			
		||||
@@ -117,7 +117,7 @@ int needmibs = FALSE;
 | 
			
		||||
 int
 | 
			
		||||
 main (int argc, char **argv)
 | 
			
		||||
 {
 | 
			
		||||
-	int i;
 | 
			
		||||
+	int i, len;
 | 
			
		||||
 	int iresult = STATE_UNKNOWN;
 | 
			
		||||
 	int result = STATE_UNKNOWN;
 | 
			
		||||
 	int return_code = 0;
 | 
			
		||||
@@ -351,10 +351,14 @@ main (int argc, char **argv)
 | 
			
		||||
 		if (nunits > (size_t)0 && (size_t)i < nunits && unitv[i] != NULL)
 | 
			
		||||
 			asprintf (&outbuff, "%s %s", outbuff, unitv[i]);
 | 
			
		||||
 
 | 
			
		||||
-		if (is_numeric(show)) {
 | 
			
		||||
+		/* Write perfdata with whatever can be parsed by strtod, if possible */
 | 
			
		||||
+		ptr = NULL;
 | 
			
		||||
+		strtod(show, &ptr);
 | 
			
		||||
+		if (ptr > show) {
 | 
			
		||||
 			strncat(perfstr, oidname, sizeof(perfstr)-strlen(perfstr)-1);
 | 
			
		||||
 			strncat(perfstr, "=", sizeof(perfstr)-strlen(perfstr)-1);
 | 
			
		||||
-			strncat(perfstr, show, sizeof(perfstr)-strlen(perfstr)-1);
 | 
			
		||||
+			len = sizeof(perfstr)-strlen(perfstr)-1;
 | 
			
		||||
+			strncat(perfstr, show, len>ptr-show ? ptr-show : len);
 | 
			
		||||
 
 | 
			
		||||
 			if (type)
 | 
			
		||||
 				strncat(perfstr, type, sizeof(perfstr)-strlen(perfstr)-1);
 | 
			
		||||
							
								
								
									
										77
									
								
								debian/patches/45_check_http_sni_optional.dpatch
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										77
									
								
								debian/patches/45_check_http_sni_optional.dpatch
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -1,77 +0,0 @@
 | 
			
		|||
#! /bin/sh /usr/share/dpatch/dpatch-run
 | 
			
		||||
## 45_check_http_sni_optional.dpatch
 | 
			
		||||
## From: Thomas Guyot-Sionnest <dermoth@aei.ca>
 | 
			
		||||
## Date: Date:   Mon Apr 5 21:06:22 2010 -0400
 | 
			
		||||
## Subject: [PATCH] Fix regression in check_http ssl checks on some servers, making SNI an option
 | 
			
		||||
## X-Git-Url: http://repo.or.cz/w/nagiosplugins.git/blobdiff/e5690e3ddaebdd98bfd96c2303453e4e0d7ed318..fe1c6106d9fb45e62b93443145f902a3449641aa:/plugins/check_http.c
 | 
			
		||||
##
 | 
			
		||||
## DP: Fix regression in check_http ssl checks
 | 
			
		||||
 | 
			
		||||
@DPATCH@
 | 
			
		||||
 | 
			
		||||
diff --git a/plugins/check_http.c b/plugins/check_http.c
 | 
			
		||||
index 5cdf144..536b400 100644
 | 
			
		||||
--- a/plugins/check_http.c
 | 
			
		||||
+++ b/plugins/check_http.c
 | 
			
		||||
@@ -112,6 +112,7 @@ int http_opt_headers_count = 0;
 | 
			
		||||
 int onredirect = STATE_OK;
 | 
			
		||||
 int followsticky = STICKY_NONE;
 | 
			
		||||
 int use_ssl = FALSE;
 | 
			
		||||
+int use_sni = FALSE;
 | 
			
		||||
 int verbose = FALSE;
 | 
			
		||||
 int sd;
 | 
			
		||||
 int min_page_len = 0;
 | 
			
		||||
@@ -178,7 +179,8 @@ process_arguments (int argc, char **argv)
 | 
			
		||||
   char *p;
 | 
			
		||||
 
 | 
			
		||||
   enum {
 | 
			
		||||
-    INVERT_REGEX = CHAR_MAX + 1
 | 
			
		||||
+    INVERT_REGEX = CHAR_MAX + 1,
 | 
			
		||||
+    SNI_OPTION
 | 
			
		||||
   };
 | 
			
		||||
 
 | 
			
		||||
   int option = 0;
 | 
			
		||||
@@ -187,6 +189,7 @@ process_arguments (int argc, char **argv)
 | 
			
		||||
     {"link", no_argument, 0, 'L'},
 | 
			
		||||
     {"nohtml", no_argument, 0, 'n'},
 | 
			
		||||
     {"ssl", no_argument, 0, 'S'},
 | 
			
		||||
+    {"sni", no_argument, 0, SNI_OPTION},
 | 
			
		||||
     {"post", required_argument, 0, 'P'},
 | 
			
		||||
     {"method", required_argument, 0, 'j'},
 | 
			
		||||
     {"IP-address", required_argument, 0, 'I'},
 | 
			
		||||
@@ -304,6 +307,9 @@ process_arguments (int argc, char **argv)
 | 
			
		||||
       if (specify_port == FALSE)
 | 
			
		||||
         server_port = HTTPS_PORT;
 | 
			
		||||
       break;
 | 
			
		||||
+    case SNI_OPTION:
 | 
			
		||||
+      use_sni = TRUE;
 | 
			
		||||
+      break;
 | 
			
		||||
     case 'f': /* onredirect */
 | 
			
		||||
       if (!strcmp (optarg, "stickyport"))
 | 
			
		||||
         onredirect = STATE_DEPENDENT, followsticky = STICKY_HOST|STICKY_PORT;
 | 
			
		||||
@@ -797,7 +803,7 @@ check_http (void)
 | 
			
		||||
     die (STATE_CRITICAL, _("HTTP CRITICAL - Unable to open TCP socket\n"));
 | 
			
		||||
 #ifdef HAVE_SSL
 | 
			
		||||
   if (use_ssl == TRUE) {
 | 
			
		||||
-    np_net_ssl_init_with_hostname(sd, host_name);
 | 
			
		||||
+    np_net_ssl_init_with_hostname(sd, (use_sni ? host_name : NULL));
 | 
			
		||||
     if (check_cert == TRUE) {
 | 
			
		||||
       result = np_net_ssl_check_cert(days_till_exp);
 | 
			
		||||
       np_net_ssl_cleanup();
 | 
			
		||||
@@ -1323,6 +1329,8 @@ print_help (void)
 | 
			
		||||
 #ifdef HAVE_SSL
 | 
			
		||||
   printf (" %s\n", "-S, --ssl");
 | 
			
		||||
   printf ("   %s\n", _("Connect via SSL. Port defaults to 443"));
 | 
			
		||||
+  printf (" %s\n", "--sni");
 | 
			
		||||
+  printf ("   %s\n", _("Enable SSL/TLS hostname extension support (SNI)"));
 | 
			
		||||
   printf (" %s\n", "-C, --certificate=INTEGER");
 | 
			
		||||
   printf ("   %s\n", _("Minimum number of days a certificate has to be valid. Port defaults to 443"));
 | 
			
		||||
   printf ("   %s\n", _("(when this option is used the URL is not checked.)\n"));
 | 
			
		||||
@@ -1427,5 +1435,6 @@ print_usage (void)
 | 
			
		||||
   printf ("       [-b proxy_auth] [-f <ok|warning|critcal|follow|sticky|stickyport>]\n");
 | 
			
		||||
   printf ("       [-e <expect>] [-s string] [-l] [-r <regex> | -R <case-insensitive regex>]\n");
 | 
			
		||||
   printf ("       [-P string] [-m <min_pg_size>:<max_pg_size>] [-4|-6] [-N] [-M <age>]\n");
 | 
			
		||||
-  printf ("       [-A string] [-k string] [-S] [-C <age>] [-T <content-type>] [-j method]\n");
 | 
			
		||||
+  printf ("       [-A string] [-k string] [-S] [--sni] [-C <age>] [-T <content-type>]\n");
 | 
			
		||||
+  printf ("       [-j method]\n");
 | 
			
		||||
 }
 | 
			
		||||
							
								
								
									
										29
									
								
								debian/patches/46_check_disk_fix_help.dpatch
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										29
									
								
								debian/patches/46_check_disk_fix_help.dpatch
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -1,29 +0,0 @@
 | 
			
		|||
#! /bin/sh /usr/share/dpatch/dpatch-run
 | 
			
		||||
## 45_check_http_sni_optional.dpatch
 | 
			
		||||
## From: Ton Voon <ton.voon@opsera.com>
 | 
			
		||||
## Date: Wed, 7 Jul 2010 11:03:24 +0100
 | 
			
		||||
## Subject: [PATCH] Fix examples in check_disk, where it implied was possible to suffix unit values to warn/crit parameters
 | 
			
		||||
## X-Git-Url: http://nagiosplug.git.sourceforge.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=patch;h=02f9207ebe3a5ae5b35b4b69be1f3bf95ab5a220
 | 
			
		||||
##
 | 
			
		||||
## DP: Fix examples in check_disk
 | 
			
		||||
 | 
			
		||||
@DPATCH@
 | 
			
		||||
 | 
			
		||||
diff --git a/plugins/check_disk.c b/plugins/check_disk.c
 | 
			
		||||
index 4913625..851d800 100644
 | 
			
		||||
--- a/plugins/check_disk.c
 | 
			
		||||
+++ b/plugins/check_disk.c
 | 
			
		||||
@@ -963,10 +963,10 @@ print_help (void)
 | 
			
		||||
   printf ("%s\n", _("Examples:"));
 | 
			
		||||
   printf (" %s\n", "check_disk -w 10% -c 5% -p /tmp -p /var -C -w 100000 -c 50000 -p /");
 | 
			
		||||
   printf ("    %s\n", _("Checks /tmp and /var at 10% and 5%, and / at 100MB and 50MB"));
 | 
			
		||||
-  printf (" %s\n", "check_disk -w 100M -c 50M -C -w 1000M -c 500M -g sidDATA -r '^/oracle/SID/data.*$'");
 | 
			
		||||
+  printf (" %s\n", "check_disk -w 100 -c 50 -C -w 1000 -c 500 -g sidDATA -r '^/oracle/SID/data.*$'");
 | 
			
		||||
   printf ("    %s\n", _("Checks all filesystems not matching -r at 100M and 50M. The fs matching the -r regex"));
 | 
			
		||||
   printf ("    %s\n", _("are grouped which means the freespace thresholds are applied to all disks together"));
 | 
			
		||||
-  printf (" %s\n", "check_disk -w 100M -c 50M -C -w 1000M -c 500M -p /foo -C -w 5% -c 3% -p /bar");
 | 
			
		||||
+  printf (" %s\n", "check_disk -w 100 -c 50 -C -w 1000 -c 500 -p /foo -C -w 5% -c 3% -p /bar");
 | 
			
		||||
   printf ("    %s\n", _("Checks /foo for 1000M/500M and /bar for 5/3%. All remaining volumes use 100M/50M"));
 | 
			
		||||
 
 | 
			
		||||
   printf (UT_SUPPORT);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue