Your message dated Tue, 29 Jan 2008 21:32:03 +0000
with message-id <[EMAIL PROTECTED]>
and subject line Bug#375303: fixed in denyhosts 2.6-3
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: denyhosts
Version: 2.3-3
Severity: wishlist
Tags: patch, upstream

denyhosts currently lacks the ability to run in a 'debugging' or
'foreground' mode.  The attached patch adds a --foreground switch to
achieve this.

-- 
Robert Edmonds
[EMAIL PROTECTED]
diff -ru DenyHosts-2.3/DenyHosts/deny_hosts.py 
denyhosts-2.3.foreground/DenyHosts/deny_hosts.py
--- DenyHosts-2.3/DenyHosts/deny_hosts.py       2006-03-30 14:18:47.000000000 
-0500
+++ denyhosts-2.3.foreground/DenyHosts/deny_hosts.py    2006-06-24 
21:08:26.000000000 -0400
@@ -40,7 +40,7 @@
 class DenyHosts:
     def __init__(self, logfile, prefs, lock_file,
                  ignore_offset=0, first_time=0,
-                 noemail=0, daemon=0):
+                 noemail=0, daemon=0, foreground=0):
         self.__denied_hosts = {}
         self.__prefs = prefs
         self.__lock_file = lock_file
@@ -48,6 +48,7 @@
         self.__noemail = noemail
         self.__report = Report(prefs.get("HOSTNAME_LOOKUP"))
         self.__daemon = daemon
+        self.__foreground = foreground
         self.__sync_server = prefs.get('SYNC_SERVER')
         self.__sync_upload = is_true(prefs.get("SYNC_UPLOAD"))
         self.__sync_download = is_true(prefs.get("SYNC_DOWNLOAD"))
@@ -85,7 +86,7 @@
             info("Log file size has not changed.  Nothing to do.")
 
             
-        if daemon:
+        if daemon and not foreground:
             info("launching DenyHosts daemon (version %s)..." % VERSION)
             #logging.getLogger().setLevel(logging.WARN)
 
@@ -99,6 +100,10 @@
                 self.runDaemon(logfile, last_offset)
             else:
                 die("Error creating daemon: %s (%d)" % (retCode[1], 
retCode[0]))
+        elif foreground:
+            info("launching DenyHosts (version %s)..." % VERSION)
+            self.__lock_file.remove()
+            self.runDaemon(logfile, last_offset)
 
 
     def killDaemon(self, signum, frame):
diff -ru DenyHosts-2.3/denyhosts.py denyhosts-2.3.foreground/denyhosts.py
--- DenyHosts-2.3/denyhosts.py  2006-03-11 09:45:51.000000000 -0500
+++ denyhosts-2.3.foreground/denyhosts.py       2006-06-24 21:32:09.000000000 
-0400
@@ -33,6 +33,7 @@
     print " --migrate: migrate your HOSTS_DENY file so that it is suitable for 
--purge"
     print " --purge: expire entries older than your PURGE_DENY setting"
     print " --daemon: run DenyHosts in daemon mode"
+    print " --foreground: run DenyHosts in foreground mode"
     print " --sync: run DenyHosts synchronization mode"
     print " --version: Prints the version of DenyHosts and exits"
     
@@ -62,6 +63,7 @@
     purge = 0
     sync_mode = 0
     daemon = 0
+    foreground = 0
     enable_debug = 0
     upgrade099 = 0
     args = sys.argv[1:]
@@ -69,8 +71,8 @@
         (opts, getopts) = getopt.getopt(args, 'f:c:dinuvps?hV',
                                         ["file=", "ignore", "verbose", 
"debug", 
                                          "help", "noemail", "config=", 
"version",
-                                         "migrate", "purge", "daemon", "sync",
-                                         "upgrade099"])
+                                         "migrate", "purge", "daemon", 
"foreground",
+                                         "sync", "upgrade099"])
     except:
         print "\nInvalid command line option detected."
         usage()
@@ -100,6 +102,8 @@
             sync_mode = 1
         if opt == '--daemon':
             daemon = 1
+        if opt == '--foreground':
+            foreground = 1
         if opt == '--upgrade099':
             upgrade099 = 1
         if opt == '--version':
