diff options
-rw-r--r-- | plugins/check_http.c | 4 | ||||
-rw-r--r-- | plugins/check_snmp.c | 20 |
2 files changed, 14 insertions, 10 deletions
diff --git a/plugins/check_http.c b/plugins/check_http.c index 433c28e3..3175f6cb 100644 --- a/plugins/check_http.c +++ b/plugins/check_http.c | |||
@@ -1400,6 +1400,10 @@ print_help (void) | |||
1400 | printf (" %s\n", _("serve content (optionally within a specified time) or whether the X509 ")); | 1400 | printf (" %s\n", _("serve content (optionally within a specified time) or whether the X509 ")); |
1401 | printf (" %s\n", _("certificate is still valid for the specified number of days.")); | 1401 | printf (" %s\n", _("certificate is still valid for the specified number of days.")); |
1402 | printf ("\n"); | 1402 | printf ("\n"); |
1403 | printf (" %s\n", _("Please note that this plugin does not check if the presented server")); | ||
1404 | printf (" %s\n", _("certificate matches the hostname of the server, or if the certificate")); | ||
1405 | printf (" %s\n", _("has a valid chain of trust to one of the locally installed CAs.")); | ||
1406 | printf ("\n"); | ||
1403 | printf ("%s\n", _("Examples:")); | 1407 | printf ("%s\n", _("Examples:")); |
1404 | printf (" %s\n\n", "CHECK CONTENT: check_http -w 5 -c 10 --ssl -H www.verisign.com"); | 1408 | printf (" %s\n\n", "CHECK CONTENT: check_http -w 5 -c 10 --ssl -H www.verisign.com"); |
1405 | printf (" %s\n", _("When the 'www.verisign.com' server returns its content within 5 seconds,")); | 1409 | printf (" %s\n", _("When the 'www.verisign.com' server returns its content within 5 seconds,")); |
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c index d79da8cf..4cd38051 100644 --- a/plugins/check_snmp.c +++ b/plugins/check_snmp.c | |||
@@ -740,7 +740,7 @@ process_arguments (int argc, char **argv) | |||
740 | labels[nlabels - 1] = optarg; | 740 | labels[nlabels - 1] = optarg; |
741 | ptr = thisarg (optarg); | 741 | ptr = thisarg (optarg); |
742 | labels[nlabels - 1] = ptr; | 742 | labels[nlabels - 1] = ptr; |
743 | if (strstr (ptr, "'") == ptr) | 743 | if (ptr[0] == '\'') |
744 | labels[nlabels - 1] = ptr + 1; | 744 | labels[nlabels - 1] = ptr + 1; |
745 | while (ptr && (ptr = nextarg (ptr))) { | 745 | while (ptr && (ptr = nextarg (ptr))) { |
746 | if (nlabels >= labels_size) { | 746 | if (nlabels >= labels_size) { |
@@ -749,9 +749,9 @@ process_arguments (int argc, char **argv) | |||
749 | if (labels == NULL) | 749 | if (labels == NULL) |
750 | die (STATE_UNKNOWN, _("Could not reallocate labels\n")); | 750 | die (STATE_UNKNOWN, _("Could not reallocate labels\n")); |
751 | } | 751 | } |
752 | labels++; | 752 | nlabels++; |
753 | ptr = thisarg (ptr); | 753 | ptr = thisarg (ptr); |
754 | if (strstr (ptr, "'") == ptr) | 754 | if (ptr[0] == '\'') |
755 | labels[nlabels - 1] = ptr + 1; | 755 | labels[nlabels - 1] = ptr + 1; |
756 | else | 756 | else |
757 | labels[nlabels - 1] = ptr; | 757 | labels[nlabels - 1] = ptr; |
@@ -769,7 +769,7 @@ process_arguments (int argc, char **argv) | |||
769 | unitv[nunits - 1] = optarg; | 769 | unitv[nunits - 1] = optarg; |
770 | ptr = thisarg (optarg); | 770 | ptr = thisarg (optarg); |
771 | unitv[nunits - 1] = ptr; | 771 | unitv[nunits - 1] = ptr; |
772 | if (strstr (ptr, "'") == ptr) | 772 | if (ptr[0] == '\'') |
773 | unitv[nunits - 1] = ptr + 1; | 773 | unitv[nunits - 1] = ptr + 1; |
774 | while (ptr && (ptr = nextarg (ptr))) { | 774 | while (ptr && (ptr = nextarg (ptr))) { |
775 | if (nunits >= unitv_size) { | 775 | if (nunits >= unitv_size) { |
@@ -780,7 +780,7 @@ process_arguments (int argc, char **argv) | |||
780 | } | 780 | } |
781 | nunits++; | 781 | nunits++; |
782 | ptr = thisarg (ptr); | 782 | ptr = thisarg (ptr); |
783 | if (strstr (ptr, "'") == ptr) | 783 | if (ptr[0] == '\'') |
784 | unitv[nunits - 1] = ptr + 1; | 784 | unitv[nunits - 1] = ptr + 1; |
785 | else | 785 | else |
786 | unitv[nunits - 1] = ptr; | 786 | unitv[nunits - 1] = ptr; |
@@ -935,7 +935,7 @@ char * | |||
935 | thisarg (char *str) | 935 | thisarg (char *str) |
936 | { | 936 | { |
937 | str += strspn (str, " \t\r\n"); /* trim any leading whitespace */ | 937 | str += strspn (str, " \t\r\n"); /* trim any leading whitespace */ |
938 | if (strstr (str, "'") == str) { /* handle SIMPLE quoted strings */ | 938 | if (str[0] == '\'') { /* handle SIMPLE quoted strings */ |
939 | if (strlen (str) == 1 || !strstr (str + 1, "'")) | 939 | if (strlen (str) == 1 || !strstr (str + 1, "'")) |
940 | die (STATE_UNKNOWN, _("Unbalanced quotes\n")); | 940 | die (STATE_UNKNOWN, _("Unbalanced quotes\n")); |
941 | } | 941 | } |
@@ -951,7 +951,7 @@ thisarg (char *str) | |||
951 | char * | 951 | char * |
952 | nextarg (char *str) | 952 | nextarg (char *str) |
953 | { | 953 | { |
954 | if (strstr (str, "'") == str) { | 954 | if (str[0] == '\'') { |
955 | str[0] = 0; | 955 | str[0] = 0; |
956 | if (strlen (str) > 1) { | 956 | if (strlen (str) > 1) { |
957 | str = strstr (str + 1, "'"); | 957 | str = strstr (str + 1, "'"); |
@@ -961,7 +961,7 @@ nextarg (char *str) | |||
961 | return NULL; | 961 | return NULL; |
962 | } | 962 | } |
963 | } | 963 | } |
964 | if (strstr (str, ",") == str) { | 964 | if (str[0] == ',') { |
965 | str[0] = 0; | 965 | str[0] = 0; |
966 | if (strlen (str) > 1) { | 966 | if (strlen (str) > 1) { |
967 | return (++str); | 967 | return (++str); |
@@ -1072,8 +1072,8 @@ print_help (void) | |||
1072 | 1072 | ||
1073 | printf ("\n"); | 1073 | printf ("\n"); |
1074 | printf ("%s\n", _("Notes:")); | 1074 | printf ("%s\n", _("Notes:")); |
1075 | printf (" %s\n", _("- Multiple OIDs may be indicated by a comma or space-delimited list (lists with")); | 1075 | printf (" %s\n", _("- Multiple OIDs (and labels) may be indicated by a comma or space-delimited ")); |
1076 | printf (" %s %i %s\n", _("internal spaces must be quoted). Maximum:"), MAX_OIDS, _("OIDs.")); | 1076 | printf (" %s %i %s\n", _("list (lists with internal spaces must be quoted). Maximum:"), MAX_OIDS, _("OIDs.")); |
1077 | 1077 | ||
1078 | printf(" -%s", UT_THRESHOLDS_NOTES); | 1078 | printf(" -%s", UT_THRESHOLDS_NOTES); |
1079 | 1079 | ||