summaryrefslogtreecommitdiffstats
path: root/web/attachments/122140-diff
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2013-09-29 22:03:24 (GMT)
committerHolger Weiss <holger@zedat.fu-berlin.de>2013-09-29 22:03:24 (GMT)
commit0b6423f9c99d9edf8c96fefd0f6c453859395aa1 (patch)
tree1c2b6b21704a294940f87c7892676998d8371707 /web/attachments/122140-diff
downloadsite-0b6423f9c99d9edf8c96fefd0f6c453859395aa1.tar.gz
Import Nagios Plugins site
Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files.
Diffstat (limited to 'web/attachments/122140-diff')
-rw-r--r--web/attachments/122140-diff91
1 files changed, 91 insertions, 0 deletions
diff --git a/web/attachments/122140-diff b/web/attachments/122140-diff
new file mode 100644
index 0000000..736b1c1
--- /dev/null
+++ b/web/attachments/122140-diff
@@ -0,0 +1,91 @@
1Index: check_tcp.c
2===================================================================
3RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_tcp.c,v
4retrieving revision 1.61
5diff -r1.61 check_tcp.c
699c99
7< int use_ssl = FALSE;
8---
9> int use_ssl = FALSE;
10170a171,180
11> else if (strstr (argv[0], "check_clamd")) {
12> progname = strdup ("check_clamd");
13> SERVICE = strdup ("CLAMD");
14> SEND = strdup ("PING");
15> EXPECT = strdup ("PONG");
16> QUIT = NULL;
17> PROTOCOL = TCP_PROTOCOL;
18> PORT = 3310;
19> }
20>
21378,379c388,395
22<
23< printf
24---
25> if(server_address[0]=='/')
26> printf
27> (_("%s %s%s - %.3f second response on socket %s"),
28> SERVICE,
29> state_text (result),
30> (was_refused) ? " (refused)" : "",
31> elapsed_time, server_address);
32> else printf
33486c502
34< if (is_host (optarg) == FALSE)
35---
36> if (optarg[0]!= '/' && is_host (optarg) == FALSE)
37761c777
38< printf (_("This plugin tests %s connections with the specified host.\n\n"),
39---
40> printf (_("This plugin tests %s connections with the specified host or unix socket.\n\n"),
41Index: netutils.c
42===================================================================
43RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/netutils.c,v
44retrieving revision 1.22
45diff -r1.22 netutils.c
46221a222
47>
48227a229
49> if (host_name[0] != '/') {
50267a270,294
51> }
52> else{ // unix socket
53> struct sockaddr_un su;
54> if (strlen(host_name) >= sizeof(su.sun_path)) {
55> printf("Hostname too long for unix domain socket: %s\n",
56> host_name);
57> return STATE_UNKNOWN;
58> }
59> memset(&su, 0, sizeof su);
60> su.sun_family = AF_UNIX;
61> strncpy(su.sun_path, host_name, sizeof su.sun_path);
62> *sd = socket(PF_UNIX, SOCK_STREAM, 0);
63> if ( sd < 0) {
64> printf ("Socket creation failed\n");
65> return STATE_UNKNOWN;
66> }
67> result=connect(*sd, (struct sockaddr *)&su, sizeof su);
68> if (result == -1) {
69> printf ("Connect to socket failed\n");
70> close(*sd);
71> return STATE_UNKNOWN;
72> }
73>
74> }
75>
76Index: netutils.h
77===================================================================
78RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/netutils.h,v
79retrieving revision 1.10
80diff -r1.10 netutils.h
8137a38
82> #include <sys/un.h>
83Index: utils.h
84===================================================================
85RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/utils.h,v
86retrieving revision 1.22
87diff -r1.22 utils.h
88139c139
89< Host name or IP Address\n\
90---
91> Host name or IP Address or unix socket (starting with \"/\")\n\