summaryrefslogtreecommitdiffstats
path: root/web/attachments/144381-nagios-plugins-1.4.1-check_tcp.patch
blob: 55a15414f74361db9ddfad21cd29d1e2819081df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
--- nagios-plugins-1.4.1/plugins/check_tcp.c.orig	2005-08-04 09:47:34.493447229 +0200
+++ nagios-plugins-1.4.1/plugins/check_tcp.c	2005-08-04 09:48:24.684428631 +0200
@@ -175,12 +175,12 @@
 		flags |= FLAG_SSL;
 		PORT = 465;
 	}
-	else if (!strncmp(SERVICE, "JABBER", 6)) {
+	else if (!strncmp(SERVICE, "JABBERS", 7)) {
 		SEND = "<stream:stream to=\'host\' xmlns=\'jabber:client\' xmlns:stream=\'http://etherx.jabber.org/streams\'>\n";
 		EXPECT = "<?xml version=\'1.0\'?><stream:stream xmlns:stream=\'http://etherx.jabber.org/streams\'";
 		QUIT = "</stream:stream>\n";
 		flags |= FLAG_SSL | FLAG_HIDE_OUTPUT;
-		PORT = 5222;
+		PORT = 5223;
 	}
 	else if (!strncmp (SERVICE, "NNTPS", 5)) {
 		server_expect_count = 2;
@@ -191,6 +191,13 @@
 		PORT = 563;
 	}
 #endif
+	else if (!strncmp(SERVICE, "JABBER", 6)) {
+		SEND = "<stream:stream to=\'host\' xmlns=\'jabber:client\' xmlns:stream=\'http://etherx.jabber.org/streams\'>\n";
+		EXPECT = "<?xml version=\'1.0\'?><stream:stream xmlns:stream=\'http://etherx.jabber.org/streams\'";
+		QUIT = "</stream:stream>\n";
+		flags |= FLAG_HIDE_OUTPUT;
+		PORT = 5222;
+	}
 	else if (!strncmp (SERVICE, "NNTP", 4)) {
 		server_expect_count = 2;
 		server_expect = malloc(sizeof(char *) * server_expect_count);
--- nagios-plugins-1.4.1/configure.in.orig	2005-08-04 10:31:50.608790288 +0200
+++ nagios-plugins-1.4.1/configure.in	2005-08-04 10:32:00.309256197 +0200
@@ -479,7 +479,7 @@
 fi
 
 if test "$FOUNDSSL" = "yes"; then
-  check_tcp_ssl="check_simap check_spop check_jabber check_nntps check_ssmtp"
+  check_tcp_ssl="check_simap check_spop check_jabbers check_nntps check_ssmtp"
   AC_SUBST(check_tcp_ssl)
   AC_SUBST(SSLLIBS)
   AC_DEFINE(HAVE_SSL,1,[Define if SSL libraries are found])
--- nagios-plugins-1.4.1/plugins/Makefile.am.orig	2005-08-04 10:32:17.072877007 +0200
+++ nagios-plugins-1.4.1/plugins/Makefile.am	2005-08-04 10:32:30.926258102 +0200
@@ -17,7 +17,7 @@
 	check_udp check_ups check_users negate urlize check_icmp\
 	@EXTRAS@
 
-check_tcp_programs = check_ftp check_imap check_nntp check_pop check_udp2 \
+check_tcp_programs = check_ftp check_imap check_jabber check_nntp check_pop check_udp2 \
 	@check_tcp_ssl@
 
 EXTRA_PROGRAMS = check_mysql check_radius check_pgsql check_snmp check_hpjd \