summaryrefslogtreecommitdiffstats
path: root/web/attachments/33077-nag.patch
diff options
context:
space:
mode:
Diffstat (limited to 'web/attachments/33077-nag.patch')
-rw-r--r--web/attachments/33077-nag.patch470
1 files changed, 470 insertions, 0 deletions
diff --git a/web/attachments/33077-nag.patch b/web/attachments/33077-nag.patch
new file mode 100644
index 0000000..a9c1305
--- /dev/null
+++ b/web/attachments/33077-nag.patch
@@ -0,0 +1,470 @@
1--- nagiosplug-1.3-beta1/acconfig.h Sun May 26 19:01:09 2002
2+++ nagiosplug-1.3-beta1.new/acconfig.h Mon Oct 14 12:21:57 2002
3@@ -35,6 +35,7 @@
4 #undef SSH_COMMAND
5 #undef SWAP_COMMAND
6 #undef SWAP_FORMAT
7+#undef SWAP_LINE
8 #undef USE_PS_VARS
9 #undef VSZ_COMMAND
10 #undef VSZ_FORMAT
11--- nagiosplug-1.3-beta1/configure.in Wed Jun 12 20:03:07 2002
12+++ nagiosplug-1.3-beta1.new/configure.in Mon Oct 14 11:59:56 2002
13@@ -757,14 +757,18 @@
14 if [swap -l 2>/dev/null | egrep -i "^lswap +path +pri +swaplo +blocks +free +maxswap" >/dev/null]
15 then
16 AC_DEFINE_UNQUOTED(SWAP_FORMAT,[" %*d %*s %*d,%*d %*d %*d %d %d"])
17+ AC_DEFINE_UNQUOTED(SWAP_LINE,[""])
18 echo " using IRIX format"
19 elif [swap -l 2>/dev/null | egrep -i "^swapfile +dev +swaplo +blocks +free" >/dev/null]
20 then
21 AC_DEFINE_UNQUOTED(SWAP_FORMAT,["%*s %*[[0-9,-]] %*d %d %d"])
22+ AC_DEFINE_UNQUOTED(SWAP_LINE,[""])
23 echo " using Solaris format"
24 fi
25+
26+
27 EXTRAS="$EXTRAS check_swap"
28-elif [swapinfo -k 2>&1 | egrep -i "Device" >/dev/null]
29+elif [swapinfo -k 2>&1 | egrep -i "^Device" >/dev/null]
30 then
31 echo "found swapinfo command"
32 AC_DEFINE(HAVE_SWAP)
33@@ -773,8 +777,23 @@
34 if [swapinfo -k 2>/dev/null | egrep -i "^Device +1K-blocks +Used +Avail" >/dev/null]
35 then
36 AC_DEFINE_UNQUOTED(SWAP_FORMAT,["%*s %d %*d %d"])
37+ AC_DEFINE_UNQUOTED(SWAP_LINE,[""])
38+dnl AC_DEFINE_UNQUOTED(SWAP_LINE,["Total"])
39+dnl Can't exactly test the above, but thought it would be nice.
40 echo " using FreeBSD format"
41 fi
42+elif [swapinfo 2>&1 | egrep -i "^memory" >/dev/null]
43+then
44+ echo "found swapinfo command"
45+ AC_DEFINE(HAVE_SWAP)
46+ AC_PATH_PROG(PATH_TO_SWAP,swapinfo)
47+ AC_DEFINE_UNQUOTED(SWAP_COMMAND,"$PATH_TO_SWAP")
48+ if [swapinfo 2>/dev/null | egrep -i "^TYPE +AVAIL +USED +FREE +USED" >/dev/null]
49+ then
50+ AC_DEFINE_UNQUOTED(SWAP_FORMAT,["%*s %d %*d %d"])
51+ AC_DEFINE_UNQUOTED(SWAP_LINE,["memory"])
52+ echo " using HP-UX format"
53+ fi
54 EXTRAS="$EXTRAS check_swap"
55 fi
56
57--- nagiosplug-1.3-beta1/plugins/check_swap.c Wed Feb 27 22:42:59 2002
58+++ nagiosplug-1.3-beta1.new/plugins/check_swap.c Mon Oct 14 12:00:18 2002
59@@ -64,6 +64,7 @@
60 fclose (fp);
61 #else
62 #ifdef HAVE_SWAP
63+
64 child_process = spopen (SWAP_COMMAND);
65 if (child_process == NULL) {
66 printf ("Could not open pipe: %s\n", SWAP_COMMAND);
67@@ -92,17 +93,19 @@
68
69 status = ssprintf (status, "%s", "Swap used:");
70 while (fgets (input_buffer, MAX_INPUT_BUFFER - 1, child_process)) {
71- sscanf (input_buffer, SWAP_FORMAT, &total_swap, &free_swap);
72- used_swap = total_swap - free_swap;
73- percent_used = 100 * ((float) used_swap) / ((float) total_swap);
74- status = ssprintf
75- (status,
76- "%s %2d%% (%d bytes out of %d)",
77- status, percent_used, used_swap, total_swap);
78- if (percent_used >= crit_percent || free_swap <= crit_size)
79- result = STATE_CRITICAL;
80- else if (percent_used >= warn_percent || free_swap <= warn_size)
81- result = STATE_WARNING;
82+ if (strstr (input_buffer, SWAP_LINE)) {
83+ sscanf (input_buffer, SWAP_FORMAT, &total_swap, &free_swap);
84+ used_swap = total_swap - free_swap;
85+ percent_used = 100 * ((float) used_swap) / ((float) total_swap);
86+ status = ssprintf
87+ (status,
88+ "%s %2d%% (%d bytes out of %d)",
89+ status, percent_used, used_swap, total_swap);
90+ if (percent_used >= crit_percent || free_swap <= crit_size)
91+ result = STATE_CRITICAL;
92+ else if (percent_used >= warn_percent || free_swap <= warn_size)
93+ result = STATE_WARNING;
94+ }
95 }
96
97 /* If we get anything on STDERR, at least set warning */
98--- nagiosplug-1.3-beta1/plugins/config.h.in Thu Jun 13 07:02:16 2002
99+++ nagiosplug-1.3-beta1.new/plugins/config.h.in Mon Oct 14 12:10:37 2002
100@@ -1,54 +1,4 @@
101-/* plugins/config.h.in. Generated automatically from configure.in by autoheader. */
102-
103-/* Define to empty if the keyword does not work. */
104-#undef const
105-
106-/* Define for DGUX with <sys/dg_sys_info.h>. */
107-#undef DGUX
108-
109-/* Define if the `getloadavg' function needs to be run setuid or setgid. */
110-#undef GETLOADAVG_PRIVILEGED
111-
112-/* Define if your system has its own `getloadavg' function. */
113-#undef HAVE_GETLOADAVG
114-
115-/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
116-#undef HAVE_SYS_WAIT_H
117-
118-/* Define if your struct nlist has an n_un member. */
119-#undef NLIST_NAME_UNION
120-
121-/* Define if you have <nlist.h>. */
122-#undef NLIST_STRUCT
123-
124-/* Define to `int' if <sys/types.h> doesn't define. */
125-#undef pid_t
126-
127-/* Define as the return type of signal handlers (int or void). */
128-#undef RETSIGTYPE
129-
130-/* Define to `unsigned' if <sys/types.h> doesn't define. */
131-#undef size_t
132-
133-/* Define if you have the ANSI C header files. */
134-#undef STDC_HEADERS
135-
136-/* Define on System V Release 4. */
137-#undef SVR4
138-
139-/* Define if you can safely include both <sys/time.h> and <time.h>. */
140-#undef TIME_WITH_SYS_TIME
141-
142-/* Define if your <sys/time.h> declares struct tm. */
143-#undef TM_IN_SYS_TIME
144-
145-/* Define for Encore UMAX. */
146-#undef UMAX
147-
148-/* Define for Encore UMAX 4.3 that has <inq_status/cpustats.h>
149- instead of <sys/cpustats.h>. */
150-#undef UMAX4_3
151-
152+/* plugins/config.h.in. Generated from configure.in by autoheader. */
153 #undef CGIURL
154 #undef DF_COMMAND
155 #undef HAVE_GETOPT_H
156@@ -86,6 +36,7 @@
157 #undef SSH_COMMAND
158 #undef SWAP_COMMAND
159 #undef SWAP_FORMAT
160+#undef SWAP_LINE
161 #undef USE_PS_VARS
162 #undef VSZ_COMMAND
163 #undef VSZ_FORMAT
164@@ -93,137 +44,230 @@
165 #undef PACKAGE
166 #undef VERSION
167
168-/* Define if you have the getloadavg function. */
169-#undef HAVE_GETLOADAVG
170+/* Define to 1 if using `getloadavg.c'. */
171+#undef C_GETLOADAVG
172
173-/* Define if you have the getopt_long_only function. */
174-#undef HAVE_GETOPT_LONG_ONLY
175+/* Define to 1 for DGUX with <sys/dg_sys_info.h>. */
176+#undef DGUX
177
178-/* Define if you have the select function. */
179-#undef HAVE_SELECT
180+/* Define to 1 if the `getloadavg' function needs to be run setuid or setgid.
181+ */
182+#undef GETLOADAVG_PRIVILEGED
183
184-/* Define if you have the socket function. */
185-#undef HAVE_SOCKET
186+/* Define to 1 if you have the <crypto.h> header file. */
187+#undef HAVE_CRYPTO_H
188
189-/* Define if you have the strdup function. */
190-#undef HAVE_STRDUP
191+/* Define to 1 if you have the <errno.h> header file. */
192+#undef HAVE_ERRNO_H
193
194-/* Define if you have the strstr function. */
195-#undef HAVE_STRSTR
196+/* Define to 1 if you have the <err.h> header file. */
197+#undef HAVE_ERR_H
198
199-/* Define if you have the strtod function. */
200-#undef HAVE_STRTOD
201+/* Define to 1 if you have the `getloadavg' function. */
202+#undef HAVE_GETLOADAVG
203
204-/* Define if you have the strtol function. */
205-#undef HAVE_STRTOL
206+/* Define to 1 if you have the `getopt_long_only' function. */
207+#undef HAVE_GETOPT_LONG_ONLY
208
209-/* Define if you have the strtoul function. */
210-#undef HAVE_STRTOUL
211+/* Define to 1 if you have the <inttypes.h> header file. */
212+#undef HAVE_INTTYPES_H
213
214-/* Define if you have the <crypto.h> header file. */
215-#undef HAVE_CRYPTO_H
216+/* Define to 1 if you have the `crypt' library (-lcrypt). */
217+#undef HAVE_LIBCRYPT
218
219-/* Define if you have the <err.h> header file. */
220-#undef HAVE_ERR_H
221+/* Define to 1 if you have the `crypto' library (-lcrypto). */
222+#undef HAVE_LIBCRYPTO
223
224-/* Define if you have the <errno.h> header file. */
225-#undef HAVE_ERRNO_H
226+/* Define to 1 if you have the `dgc' library (-ldgc). */
227+#undef HAVE_LIBDGC
228+
229+/* Define to 1 if you have the `kstat' library (-lkstat). */
230+#undef HAVE_LIBKSTAT
231+
232+/* Define to 1 if you have the `ldap' library (-lldap). */
233+#undef HAVE_LIBLDAP
234+
235+/* Define to 1 if you have the `pq' library (-lpq). */
236+#undef HAVE_LIBPQ
237
238-/* Define if you have the <libpq-fe.h> header file. */
239+/* Define to 1 if you have the <libpq-fe.h> header file. */
240 #undef HAVE_LIBPQ_FE_H
241
242-/* Define if you have the <mach/mach.h> header file. */
243+/* Define to 1 if you have the `radiusclient' library (-lradiusclient). */
244+#undef HAVE_LIBRADIUSCLIENT
245+
246+/* Define to 1 if you have the <mach/mach.h> header file. */
247 #undef HAVE_MACH_MACH_H
248
249-/* Define if you have the <mysql/errmsg.h> header file. */
250+/* Define to 1 if you have the <memory.h> header file. */
251+#undef HAVE_MEMORY_H
252+
253+/* Define to 1 if you have the <mysql/errmsg.h> header file. */
254 #undef HAVE_MYSQL_ERRMSG_H
255
256-/* Define if you have the <mysql/mysql.h> header file. */
257+/* Define to 1 if you have the <mysql/mysql.h> header file. */
258 #undef HAVE_MYSQL_MYSQL_H
259
260-/* Define if you have the <openssl/crypto.h> header file. */
261+/* Define to 1 if you have the <nlist.h> header file. */
262+#undef HAVE_NLIST_H
263+
264+/* Define to 1 if you have the <openssl/crypto.h> header file. */
265 #undef HAVE_OPENSSL_CRYPTO_H
266
267-/* Define if you have the <openssl/err.h> header file. */
268+/* Define to 1 if you have the <openssl/err.h> header file. */
269 #undef HAVE_OPENSSL_ERR_H
270
271-/* Define if you have the <openssl/pem.h> header file. */
272+/* Define to 1 if you have the <openssl/pem.h> header file. */
273 #undef HAVE_OPENSSL_PEM_H
274
275-/* Define if you have the <openssl/rsa.h> header file. */
276+/* Define to 1 if you have the <openssl/rsa.h> header file. */
277 #undef HAVE_OPENSSL_RSA_H
278
279-/* Define if you have the <openssl/ssl.h> header file. */
280+/* Define to 1 if you have the <openssl/ssl.h> header file. */
281 #undef HAVE_OPENSSL_SSL_H
282
283-/* Define if you have the <openssl/x509.h> header file. */
284+/* Define to 1 if you have the <openssl/x509.h> header file. */
285 #undef HAVE_OPENSSL_X509_H
286
287-/* Define if you have the <pem.h> header file. */
288+/* Define to 1 if you have the <pem.h> header file. */
289 #undef HAVE_PEM_H
290
291-/* Define if you have the <pgsql/libpq-fe.h> header file. */
292+/* Define to 1 if you have the <pgsql/libpq-fe.h> header file. */
293 #undef HAVE_PGSQL_LIBPQ_FE_H
294
295-/* Define if you have the <postgresql/libpq-fe.h> header file. */
296+/* Define to 1 if you have the <postgresql/libpq-fe.h> header file. */
297 #undef HAVE_POSTGRESQL_LIBPQ_FE_H
298
299-/* Define if you have the <regex.h> header file. */
300+/* Define to 1 if you have the `pstat_getdynamic' function. */
301+#undef HAVE_PSTAT_GETDYNAMIC
302+
303+/* Define to 1 if you have the <regex.h> header file. */
304 #undef HAVE_REGEX_H
305
306-/* Define if you have the <rsa.h> header file. */
307+/* Define to 1 if you have the <rsa.h> header file. */
308 #undef HAVE_RSA_H
309
310-/* Define if you have the <signal.h> header file. */
311+/* Define to 1 if you have the `select' function. */
312+#undef HAVE_SELECT
313+
314+/* Define to 1 if you have the `setlocale' function. */
315+#undef HAVE_SETLOCALE
316+
317+/* Define to 1 if you have the <signal.h> header file. */
318 #undef HAVE_SIGNAL_H
319
320-/* Define if you have the <ssl.h> header file. */
321+/* Define to 1 if you have the `socket' function. */
322+#undef HAVE_SOCKET
323+
324+/* Define to 1 if you have the <ssl.h> header file. */
325 #undef HAVE_SSL_H
326
327-/* Define if you have the <string.h> header file. */
328-#undef HAVE_STRING_H
329+/* Define to 1 if you have the <stdint.h> header file. */
330+#undef HAVE_STDINT_H
331+
332+/* Define to 1 if you have the <stdlib.h> header file. */
333+#undef HAVE_STDLIB_H
334
335-/* Define if you have the <strings.h> header file. */
336+/* Define to 1 if you have the `strdup' function. */
337+#undef HAVE_STRDUP
338+
339+/* Define to 1 if you have the <strings.h> header file. */
340 #undef HAVE_STRINGS_H
341
342-/* Define if you have the <sys/loadavg.h> header file. */
343+/* Define to 1 if you have the <string.h> header file. */
344+#undef HAVE_STRING_H
345+
346+/* Define to 1 if you have the `strstr' function. */
347+#undef HAVE_STRSTR
348+
349+/* Define to 1 if you have the `strtod' function. */
350+#undef HAVE_STRTOD
351+
352+/* Define to 1 if you have the `strtol' function. */
353+#undef HAVE_STRTOL
354+
355+/* Define to 1 if you have the `strtoul' function. */
356+#undef HAVE_STRTOUL
357+
358+/* Define to 1 if `n_un.n_name' is member of `struct nlist'. */
359+#undef HAVE_STRUCT_NLIST_N_UN_N_NAME
360+
361+/* Define to 1 if you have the <syslog.h> header file. */
362+#undef HAVE_SYSLOG_H
363+
364+/* Define to 1 if you have the <sys/loadavg.h> header file. */
365 #undef HAVE_SYS_LOADAVG_H
366
367-/* Define if you have the <sys/socket.h> header file. */
368+/* Define to 1 if you have the <sys/socket.h> header file. */
369 #undef HAVE_SYS_SOCKET_H
370
371-/* Define if you have the <sys/time.h> header file. */
372+/* Define to 1 if you have the <sys/stat.h> header file. */
373+#undef HAVE_SYS_STAT_H
374+
375+/* Define to 1 if you have the <sys/time.h> header file. */
376 #undef HAVE_SYS_TIME_H
377
378-/* Define if you have the <sys/types.h> header file. */
379+/* Define to 1 if you have the <sys/types.h> header file. */
380 #undef HAVE_SYS_TYPES_H
381
382-/* Define if you have the <syslog.h> header file. */
383-#undef HAVE_SYSLOG_H
384+/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
385+#undef HAVE_SYS_WAIT_H
386
387-/* Define if you have the <uio.h> header file. */
388+/* Define to 1 if you have the <uio.h> header file. */
389 #undef HAVE_UIO_H
390
391-/* Define if you have the <unistd.h> header file. */
392+/* Define to 1 if you have the <unistd.h> header file. */
393 #undef HAVE_UNISTD_H
394
395-/* Define if you have the <x509.h> header file. */
396+/* Define to 1 if you have the <x509.h> header file. */
397 #undef HAVE_X509_H
398
399-/* Define if you have the crypt library (-lcrypt). */
400-#undef HAVE_LIBCRYPT
401+/* Define to 1 if your `struct nlist' has an `n_un' member. Obsolete, depend
402+ on `HAVE_STRUCT_NLIST_N_UN_N_NAME */
403+#undef NLIST_NAME_UNION
404
405-/* Define if you have the crypto library (-lcrypto). */
406-#undef HAVE_LIBCRYPTO
407+/* Define to the address where bug reports for this package should be sent. */
408+#undef PACKAGE_BUGREPORT
409
410-/* Define if you have the dgc library (-ldgc). */
411-#undef HAVE_LIBDGC
412+/* Define to the full name of this package. */
413+#undef PACKAGE_NAME
414
415-/* Define if you have the ldap library (-lldap). */
416-#undef HAVE_LIBLDAP
417+/* Define to the full name and version of this package. */
418+#undef PACKAGE_STRING
419
420-/* Define if you have the pq library (-lpq). */
421-#undef HAVE_LIBPQ
422+/* Define to the one symbol short name of this package. */
423+#undef PACKAGE_TARNAME
424
425-/* Define if you have the radiusclient library (-lradiusclient). */
426-#undef HAVE_LIBRADIUSCLIENT
427+/* Define to the version of this package. */
428+#undef PACKAGE_VERSION
429+
430+/* Define as the return type of signal handlers (`int' or `void'). */
431+#undef RETSIGTYPE
432+
433+/* Define to 1 if you have the ANSI C header files. */
434+#undef STDC_HEADERS
435+
436+/* Define to 1 on System V Release 4. */
437+#undef SVR4
438+
439+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
440+#undef TIME_WITH_SYS_TIME
441+
442+/* Define to 1 if your <sys/time.h> declares `struct tm'. */
443+#undef TM_IN_SYS_TIME
444+
445+/* Define to 1 for Encore UMAX. */
446+#undef UMAX
447+
448+/* Define to 1 for Encore UMAX 4.3 that has <inq_status/cpustats.h> instead of
449+ <sys/cpustats.h>. */
450+#undef UMAX4_3
451+
452+/* Define to empty if `const' does not conform to ANSI C. */
453+#undef const
454+
455+/* Define to `int' if <sys/types.h> does not define. */
456+#undef pid_t
457+
458+/* Define to `unsigned' if <sys/types.h> does not define. */
459+#undef size_t
460--- nagiosplug-1.3-beta1/plugins/snprintf.c Wed Feb 27 22:42:59 2002
461+++ nagiosplug-1.3-beta1.new/plugins/snprintf.c Mon Oct 14 12:15:27 2002
462@@ -34,7 +34,7 @@
463
464 /* Some changes made by bbraun@synack.net for use with xinetd */
465
466-#if !defined(HAVE_SNPRINTF)
467+#if defined(HAVE_SNPRINTF)
468
469 /* Extracted from sendmail 8.8.5 */
470 #ifndef lint