Package: denyhosts
Version: 2.6-8.1
Severity: normal
I've noticed that the denyhosts daemon on my machine has unexpectedly stopped
working. Checking the log I saw the following:
2011-01-03 08:10:11,678 - denyfileutil: INFO purging entries older than:
Mon Dec 27 08:10:11 2010
2011-01-03 08:10:11,765 - root : ERROR list index out of range
Traceback (most recent call last):
File "/usr/share/denyhosts/DenyHosts/deny_hosts.py", line 246, in
sleepAndPurge
purge_time)
File "/usr/share/denyhosts/DenyHosts/denyfileutil.py", line 159, in
__init__
purged_hosts = self.create_temp(self.get_data())
File "/usr/share/denyhosts/DenyHosts/denyfileutil.py", line 232, in
create_temp
raise e
IndexError: list index out of range
I tried to explicitly purge, but without success:
# denyhosts --purge
list index out of range
I realized that, after a previous manual clean up, I left the following entry
(a comment line) in /etc/hosts.deny:
# DenyHosts: Tue Dec 21 11:14:43 2010 | ALL: XXX.XXX.XXX.XXX
That line is the last one in /etc/hosts.deny. Since it is a comment line, I
thought it could not interfere at all, but it was enough to crash denyhosts.
Interestingly, when the date of the entry is out of the purge window, i.e. not
so old, the above comment line does not cause problem.
I think denyhosts should be robust enough to correctly handle extraneous and/or
malformed entries in /etc/hosts.deny, specially when they are just comment
lines.
-- System Information:
Debian Release: 6.0
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.36-trunk-amd64 (SMP w/12 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages denyhosts depends on:
ii lsb-base 3.2-26 Linux Standard Base 3.2 init scrip
ii python 2.6.6-3+squeeze4 interactive high-level object-orie
ii python-central 0.6.16+nmu1 register and build utility for Pyt
--
Douglas A. Augusto
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]