diff options
Diffstat (limited to 'web/attachments/37326-nagiosplugins-updates-20021210.diff')
-rw-r--r-- | web/attachments/37326-nagiosplugins-updates-20021210.diff | 180 |
1 files changed, 180 insertions, 0 deletions
diff --git a/web/attachments/37326-nagiosplugins-updates-20021210.diff b/web/attachments/37326-nagiosplugins-updates-20021210.diff new file mode 100644 index 0000000..a8f81ad --- /dev/null +++ b/web/attachments/37326-nagiosplugins-updates-20021210.diff | |||
@@ -0,0 +1,180 @@ | |||
1 | Index: check_dig.c | ||
2 | =================================================================== | ||
3 | RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_dig.c,v | ||
4 | retrieving revision 1.7 | ||
5 | diff -u -r1.7 check_dig.c | ||
6 | --- check_dig.c 21 Nov 2002 12:40:58 -0000 1.7 | ||
7 | +++ check_dig.c 11 Dec 2002 02:40:59 -0000 | ||
8 | @@ -57,7 +57,7 @@ | ||
9 | usage ("Could not parse arguments\n"); | ||
10 | |||
11 | /* get the command to run */ | ||
12 | - asprintf (&command_line, "%s @%s %s", PATH_TO_DIG, dns_server, query_address); | ||
13 | + asprintf (&command_line, "%s -t any @%s %s", PATH_TO_DIG, dns_server, query_address); | ||
14 | |||
15 | alarm (timeout_interval); | ||
16 | time (&start_time); | ||
17 | Index: check_dns.c | ||
18 | =================================================================== | ||
19 | RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_dns.c,v | ||
20 | retrieving revision 1.5 | ||
21 | diff -u -r1.5 check_dns.c | ||
22 | --- check_dns.c 14 Nov 2002 02:26:34 -0000 1.5 | ||
23 | +++ check_dns.c 11 Dec 2002 02:40:59 -0000 | ||
24 | @@ -308,7 +308,7 @@ | ||
25 | timeout_interval = atoi (optarg); | ||
26 | break; | ||
27 | case 'H': /* hostname */ | ||
28 | - if (is_host (optarg) == FALSE) { | ||
29 | + if ((is_host (optarg)) == FALSE) { | ||
30 | printf ("Invalid host name/address\n\n"); | ||
31 | print_usage (); | ||
32 | exit (STATE_UNKNOWN); | ||
33 | @@ -318,7 +318,7 @@ | ||
34 | strcpy (query_address, optarg); | ||
35 | break; | ||
36 | case 's': /* server name */ | ||
37 | - if (is_host (optarg) == FALSE) { | ||
38 | + if ((is_host (optarg)) == FALSE) { | ||
39 | printf ("Invalid server name/address\n\n"); | ||
40 | print_usage (); | ||
41 | exit (STATE_UNKNOWN); | ||
42 | @@ -328,7 +328,7 @@ | ||
43 | strcpy (dns_server, optarg); | ||
44 | break; | ||
45 | case 'r': /* reverse server name */ | ||
46 | - if (is_host (optarg) == FALSE) { | ||
47 | + if ((is_host (optarg)) == FALSE) { | ||
48 | printf ("Invalid host name/address\n\n"); | ||
49 | print_usage (); | ||
50 | exit (STATE_UNKNOWN); | ||
51 | @@ -338,7 +338,7 @@ | ||
52 | strcpy (ptr_server, optarg); | ||
53 | break; | ||
54 | case 'a': /* expected address */ | ||
55 | - if (is_dotted_quad (optarg) == FALSE) { | ||
56 | + if ((is_ipv4_addr (optarg)) == FALSE) { | ||
57 | printf ("Invalid expected address\n\n"); | ||
58 | print_usage (); | ||
59 | exit (STATE_UNKNOWN); | ||
60 | @@ -352,8 +352,8 @@ | ||
61 | } | ||
62 | |||
63 | c = optind; | ||
64 | - if (query_address[0] == 0) { | ||
65 | - if (is_host (argv[c]) == FALSE) { | ||
66 | + if (query_address == NULL) { | ||
67 | + if ((is_host (argv[c])) == FALSE) { | ||
68 | printf ("Invalid name/address: %s\n\n", argv[c]); | ||
69 | return ERROR; | ||
70 | } | ||
71 | @@ -362,8 +362,8 @@ | ||
72 | strcpy (query_address, argv[c++]); | ||
73 | } | ||
74 | |||
75 | - if (dns_server[0] == 0) { | ||
76 | - if (is_host (argv[c]) == FALSE) { | ||
77 | + if (dns_server == NULL) { | ||
78 | + if ((is_host (argv[c])) == FALSE) { | ||
79 | printf ("Invalid name/address: %s\n\n", argv[c]); | ||
80 | return ERROR; | ||
81 | } | ||
82 | Index: check_ldap.c | ||
83 | =================================================================== | ||
84 | RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_ldap.c,v | ||
85 | retrieving revision 1.2 | ||
86 | diff -u -r1.2 check_ldap.c | ||
87 | --- check_ldap.c 14 Nov 2002 02:26:34 -0000 1.2 | ||
88 | +++ check_ldap.c 11 Dec 2002 02:40:59 -0000 | ||
89 | @@ -7,7 +7,7 @@ | ||
90 | * | ||
91 | * Last Modified: $Date: 2002/11/14 02:26:34 $ | ||
92 | * | ||
93 | - * Command line: check_ldap -h <host> -b <base_dn> -p <port> -w <warn_time> -w <crit_time> | ||
94 | + * Command line: check_ldap -H <host> -b <base_dn> -p <port> -w <warn_time> -w <crit_time> | ||
95 | * | ||
96 | * Description: | ||
97 | * | ||
98 | @@ -197,7 +197,7 @@ | ||
99 | crit_time = atoi (optarg); | ||
100 | break; | ||
101 | default: | ||
102 | - usage ("check_ldap: could not parse arguments\n"); | ||
103 | + usage ("check_ldap: could not parse unknown arguments\n"); | ||
104 | break; | ||
105 | } | ||
106 | } | ||
107 | @@ -253,6 +253,6 @@ | ||
108 | { | ||
109 | printf | ||
110 | ("Usage: %s -H <host> -b <base_dn> -p <port> [-a <attr>] [-D <binddn>]\n" | ||
111 | - " [-P <password>] [-w <warn_time>] [-c <crit_time>] [-t timeout]\n" | ||
112 | + " [-P <password>] -w <warn_time> -c <crit_time> [-t timeout]\n" | ||
113 | "(Note: all times are in seconds.)\n", PROGNAME); | ||
114 | } | ||
115 | Index: check_ping.c | ||
116 | =================================================================== | ||
117 | RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_ping.c,v | ||
118 | retrieving revision 1.10 | ||
119 | diff -u -r1.10 check_ping.c | ||
120 | --- check_ping.c 13 Nov 2002 11:50:54 -0000 1.10 | ||
121 | +++ check_ping.c 11 Dec 2002 02:40:59 -0000 | ||
122 | @@ -88,9 +88,15 @@ | ||
123 | |||
124 | /* does the host address of number of packets argument come first? */ | ||
125 | #ifdef PING_PACKETS_FIRST | ||
126 | - asprintf (&command_line, PING_COMMAND, max_packets, server_address); | ||
127 | + if (is_ipv6_addr (server_address)) | ||
128 | + asprintf (&command_line, PING6_COMMAND, max_packets, server_address); | ||
129 | + else | ||
130 | + asprintf (&command_line, PING_COMMAND, max_packets, server_address); | ||
131 | #else | ||
132 | - asprintf (&command_line, PING_COMMAND, server_address, max_packets); | ||
133 | + if (is_ipv6_addr (server_address)) | ||
134 | + asprintf (&command_line, PING6_COMMAND, server_address, max_packets); | ||
135 | + else | ||
136 | + asprintf (&command_line, PING_COMMAND, server_address, max_packets); | ||
137 | #endif | ||
138 | |||
139 | /* Set signal handling and alarm */ | ||
140 | Index: check_tcp.c | ||
141 | =================================================================== | ||
142 | RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_tcp.c,v | ||
143 | retrieving revision 1.8 | ||
144 | diff -u -r1.8 check_tcp.c | ||
145 | --- check_tcp.c 25 Nov 2002 12:00:17 -0000 1.8 | ||
146 | +++ check_tcp.c 11 Dec 2002 02:40:59 -0000 | ||
147 | @@ -225,8 +225,12 @@ | ||
148 | { | ||
149 | if (PROTOCOL == UDP_PROTOCOL) | ||
150 | result = my_udp_connect (server_address, server_port, &sd); | ||
151 | - else /* default is TCP */ | ||
152 | - result = my_tcp_connect (server_address, server_port, &sd); | ||
153 | + else | ||
154 | + /* default is TCP */ | ||
155 | + // result = my_tcp_connect (server_address, server_port, &sd); | ||
156 | + result = my_connect (server_address, server_port, &sd, IPPROTO_TCP); | ||
157 | +printf ("Catch value: %d\n", result); | ||
158 | +printf ("XXX: Check valve\n"); | ||
159 | } | ||
160 | |||
161 | if (result == STATE_CRITICAL) | ||
162 | Index: check_udp.c | ||
163 | =================================================================== | ||
164 | RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_udp.c,v | ||
165 | retrieving revision 1.2 | ||
166 | diff -u -r1.2 check_udp.c | ||
167 | --- check_udp.c 30 Oct 2002 18:46:01 -0000 1.2 | ||
168 | +++ check_udp.c 11 Dec 2002 02:40:59 -0000 | ||
169 | @@ -74,9 +74,8 @@ | ||
170 | alarm (socket_timeout); | ||
171 | |||
172 | time (&start_time); | ||
173 | - result = | ||
174 | - process_udp_request (server_address, server_port, server_send, | ||
175 | - recv_buffer, MAX_INPUT_BUFFER - 1); | ||
176 | + result = process_udp_request (server_address, server_port, server_send, | ||
177 | + recv_buffer, MAX_INPUT_BUFFER - 1); | ||
178 | time (&end_time); | ||
179 | |||
180 | if (result != STATE_OK) { | ||