summaryrefslogtreecommitdiff
path: root/net-mgmt/nagios-plugins/files
diff options
context:
space:
mode:
authorDmitry Sivachenko <demon@FreeBSD.org>2013-09-25 13:06:12 +0000
committerDmitry Sivachenko <demon@FreeBSD.org>2013-09-25 13:06:12 +0000
commit3c48668c581d9852771ede6fc6d6b6760910c9cd (patch)
treea667613b7edb14fbfb163fa3412dcd959acc9a96 /net-mgmt/nagios-plugins/files
parent- Support STAGEDIR (diff)
Get rid of sshd: Read from socket failed: Connection reset by peer [preauth]
in server logs when using check_ssh.
Notes
Notes: svn path=/head/; revision=328283
Diffstat (limited to 'net-mgmt/nagios-plugins/files')
-rw-r--r--net-mgmt/nagios-plugins/files/patch-plugins-check_ssh.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/net-mgmt/nagios-plugins/files/patch-plugins-check_ssh.c b/net-mgmt/nagios-plugins/files/patch-plugins-check_ssh.c
new file mode 100644
index 000000000000..f68032e1640e
--- /dev/null
+++ b/net-mgmt/nagios-plugins/files/patch-plugins-check_ssh.c
@@ -0,0 +1,18 @@
+--- plugins/check_ssh.c.orig 2012-06-27 21:32:47.000000000 +0400
++++ plugins/check_ssh.c 2013-09-25 17:03:01.000000000 +0400
+@@ -250,6 +250,7 @@ ssh_connect (char *haddr, int hport, cha
+ printf
+ (_("SSH WARNING - %s (protocol %s) version mismatch, expected '%s'\n"),
+ ssh_server, ssh_proto, remote_version);
++ recv (sd, output, BUFF_SZ, 0);
+ close(sd);
+ exit (STATE_WARNING);
+ }
+@@ -260,6 +261,7 @@ ssh_connect (char *haddr, int hport, cha
+ (_("SSH OK - %s (protocol %s) | %s\n"),
+ ssh_server, ssh_proto, fperfdata("time", elapsed_time, "s",
+ FALSE, 0, FALSE, 0, TRUE, 0, TRUE, (int)socket_timeout));
++ recv (sd, output, BUFF_SZ, 0);
+ close(sd);
+ exit (STATE_OK);
+ }