summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2012-09-23 08:25:09 +0000
committerPacho Ramos <pacho@gentoo.org>2012-09-23 08:25:09 +0000
commit704438c961f21dcfed2c662c746ac3243ee9c4c3 (patch)
tree0ac8f6d90c6c80d09e400974630c02d776e83693 /app-admin/denyhosts
parentx86 stable wrt bug #433878 (diff)
downloadhistorical-704438c961f21dcfed2c662c746ac3243ee9c4c3.tar.gz
historical-704438c961f21dcfed2c662c746ac3243ee9c4c3.tar.bz2
historical-704438c961f21dcfed2c662c746ac3243ee9c4c3.zip
Include multiple Fedora and Debian patches that also provide a fix for plugin deny behavior (#264165 by Christoph Erdle).
Package-Manager: portage-2.1.11.19/cvs/Linux x86_64
Diffstat (limited to 'app-admin/denyhosts')
-rw-r--r--app-admin/denyhosts/ChangeLog14
-rw-r--r--app-admin/denyhosts/Manifest19
-rw-r--r--app-admin/denyhosts/denyhosts-2.6-r6.ebuild90
-rw-r--r--app-admin/denyhosts/files/denyhosts-2.6-daemon-control.patch12
-rw-r--r--app-admin/denyhosts/files/denyhosts-2.6-defconffile.patch12
-rw-r--r--app-admin/denyhosts/files/denyhosts-2.6-foreground_mode.patch137
-rw-r--r--app-admin/denyhosts/files/denyhosts-2.6-hostname.patch21
-rw-r--r--app-admin/denyhosts/files/denyhosts-2.6-plugin_deny.patch23
-rw-r--r--app-admin/denyhosts/files/denyhosts-2.6-single_config_switch.patch24
9 files changed, 349 insertions, 3 deletions
diff --git a/app-admin/denyhosts/ChangeLog b/app-admin/denyhosts/ChangeLog
index d6663a72e3da..da189d93def7 100644
--- a/app-admin/denyhosts/ChangeLog
+++ b/app-admin/denyhosts/ChangeLog
@@ -1,6 +1,17 @@
# ChangeLog for app-admin/denyhosts
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/denyhosts/ChangeLog,v 1.49 2012/09/19 20:15:42 darkside Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/denyhosts/ChangeLog,v 1.50 2012/09/23 08:25:09 pacho Exp $
+
+*denyhosts-2.6-r6 (23 Sep 2012)
+
+ 23 Sep 2012; Pacho Ramos <pacho@gentoo.org> +denyhosts-2.6-r6.ebuild,
+ +files/denyhosts-2.6-daemon-control.patch,
+ +files/denyhosts-2.6-defconffile.patch,
+ +files/denyhosts-2.6-foreground_mode.patch,
+ +files/denyhosts-2.6-hostname.patch, +files/denyhosts-2.6-plugin_deny.patch,
+ +files/denyhosts-2.6-single_config_switch.patch:
+ Include multiple Fedora and Debian patches that also provide a fix for plugin
+ deny behavior (#264165 by Christoph Erdle).
19 Sep 2012; Jeremy Olexa <darkside@gentoo.org> metadata.xml:
dropping maintainership, two very minor bugs remain open, app otherwise works
@@ -201,4 +212,3 @@
07 Oct 2005; Benjamin Smee <strerror@gentoo.org> +files/denyhosts.init,
+files/denyhosts-gentoo.patch, +metadata.xml, +denyhosts-1.1.2.ebuild:
Initial import. Thanks to Rene Zbinden and Mike Kelly for initial ebuild
-
diff --git a/app-admin/denyhosts/Manifest b/app-admin/denyhosts/Manifest
index 880c5b09a1e5..b5123b87a5e9 100644
--- a/app-admin/denyhosts/Manifest
+++ b/app-admin/denyhosts/Manifest
@@ -1,8 +1,25 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+AUX denyhosts-2.6-daemon-control.patch 440 SHA256 93421f6a072bb029bf26d8401f0edc21090956c00718d264f2e66b5c9d44e6fe SHA512 6aeb7ef2d695e4a86b3f2a889543493887746483858b2a1bcafc4aed7e0e77d7ac667a005912397df21b78d41eed27e0a1a0b931bb4d52f5dc9f764f8faad099 WHIRLPOOL 491634f42e43c48fbbcec81af2cdf4dbddd57f086ff2f0246e63e1dad87332b4a243c842007165588637054ff9e94e1add1b797a53d58c0ca9b9871ef2999e2f
+AUX denyhosts-2.6-defconffile.patch 641 SHA256 0680006bac721584241e4a24a130438a494ba8a541776334708beebaa5d934ed SHA512 7867225cc37f5c1f972cbc4796f85485b6aaae9958c37e929829080f4b5d381c3326086f7019607abc9a02c10d8bebe798e1d0a4fbbb9260e8be1b9de83ce9d9 WHIRLPOOL becb5b2c199fd3d5a69b93006b0509e76c5518f2a1cff87cf76da816d4a667ce97096c9d938e9a234b320f1b8813e82423ce7abe0cb08640a746ac986c877a79
+AUX denyhosts-2.6-foreground_mode.patch 5410 SHA256 fa20aa1c502add6f0fc2d8a2422091899f100f445a61516b8f070b53ec160571 SHA512 b0136640f1d2e2aef7b3a40c423344383647344e75f8ec045d61600b23399775f4c3f7b7af7758a0be29d1aa8e255a81cb2df5fba196f3a4ee4c2a274e4f9ed3 WHIRLPOOL dfc245683430910f53c15945e4f92a090565353a9b38fe7bc2a09ea2dfbd5fd87f0e549a07c2b0aae9f91b3b24e3d1a7fab5e029e8d6d60a3afb0ef666296daf
AUX denyhosts-2.6-gentoo.patch 1072 SHA256 9a8aa093691efd23a0f34f7dd6ec8716eaeb266ceb96f851f7b2eb12dad44a5a SHA512 bc54d74b4701617d7b66c3366531887e54438d858c2adbc97215fabc6ebc304f8e8434e6db03d9e78400e8e1abd71b0afc7d2f77eecc750635a69e4601274f45 WHIRLPOOL 57b173eb8b9dd4fc9e30edcda936a91912a5c936dac0a3cbb370584f0a7b8b1ff14dc6da76d052ef596123401a706746f7428d58a2e4d702868d91c1ab1ee8f2
+AUX denyhosts-2.6-hostname.patch 664 SHA256 6c7c4567dbfc1c04e76f458ad3fe0247a058a917e4f5808477bf0de306917330 SHA512 0fc512f4a1691a90aba7d95b4757a363f3ff6bb893fdc719277c5dbec1904828be923f5ab21c5ba20e03a5e6bf61a5f7d35c6675b9ccfafd32dbd9e108dd5095 WHIRLPOOL 85d8d3fb33fe629c3c8660f1ef0227b07847cad3c2769484547671108d23acbb2f879dae456f8bdbeb47ce810b0436a98e9ee578dfea90fd546a04cd4b02eb39
AUX denyhosts-2.6-log-injection-regex.patch 1142 SHA256 836bbec93f10e6314afc63a98c0312c1ba7ec95ba0bb857807f3dd9131f79df8 SHA512 1a094f79c2fc9e791cc5431dda2e78ecebdd9828438faae346544c6136a6ad8943dc48fe5e087c187be1cf1cd3cab33b8195bf31867c3334d7f3ef57cb04704a WHIRLPOOL 906f966bbc307599ecf6fa16b1d922fdf18c059138b96699e9ead8eef0e6cc0ff91dc6d75a2a22d172d8979892f15286301aa07920ba42445f75dcdc9a7bc413
+AUX denyhosts-2.6-plugin_deny.patch 1025 SHA256 786a6001f1660193bbe7dc0e8df555db3de449b592824468e4b81dffbf728d6c SHA512 2fbe162ffb22b173078f451e6030262679f4170665a16c8300e88156256ae485009d32f87fd9c9abfb9e0db9d5bbee8763d4260df2068bc5657a85484f31b417 WHIRLPOOL ddfe480a9c092a2dcc208bf33e598c7b96debaf7857c8ec9da623c7a40c0fa914fc4d8f191349a7d8a62d724a8eb687a698e6fb62c60e259886cf8d3f8b87701
+AUX denyhosts-2.6-single_config_switch.patch 853 SHA256 be8025ce86c12ace5d8334c5dbac917c7b9f27f15c679d122826a2ad2e79423f SHA512 90daef95d8ff71feed9e14b590ad9178f5455f56101133534f7c024c612ada77510b9374492bd87f9a54cdcab4107579a4fdf2a77abb491dfc736dbe8c5357b5 WHIRLPOOL ee7130951df2180af955ffac7abd7062fed1d11985f59145f880d2b5f7d288d9ecc91b3d9fb4f03f4e8fd9463d16ac1d711de63d772938e58630580d9c508265
AUX denyhosts.init 576 SHA256 d8c9ab3a39b0efb1d338da8df5e8b88ee99d831c819ca69d4dc16683ec2d217d SHA512 a28283dc47c883c85d86c696dcb08e291fa7e1d41b2f239ab7d6b1ecc21cab9e1adb7d19d183772b1d8fb53165903fefde855a3c0ff2443a86d3cc98f6ca94e8 WHIRLPOOL 34952d8ead377b52df34a8c8d9b46d222fdeea033b736f1a54116fa9227cbbc56a2afb557ddf2f0a03766e80630671f0f37cdc2f1e798e08ccd74d6aaa357a93
AUX denyhosts.logrotate 194 SHA256 fa67dda8e6784fcfdc7a9fb93d1d16670c1b25888e3f2d6b98e33052616d646f SHA512 a53304bd655dcce5e7d69486684457d46eeda40aa92291de2ecf8ab15ab7e23ed7b7e0a66974c60c4fc9621fdea8260eabdf267eb8f38180eeb1830cbdc883b2 WHIRLPOOL 705673121f03681d1f787bdb69d176171c575b917201d4d98bbe66754fedc13659923c7da6878bd985537f580d33119000fd5018f298acb915d70876b513e065
DIST DenyHosts-2.6.tar.gz 42667 SHA256 5190ead13a7238e3ccf328cb3b71b16716e1c73939909a4f3fa6904ba58ddf7d SHA512 331144348d4930e2fa7a057a779bb7504dfa8ec348660e1a73fcd6a9195258408abb7c77de2bcc96724dfc42afbee918320eebfbc3b380d6ac4ff2d275e89600 WHIRLPOOL a414cd3013508876e63253ffc9c46d12179cca76249ee00cbf66c04c7b88a8578c79bea4d098149081aa83dca115947b10214f3aa8b82bdd78d764032849e27a
EBUILD denyhosts-2.6-r5.ebuild 1983 SHA256 c5f42b3513ae622bf50be9e88d7dc6186372d4a5b3c429522e0198961257d348 SHA512 7e79a9cde689a4837d309dffa093f5de771722cb09b019e2488d866e9f92cd57cd4d13252e0f508cf7d798caddc5988f774b60dee809c126902cdc8dff9b8715 WHIRLPOOL 65fae8c855022f25e8e86b40c33eedb1b6607e4f137d5d6014c6f38e1a915a924d7a28d7da0aa52932b12b676365a795d34da81f4b7cbab9f0fc296995130470
-MISC ChangeLog 7119 SHA256 20c855acbea736c3f30d64bc0ba1f789e43d48a34c1fc04f0d4aad92914c85b1 SHA512 628202b21574c09d8cccbc7e325a5050e0c1723dbbac2a2a25f64d8e971c8d254cc857795d71273a48c8e4ef5e7710d2ab9e65e232fe5766a11a7b33feb95039 WHIRLPOOL bd9b1d2372f67b13ea8cfc64a6e4daa81f07bf45ffdb448e16040029bad1fe12cd1663e7fca0a9922b7faea4f31846eb72478e6a596bac67e536bb7f404f68bf
+EBUILD denyhosts-2.6-r6.ebuild 2400 SHA256 20718be6aa479ad8325d293f1fdd3d177ff4ad0426d3ce755287b9d3ca0b04f5 SHA512 9ddadb8aacd12059160ce880e37f32bd362b550483aac2a754d35d338fef5aea2fb9d3b6bae18d62b52218b9a910e5eeeac2a58d441d7634e386c1277b2611c7 WHIRLPOOL 748e5796951bcab987a9380871263d57567f157607ca351fd2274a38bdf57667a62a4be4f4912ffc24e76f6f1b4c85eccf1a46b0b26a764054181d58aadf2bc0
+MISC ChangeLog 7610 SHA256 a04913823973d56b02e269ee9811ac1ee402a61b1be1081e36e4caf46e682f3c SHA512 18425f0d7f7e0377305463815b2cb61283d09ba218d032b9cce2deda6c1afe61a66bd2713204924af977fdb67891f414b3a55d318310d0a2072c5fcb5c8f9220 WHIRLPOOL e25c28cb892a3a93c0cc51e3117f212036dcbb03e003fb36ea765262a1b1bce004945f89bfcebb4a5d7799b38d8682f3a9dc6108fcc3851a39a65cb3ea1982ae
MISC metadata.xml 218 SHA256 e124ad5b959f26606c176ee0a8cc3e59839b98e93c712fe4b699e7e4df11fd6b SHA512 d689950ba64adf80b0b7b667dfa81f230bc7ecf280eabba76ea3f4f0ecec3105d850cb24d34a88243debd08febe8bbd95e389fb8463f6aaeffe96a39a87d569b WHIRLPOOL 72aa8e8b9896ec82acedd6f4b4a1876861523430bc29bc96fcc03da4475e78ddb3802268b81d80d535d6942baad1508fe939a9a769b7635dfebbef7076962ee6
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.19 (GNU/Linux)
+
+iEYEAREIAAYFAlBex2oACgkQCaWpQKGI+9RwSwCfdgOluk7sSS1n9nFZhr0DFtD0
+FLIAnjA0OsxYEp0uRYMXTWcprw30G8kQ
+=Q2t3
+-----END PGP SIGNATURE-----
diff --git a/app-admin/denyhosts/denyhosts-2.6-r6.ebuild b/app-admin/denyhosts/denyhosts-2.6-r6.ebuild
new file mode 100644
index 000000000000..d3cec75c2502
--- /dev/null
+++ b/app-admin/denyhosts/denyhosts-2.6-r6.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/denyhosts/denyhosts-2.6-r6.ebuild,v 1.1 2012/09/23 08:25:09 pacho Exp $
+
+EAPI=4
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="3.*"
+PYTHON_DEPEND="2"
+
+inherit distutils eutils
+
+MY_PN="DenyHosts"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="DenyHosts is a utility to help sys admins thwart ssh hackers"
+HOMEPAGE="http://www.denyhosts.net"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~sparc ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+PYTHON_MODNAME="${MY_PN}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ # changes default file installations
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+ epatch "${FILESDIR}"/${P}-log-injection-regex.patch
+
+ # Multiple patches from Fedora and Debian
+ epatch "${FILESDIR}"/${P}-daemon-control.patch
+ epatch "${FILESDIR}"/${P}-defconffile.patch
+ epatch "${FILESDIR}"/${P}-foreground_mode.patch
+ epatch "${FILESDIR}"/${P}-hostname.patch
+ epatch "${FILESDIR}"/${P}-plugin_deny.patch
+ epatch "${FILESDIR}"/${P}-single_config_switch.patch
+
+ sed -i -e 's:DENY_THRESHOLD_VALID = 10:DENY_THRESHOLD_VALID = 5:' \
+ denyhosts.cfg-dist || die "sed failed"
+}
+
+src_install() {
+ DOCS="CHANGELOG.txt README.txt PKG-INFO"
+ distutils_src_install
+
+ insinto /etc
+ insopts -m0640
+ newins denyhosts.cfg-dist denyhosts.conf
+
+ dodir /etc/logrotate.d
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/${PN}.logrotate ${PN}
+
+ newinitd "${FILESDIR}"/denyhosts.init denyhosts
+
+ # build system installs docs that we installed above
+ rm -f "${D}"/usr/share/denyhosts/*.txt
+
+ keepdir /var/lib/denyhosts
+}
+
+pkg_postinst() {
+ distutils_pkg_postinst
+
+ if [[ ! -f "${ROOT}etc/hosts.deny" ]]; then
+ touch "${ROOT}etc/hosts.deny"
+ fi
+
+ if [ "$(rc-config list default | grep denyhosts)" = "" ] ; then
+ elog "You can configure DenyHosts to run as a daemon by running:"
+ elog
+ elog "rc-update add denyhosts default"
+ elog
+ fi
+
+ elog "To run DenyHosts as a cronjob instead of a daemon add the following"
+ elog "to /etc/crontab"
+ elog "# run DenyHosts every 10 minutes"
+ elog "*/10 * * * * root /usr/bin/denyhosts.py -c /etc/denyhosts.conf"
+ elog
+ elog "More information can be found at http://denyhosts.sourceforge.net/faq.html"
+ elog
+ ewarn "Modify /etc/denyhosts.conf to suit your environment system."
+}
diff --git a/app-admin/denyhosts/files/denyhosts-2.6-daemon-control.patch b/app-admin/denyhosts/files/denyhosts-2.6-daemon-control.patch
new file mode 100644
index 000000000000..1a733e41280e
--- /dev/null
+++ b/app-admin/denyhosts/files/denyhosts-2.6-daemon-control.patch
@@ -0,0 +1,12 @@
+diff -up ./daemon-control-dist.orig ./daemon-control-dist
+--- ./daemon-control-dist.orig 2006-04-21 18:04:43.000000000 -0500
++++ ./daemon-control-dist 2008-08-28 11:05:01.000000000 -0500
+@@ -13,7 +13,7 @@
+
+ DENYHOSTS_BIN = "/usr/bin/denyhosts.py"
+ DENYHOSTS_LOCK = "/var/lock/subsys/denyhosts"
+-DENYHOSTS_CFG = "/usr/share/denyhosts/denyhosts.cfg"
++DENYHOSTS_CFG = "/etc/denyhosts.conf"
+
+ PYTHON_BIN = "/usr/bin/env python"
+
diff --git a/app-admin/denyhosts/files/denyhosts-2.6-defconffile.patch b/app-admin/denyhosts/files/denyhosts-2.6-defconffile.patch
new file mode 100644
index 000000000000..c384367d0031
--- /dev/null
+++ b/app-admin/denyhosts/files/denyhosts-2.6-defconffile.patch
@@ -0,0 +1,12 @@
+diff -up ./DenyHosts/constants.py.defconffile ./DenyHosts/constants.py
+--- ./DenyHosts/constants.py.defconffile 2008-07-01 18:12:34.000000000 -0500
++++ ./DenyHosts/constants.py 2008-07-01 18:12:43.000000000 -0500
+@@ -36,7 +36,7 @@ PURGE_HISTORY = "purge-history"
+ # Miscellaneous constants #
+ #################################################################################
+
+-CONFIG_FILE = "denyhosts.cfg" # default can be overridden on cmd line
++CONFIG_FILE = "/etc/denyhosts.conf" # default can be overridden on cmd line
+
+ DENY_DELIMITER = "# DenyHosts:"
+ ENTRY_DELIMITER = " | "
diff --git a/app-admin/denyhosts/files/denyhosts-2.6-foreground_mode.patch b/app-admin/denyhosts/files/denyhosts-2.6-foreground_mode.patch
new file mode 100644
index 000000000000..9f10707f9be8
--- /dev/null
+++ b/app-admin/denyhosts/files/denyhosts-2.6-foreground_mode.patch
@@ -0,0 +1,137 @@
+From: Marco Bertorello <marco@bertorello.ns0.it>
+Date: Thu, 14 Apr 2011 00:11:35 +0200
+Subject: 08_foreground_mode
+
+Add a useful switch to denyhost for run in foreground/debugging mode
+---
+ DenyHosts/deny_hosts.py | 9 +++++++--
+ denyhosts.py | 20 +++++++++++++-------
+ 2 files changed, 20 insertions(+), 9 deletions(-)
+
+diff --git a/DenyHosts/deny_hosts.py b/DenyHosts/deny_hosts.py
+index 7a985e6..f308264 100644
+--- a/DenyHosts/deny_hosts.py
++++ b/DenyHosts/deny_hosts.py
+@@ -41,7 +41,7 @@ error = logging.getLogger("denyhosts").error
+ 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
+@@ -49,6 +49,7 @@ class DenyHosts:
+ self.__noemail = noemail
+ self.__report = Report(prefs.get("HOSTNAME_LOOKUP"), is_true(prefs['SYSLOG_REPORT']))
+ 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"))
+@@ -87,7 +88,7 @@ class DenyHosts:
+ 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)
+
+@@ -101,6 +102,10 @@ class DenyHosts:
+ 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 --git a/denyhosts.py b/denyhosts.py
+index 48bd837..727e565 100755
+--- a/denyhosts.py
++++ b/denyhosts.py
+@@ -34,6 +34,7 @@ def usage():
+ 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"
+
+@@ -63,6 +64,7 @@ if __name__ == '__main__':
+ purge = 0
+ sync_mode = 0
+ daemon = 0
++ foreground = 0
+ enable_debug = 0
+ upgrade099 = 0
+ args = sys.argv[1:]
+@@ -70,8 +72,8 @@ if __name__ == '__main__':
+ (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()
+@@ -101,6 +103,8 @@ if __name__ == '__main__':
+ sync_mode = 1
+ if opt == '--daemon':
+ daemon = 1
++ if opt == '--foreground':
++ foreground = 1
+ if opt == '--upgrade099':
+ upgrade099 = 1
+ if opt == '--version':
+@@ -131,21 +135,21 @@ if __name__ == '__main__':
+
+ 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()
+@@ -162,7 +166,9 @@ if __name__ == '__main__':
+ 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:
+@@ -170,7 +176,7 @@ if __name__ == '__main__':
+ 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.")
+--
diff --git a/app-admin/denyhosts/files/denyhosts-2.6-hostname.patch b/app-admin/denyhosts/files/denyhosts-2.6-hostname.patch
new file mode 100644
index 000000000000..56d881319c5f
--- /dev/null
+++ b/app-admin/denyhosts/files/denyhosts-2.6-hostname.patch
@@ -0,0 +1,21 @@
+diff -up ./denyhosts.py.orig ./denyhosts.py
+--- ./denyhosts.py.orig 2012-01-30 13:14:41.146715839 -0600
++++ ./denyhosts.py 2012-01-30 14:45:14.372539341 -0600
+@@ -1,5 +1,6 @@
+ #!/usr/bin/env python
+ import os
++import platform
+ import sys
+
+ import DenyHosts.python_version
+@@ -107,6 +108,10 @@ if __name__ == '__main__':
+ print "DenyHosts version:", VERSION
+ sys.exit(0)
+
++ # This is generally expected to be in the environment, but there's no
++ # non-hackish way to get systemd to set it, so just hack it in here.
++ os.environ['HOSTNAME'] = platform.node()
++
+ prefs = Prefs(config_file)
+
+ first_time = 0
diff --git a/app-admin/denyhosts/files/denyhosts-2.6-plugin_deny.patch b/app-admin/denyhosts/files/denyhosts-2.6-plugin_deny.patch
new file mode 100644
index 000000000000..74868e79678c
--- /dev/null
+++ b/app-admin/denyhosts/files/denyhosts-2.6-plugin_deny.patch
@@ -0,0 +1,23 @@
+From: Marco Bertorello <marco@bertorello.ns0.it>
+Date: Thu, 14 Apr 2011 00:11:35 +0200
+Subject: 09_plugin_deny
+
+Correct the upstream bug http://sourceforge.net/tracker/index.php?func=detail&aid=1734736&group_id=131204&atid=720419
+---
+ DenyHosts/deny_hosts.py | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/DenyHosts/deny_hosts.py b/DenyHosts/deny_hosts.py
+index f308264..0f5f48d 100644
+--- a/DenyHosts/deny_hosts.py
++++ b/DenyHosts/deny_hosts.py
+@@ -443,7 +443,7 @@ allowed based on your %s file""" % (self.__prefs.get("HOSTS_DENY"),
+ self.__report.add_section(msg, new_denied_hosts)
+ if self.__sync_server: self.sync_add_hosts(new_denied_hosts)
+ plugin_deny = self.__prefs.get('PLUGIN_DENY')
+- if plugin_deny: plugin.execute(plugin_deny, deny_hosts)
++ if plugin_deny: plugin.execute(plugin_deny, new_denied_hosts)
+
+ new_suspicious_logins = login_attempt.get_new_suspicious_logins()
+ if new_suspicious_logins:
+--
diff --git a/app-admin/denyhosts/files/denyhosts-2.6-single_config_switch.patch b/app-admin/denyhosts/files/denyhosts-2.6-single_config_switch.patch
new file mode 100644
index 000000000000..cb39df977be6
--- /dev/null
+++ b/app-admin/denyhosts/files/denyhosts-2.6-single_config_switch.patch
@@ -0,0 +1,24 @@
+From: Marco Bertorello <marco@bertorello.ns0.it>
+Date: Thu, 14 Apr 2011 00:11:35 +0200
+Subject: 11_single_config_switch
+
+A patch to prevent denyhosts running with a double --config switch
+---
+ daemon-control-dist | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/daemon-control-dist b/daemon-control-dist
+index 9f42b60..14d0f70 100755
+--- a/daemon-control-dist
++++ b/daemon-control-dist
+@@ -144,7 +144,8 @@ if __name__ == '__main__':
+
+ try:
+ if option in ('start', 'restart', 'condrestart'):
+- if '--config' not in args and '-c' not in args:
++ anystartswith = lambda prefix, xs: any(map(lambda x: x.startswith(prefix), xs))
++ if not anystartswith('--config', args) and '-c' not in args:
+ args.append("--config=%s" % DENYHOSTS_CFG)
+
+ cmd = cases[option]
+--