diff options
Diffstat (limited to 'web/attachments/136841-newdiff')
-rw-r--r-- | web/attachments/136841-newdiff | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/web/attachments/136841-newdiff b/web/attachments/136841-newdiff new file mode 100644 index 0000000..371d0a8 --- /dev/null +++ b/web/attachments/136841-newdiff | |||
@@ -0,0 +1,87 @@ | |||
1 | Index: check_tcp.c | ||
2 | =================================================================== | ||
3 | RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_tcp.c,v | ||
4 | retrieving revision 1.65 | ||
5 | diff -r1.65 check_tcp.c | ||
6 | 166a167,176 | ||
7 | > else if (strstr (argv[0], "check_clamd")) { | ||
8 | > progname = strdup ("check_clamd"); | ||
9 | > SERVICE = strdup ("CLAMD"); | ||
10 | > SEND = strdup ("PING"); | ||
11 | > EXPECT = strdup ("PONG"); | ||
12 | > QUIT = NULL; | ||
13 | > PROTOCOL = IPPROTO_TCP; | ||
14 | > PORT = 3310; | ||
15 | > } | ||
16 | > | ||
17 | 380,381c390,397 | ||
18 | < | ||
19 | < printf | ||
20 | --- | ||
21 | > if(server_address[0]=='/') | ||
22 | > printf | ||
23 | > (_("%s %s%s - %.3f second response on socket %s"), | ||
24 | > SERVICE, | ||
25 | > state_text (result), | ||
26 | > (was_refused) ? " (refused)" : "", | ||
27 | > elapsed_time, server_address); | ||
28 | > else printf | ||
29 | 488c504 | ||
30 | < if (is_host (optarg) == FALSE) | ||
31 | --- | ||
32 | > if (optarg[0]!= '/' && is_host (optarg) == FALSE) | ||
33 | 763c779 | ||
34 | < printf (_("This plugin tests %s connections with the specified host.\n\n"), | ||
35 | --- | ||
36 | > printf (_("This plugin tests %s connections with the specified host or unix socket.\n\n"), | ||
37 | Index: netutils.c | ||
38 | =================================================================== | ||
39 | RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/netutils.c,v | ||
40 | retrieving revision 1.24 | ||
41 | diff -r1.24 netutils.c | ||
42 | 166a167 | ||
43 | > | ||
44 | 172a174 | ||
45 | > if (host_name[0] != '/') { | ||
46 | 212a215,239 | ||
47 | > } | ||
48 | > else{ // unix socket | ||
49 | > struct sockaddr_un su; | ||
50 | > if (strlen(host_name) >= sizeof(su.sun_path)) { | ||
51 | > printf("Hostname too long for unix domain socket: %s\n", | ||
52 | > host_name); | ||
53 | > return STATE_UNKNOWN; | ||
54 | > } | ||
55 | > memset(&su, 0, sizeof su); | ||
56 | > su.sun_family = AF_UNIX; | ||
57 | > strncpy(su.sun_path, host_name, sizeof su.sun_path); | ||
58 | > *sd = socket(PF_UNIX, SOCK_STREAM, 0); | ||
59 | > if ( sd < 0) { | ||
60 | > printf ("Socket creation failed\n"); | ||
61 | > return STATE_UNKNOWN; | ||
62 | > } | ||
63 | > result=connect(*sd, (struct sockaddr *)&su, sizeof su); | ||
64 | > if (result == -1) { | ||
65 | > printf ("Connect to socket failed\n"); | ||
66 | > close(*sd); | ||
67 | > return STATE_UNKNOWN; | ||
68 | > } | ||
69 | > | ||
70 | > } | ||
71 | > | ||
72 | Index: netutils.h | ||
73 | =================================================================== | ||
74 | RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/netutils.h,v | ||
75 | retrieving revision 1.12 | ||
76 | diff -r1.12 netutils.h | ||
77 | 37a38 | ||
78 | > #include <sys/un.h> | ||
79 | Index: utils.h | ||
80 | =================================================================== | ||
81 | RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/utils.h,v | ||
82 | retrieving revision 1.22 | ||
83 | diff -r1.22 utils.h | ||
84 | 139c139 | ||
85 | < Host name or IP Address\n\ | ||
86 | --- | ||
87 | > Host name or IP Address or unix socket (starting with \"/\")\n\ | ||