Package: nagios-plugins
Version: 1.3.1.0-8
Severity: minor
Tags: patch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hi guido,

i noticed today that check_ssh doesn't close the tcp sessions that it
opens, resulting in messages like this:

Apr 11 13:53:34 cork sshd[31726]: fatal: Read from socket failed: Connection 
reset by peer

where in the old 1.3 series, you'd see stuff like:

Apr 11 13:56:34 cork sshd[3240]: Connection closed by x.y.64.10

the attached patch properly closes the connection.  i've also reported
this upstream, as i'm now on the upstream development team.


        sean

- -- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.7-1-686
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages nagios-plugins depends on:
ii  dnsutils               1:9.2.3-3         Clients provided with BIND
ii  fping                  2.4b2-to-ipv6-7   Send ICMP ECHO_REQUEST packets to 
ii  host                   20000331-9        utility for querying DNS servers
ii  libc6                  2.3.2.ds1-11      GNU C Library: Shared libraries an
ii  libldap2               2.1.29-2          OpenLDAP libraries
ii  libmysqlclient10       3.23.56-2         LGPL-licensed client library for M
ii  libnet-snmp-perl       4.0.3-1           Script SNMP connections
ii  libpq3                 7.4.2-3           Shared library libpq.so.3 for Post
ii  libssl0.9.7            0.9.7d-1          SSL shared libraries
ii  netkit-ping [ping]     0.10-10           The ping utility from netkit
ii  ntp-simple             1:4.1.2a-2        NTP v4 daemon for simple systems
ii  ntpdate                1:4.2.0a+stable-2 The ntpdate client for setting sys
ii  procps                 1:3.2.5-1         /proc file system utilities
ii  qstat                  2.7-1             Command-line tool for querying qua
ii  radiusclient1          0.3.2-8           /bin/login replacement which uses 
ii  smbclient              3.0.10-1          a LanManager-like simple client fo
ii  snmp                   5.1.2-6           NET SNMP (Simple Network Managemen

- -- no debconf information

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFCWruMynjLPm522B0RAi1+AJ4pWDZDnaTWKhv+Shrft9TgfBUL9QCfeQYO
T841qjcHbTH604Med2g/OUY=
=GEpT
-----END PGP SIGNATURE-----
Index: check_ssh.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_ssh.c,v
retrieving revision 1.26
diff -u -r1.26 check_ssh.c
--- check_ssh.c 25 Dec 2004 23:17:44 -0000      1.26
+++ check_ssh.c 11 Apr 2005 18:01:24 -0000
@@ -240,6 +240,7 @@
                printf
                        (_("SSH OK - %s (protocol %s)\n"),
                         ssh_server, ssh_proto);
+               close(sd);
                exit (STATE_OK);
        }
 }

Reply via email to