@@ -130,21 +134,21 @@
 
     lock_file.create()
 
-    if upgrade099 and not daemon:
+    if upgrade099 and not (daemon or foreground):
         if not prefs.get('PURGE_DENY'):
             lock_file.remove()
             die("You have supplied the --upgrade099 flag, however you have not 
set PURGE_DENY in your configuration file")
         else:
             u = UpgradeTo099(prefs.get("HOSTS_DENY"))
 
-    if migrate and not daemon:
+    if migrate and not (daemon or foreground):
         if not prefs.get('PURGE_DENY'):
             lock_file.remove()
             die("You have supplied the --migrate flag however you have not set 
PURGE_DENY in your configuration file.")
         else:
             m = Migrate(prefs.get("HOSTS_DENY"))
 
-    if purge and not daemon:
+    if purge and not (daemon or foreground):
         purge_time = prefs.get('PURGE_DENY')
         if not purge_time:
             lock_file.remove()
@@ -161,7 +165,9 @@
     try:
         for f in logfiles:
             dh = DenyHosts(f, prefs, lock_file, ignore_offset,
-                           first_time, noemail, daemon)
+                           first_time, noemail, daemon, foreground)
+    except KeyboardInterrupt:
+        pass
     except SystemExit, e:
         pass
     except Exception, e:
@@ -169,7 +175,7 @@
         print "\nDenyHosts exited abnormally"
 
 
-    if sync_mode and not daemon:
+    if sync_mode and not (daemon or foreground):
         if not prefs.get('SYNC_SERVER'):
             lock_file.remove()
             die("You have provided the --sync flag however your configuration 
file is missing a value for SYNC_SERVER.")

Attachment: signature.asc
Description: Digital signature


--- End Message ---
--- Begin Message ---
Source: denyhosts
Source-Version: 2.6-3

We believe that the bug you reported is fixed in the latest version of
denyhosts, which is due to be installed in the Debian FTP archive:

denyhosts_2.6-3.diff.gz
  to pool/main/d/denyhosts/denyhosts_2.6-3.diff.gz
denyhosts_2.6-3.dsc
  to pool/main/d/denyhosts/denyhosts_2.6-3.dsc
denyhosts_2.6-3_all.deb
  to pool/main/d/denyhosts/denyhosts_2.6-3_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Marco Bertorello <[EMAIL PROTECTED]> (supplier of updated denyhosts package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])


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

Format: 1.7
Date: Mon, 08 Jan 2008 13:18:17 +0100
Source: denyhosts
Binary: denyhosts
Architecture: source all
Version: 2.6-3
Distribution: unstable
Urgency: low
Maintainer: Marco Bertorello <[EMAIL PROTECTED]>
Changed-By: Marco Bertorello <[EMAIL PROTECTED]>
Description: 
 denyhosts  - an utility to help sys admins thwart ssh crackers
Closes: 375303 430436 436183 444955
Changes: 
 denyhosts (2.6-3) unstable; urgency=low
 .
   * debian/denyhosts.init: check if HOSTS_DENY file exist and, if not,
     create it (Closes: 430436)
   * debian/denyhosts.postrm: remove logrotate on purge and remove (thanks
     to Valery V. Vorotyntsev) (Closes: 444955)
   * changed mentions "hackers" instead of "crackers" in package descriptions
     (Closes: 436183)
   * added useful patch from Robert Edmonds to run denyhosts in foreground mode
     (Closes: 375303)
   * updated to new standard version 3.7.3 (Insered a linda-override)
Files: 
 aaf5f33597e57ad1a9cc475daaa2458c 707 net optional denyhosts_2.6-3.dsc
 d86f74a87b07f9ec61daed8dc613b534 35802 net optional denyhosts_2.6-3.diff.gz
 c9745b6312100cc8329002cb8df098d7 63278 net optional denyhosts_2.6-3_all.deb

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

iD8DBQFHn5lpBnqtBMk7/3kRAvOtAJ90lL3VgO3ftFpDRWydYhtjmk4NZQCeKYx4
hNl0OW1/Nex44dgeu8NMmz4=
=ZiLN
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to