Droping patches imported from upstream maint branch

This commit is contained in:
Jan Wagner 2015-10-12 15:57:37 +02:00
parent cc58cc3f65
commit 9e076d8641
6 changed files with 5 additions and 292 deletions

View file

@ -1,26 +0,0 @@
From 4e786f83decca053c98293fc4a4a555e4d247c1a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Courr=C3=A8ges-Anglas?= <jca@wxcvbn.org>
Date: Sat, 25 Jul 2015 20:02:14 -0600
Subject: [PATCH] sslutils: Check if OpenSSL supports SSLv3.
---
plugins/sslutils.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/plugins/sslutils.c b/plugins/sslutils.c
index d0ae474..4933dd0 100644
--- a/plugins/sslutils.c
+++ b/plugins/sslutils.c
@@ -66,7 +66,12 @@ int np_net_ssl_init_with_hostname_version_and_cert(int sd, char *host_name, int
#endif
break;
case 3: /* SSLv3 protocol */
+#if defined(OPENSSL_NO_SSL3)
+ printf(("%s\n", _("CRITICAL - SSL protocol version 3 is not supported by your SSL library.")));
+ return STATE_CRITICAL;
+#else
method = SSLv3_client_method();
+#endif
break;
default: /* Unsupported */
printf("%s\n", _("CRITICAL - Unsupported SSL protocol version."));

View file

@ -1,107 +0,0 @@
From 466cb79e5224327c29fc6b84a1cec99c2b190c5a Mon Sep 17 00:00:00 2001
From: Holger Weiss <holger@zedat.fu-berlin.de>
Date: Fri, 2 Oct 2015 12:18:13 +0200
Subject: [PATCH] check_dhcp: Fix option parsing
The call_getopt() function didn't always return the correct number of
processed arguments. However, since check_dhcp doesn't support
non-option arguments, the caller doesn't need this number anyway.
Closes #1345.
---
plugins-root/check_dhcp.c | 43 ++++++++++++-------------------------------
1 file changed, 12 insertions(+), 31 deletions(-)
diff --git a/plugins-root/check_dhcp.c b/plugins-root/check_dhcp.c
index 5508d5f..25d4ed4 100644
--- a/plugins-root/check_dhcp.c
+++ b/plugins-root/check_dhcp.c
@@ -229,7 +229,7 @@ struct in_addr requested_address;
int process_arguments(int, char **);
int call_getopt(int, char **);
-int validate_arguments(void);
+int validate_arguments(int, int);
void print_usage(void);
void print_help(void);
@@ -1059,29 +1059,19 @@ int get_results(void){
/* process command-line arguments */
int process_arguments(int argc, char **argv){
- int c;
+ int arg_index;
if(argc<1)
return ERROR;
- c=0;
- while((c+=(call_getopt(argc-c,&argv[c])))<argc){
-
- /*
- if(is_option(argv[c]))
- continue;
- */
- }
-
- return validate_arguments();
+ arg_index = call_getopt(argc,argv);
+ return validate_arguments(argc,arg_index);
}
int call_getopt(int argc, char **argv){
- int c=0;
- int i=0;
-
+ extern int optind;
int option_index = 0;
static struct option long_options[] =
{
@@ -1098,25 +1088,14 @@ int call_getopt(int argc, char **argv){
};
while(1){
- c=getopt_long(argc,argv,"+hVvt:s:r:t:i:m:u",long_options,&option_index);
+ int c=0;
- i++;
+ c=getopt_long(argc,argv,"+hVvt:s:r:t:i:m:u",long_options,&option_index);
if(c==-1||c==EOF||c==1)
break;
switch(c){
- case 'w':
- case 'r':
- case 't':
- case 'i':
- i++;
- break;
- default:
- break;
- }
-
- switch(c){
case 's': /* DHCP server address */
resolve_host(optarg,&dhcp_ip);
@@ -1181,12 +1160,14 @@ int call_getopt(int argc, char **argv){
break;
}
}
-
- return i;
+ return optind;
}
-int validate_arguments(void){
+int validate_arguments(int argc, int arg_index){
+
+ if(argc-optind > 0)
+ usage(_("Got unexpected non-option argument"));
return OK;
}

View file

@ -1,47 +0,0 @@
From 0b8041226446572eba0f82316716622f57d715e0 Mon Sep 17 00:00:00 2001
From: Louis Sautier <sautier.louis@gmail.com>
Date: Fri, 27 Mar 2015 13:16:42 +0100
Subject: [PATCH] Fix incorrect performance data thresholds
Closes #1330
---
plugins/check_ups.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/plugins/check_ups.c b/plugins/check_ups.c
index 099881d..fd8c2d1 100644
--- a/plugins/check_ups.c
+++ b/plugins/check_ups.c
@@ -242,8 +242,8 @@ main (int argc, char **argv)
}
xasprintf (&data, "%s %s", data,
perfdata ("battery", (long)ups_battery_percent, "%",
- check_warn, (long)(1000*warning_value),
- check_crit, (long)(1000*critical_value),
+ check_warn, (long)(warning_value),
+ check_crit, (long)(critical_value),
TRUE, 0, TRUE, 100));
} else {
xasprintf (&data, "%s %s", data,
@@ -271,8 +271,8 @@ main (int argc, char **argv)
}
xasprintf (&data, "%s %s", data,
perfdata ("load", (long)ups_load_percent, "%",
- check_warn, (long)(1000*warning_value),
- check_crit, (long)(1000*critical_value),
+ check_warn, (long)(warning_value),
+ check_crit, (long)(critical_value),
TRUE, 0, TRUE, 100));
} else {
xasprintf (&data, "%s %s", data,
@@ -308,8 +308,8 @@ main (int argc, char **argv)
}
xasprintf (&data, "%s %s", data,
perfdata ("temp", (long)ups_temperature, tunits,
- check_warn, (long)(1000*warning_value),
- check_crit, (long)(1000*critical_value),
+ check_warn, (long)(warning_value),
+ check_crit, (long)(critical_value),
TRUE, 0, FALSE, 0));
} else {
xasprintf (&data, "%s %s", data,

View file

@ -1,58 +0,0 @@
From 6ba26122f4746a7e16272b1b9546342820400a78 Mon Sep 17 00:00:00 2001
From: Oliver Skibbe <oliskibbe@gmail.com>
Date: Fri, 6 Mar 2015 11:51:45 +0100
Subject: [PATCH 1/2] check_snmp.c: switched DEFAULT_TIMEOUT to
DEFAULT_SOCKET_TIMEOUT (provided by utils.h), already used by help
description, see issue #1318
---
plugins/check_snmp.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c
index 2c62a23..6d7ec6d 100644
--- a/plugins/check_snmp.c
+++ b/plugins/check_snmp.c
@@ -41,7 +41,6 @@ const char *email = "devel@monitoring-plugins.org";
#define DEFAULT_PORT "161"
#define DEFAULT_MIBLIST "ALL"
#define DEFAULT_PROTOCOL "1"
-#define DEFAULT_TIMEOUT 1
#define DEFAULT_RETRIES 5
#define DEFAULT_AUTH_PROTOCOL "MD5"
#define DEFAULT_PRIV_PROTOCOL "DES"
@@ -224,7 +223,7 @@ main (int argc, char **argv)
outbuff = strdup ("");
delimiter = strdup (" = ");
output_delim = strdup (DEFAULT_OUTPUT_DELIMITER);
- timeout_interval = DEFAULT_TIMEOUT;
+ timeout_interval = DEFAULT_SOCKET_TIMEOUT;
retries = DEFAULT_RETRIES;
np_init( (char *) progname, argc, argv );
From 2d677b19ed34ff8171dbf07fb7744e560737d143 Mon Sep 17 00:00:00 2001
From: Oliver Skibbe <oliskibbe@gmail.com>
Date: Fri, 6 Mar 2015 12:43:34 +0100
Subject: [PATCH 2/2] check_snmp: modified tests
(Closes #1325)
---
plugins/t/check_snmp.t | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/plugins/t/check_snmp.t b/plugins/t/check_snmp.t
index 2d6c44a..aefd872 100644
--- a/plugins/t/check_snmp.t
+++ b/plugins/t/check_snmp.t
@@ -166,8 +166,8 @@ SKIP: {
SKIP: {
skip "no non responsive host defined", 2 if ( ! $host_nonresponsive );
$res = NPTest->testCmd( "./check_snmp -H $host_nonresponsive -C np_foobar -o system.sysUpTime.0 -w 1: -c 1:");
- cmp_ok( $res->return_code, '==', 3, "Exit UNKNOWN with non responsive host" );
- like($res->output, '/External command error: Timeout: No Response from /', "String matches timeout problem");
+ cmp_ok( $res->return_code, '==', 2, "Exit CRITICAL with non responsive host" );
+ like($res->output, '/Plugin timed out while executing system call/', "String matches timeout problem");
}
SKIP: {

View file

@ -1,49 +0,0 @@
From 0a406d8dcec816a94d283b872755b28f219bea2e Mon Sep 17 00:00:00 2001
From: Sebastian Herbszt <herbszt@gmx.de>
Date: Sat, 20 Dec 2014 20:58:22 +0100
Subject: [PATCH 1/2] sslutils: remove superfluous parenthesis
Remove superfluous parenthesis.
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
---
plugins/sslutils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/sslutils.c b/plugins/sslutils.c
index 4933dd0..494a1ec 100644
--- a/plugins/sslutils.c
+++ b/plugins/sslutils.c
@@ -59,7 +59,7 @@ int np_net_ssl_init_with_hostname_version_and_cert(int sd, char *host_name, int
break;
case 2: /* SSLv2 protocol */
#if defined(USE_GNUTLS) || defined(OPENSSL_NO_SSL2)
- printf(("%s\n", _("CRITICAL - SSL protocol version 2 is not supported by your SSL library.")));
+ printf("%s\n", _("CRITICAL - SSL protocol version 2 is not supported by your SSL library."));
return STATE_CRITICAL;
#else
method = SSLv2_client_method();
From 8e661a3bd6c6892ed4db926eab769c167b0e9091 Mon Sep 17 00:00:00 2001
From: Jan Wagner <waja@cyconet.org>
Date: Sun, 4 Oct 2015 15:11:40 +0200
Subject: [PATCH 2/2] sslutils: Remove superfluous parenthesis for sslv3
function too
---
plugins/sslutils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/sslutils.c b/plugins/sslutils.c
index 494a1ec..f34c3d7 100644
--- a/plugins/sslutils.c
+++ b/plugins/sslutils.c
@@ -67,7 +67,7 @@ int np_net_ssl_init_with_hostname_version_and_cert(int sd, char *host_name, int
break;
case 3: /* SSLv3 protocol */
#if defined(OPENSSL_NO_SSL3)
- printf(("%s\n", _("CRITICAL - SSL protocol version 3 is not supported by your SSL library.")));
+ printf("%s\n", _("CRITICAL - SSL protocol version 3 is not supported by your SSL library."));
return STATE_CRITICAL;
#else
method = SSLv3_client_method();

10
debian/patches/series vendored
View file

@ -1,10 +1,10 @@
02_check_icmp_links
# commited upstream
10_sslutils_checksslv3
11_check_dhcp_parsing_option
12_check_ups_perf_data_hresholds
13_check_snmp_timeout
14_sslutils_superfluous_parenthesis
#10_sslutils_checksslv3
#11_check_dhcp_parsing_option
#12_check_ups_perf_data_hresholds
#13_check_snmp_timeout
#14_sslutils_superfluous_parenthesis
15_check_smtp_expect
16_check_smtp_quit
17_check_smtp_forcetls_on_cert