# $Id: smeserver-denyhosts.spec,v 1.2 2008/04/22 02:07:45 unnilennium Exp $ # Authority: unnilennium # Name: Jean-Philippe Pialasse Summary: smeserver-denyhosts %define name smeserver-denyhosts # Variable representing installation directories: %define installdir_denyhosts /etc/e-smith/web/functions %define installdir_denyhosts_python /usr/lib/python2.3/site-packages/DenyHosts Name: %{name} %define version 2.6 %define release 0.6 Version: %{version} Release: %{release}%{?dist} License: GPL Group: Applications/System Source: %{name}-%{version}.tgz Url: http://smeserver.pialasse.com/ BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot BuildArch: noarch Patch1: smeserver-denyhosts-2.6-patch1.patch Patch2: smeserver-denyhosts-2.6-patch2.patch BuildRequires: e-smith-devtools >= 1.13.1-03 Requires: smeserver-release >= 7.0 %description DenyHosts is a Python script that analyzes the sshd server log messages to determine which hosts are attempting to hack into your system. It also determines what user accounts are being targeted. It keeps track of the frequency of attempts from each host and, upon discovering a repeated attack host, updates the /etc/hosts.deny file to prevent future break-in attempts from that host. Email reports can be sent to a system admin. http://denyhosts.sourceforge.net/ %prep %setup %patch1 -p1 %patch2 -p1 %build perl createlinks mkdir -p root/share/denyhosts/data mkdir -p root/etc/e-smith/db/configuration/defaults/denyhosts echo "service" > root/etc/e-smith/db/configuration/defaults/denyhosts/type echo "disabled" > root/etc/e-smith/db/configuration/defaults/denyhosts/status %install /bin/rm -rf $RPM_BUILD_ROOT (cd root ; /usr/bin/find . -depth -print | /bin/cpio -dump $RPM_BUILD_ROOT) /bin/rm -f %{name}-%{version}-filelist /sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist %files -f %{name}-%{version}-filelist %defattr(-,root,root,-) %defattr(-,root,root) %attr(0644,root,root) %config(noreplace) /etc/hosts.evil %attr(0644,root,root) %config(noreplace) /usr/share/denyhosts/data/allowed-hosts %{installdir_denyhosts}/denyhosts %clean rm -rf $RPM_BUILD_ROOT %changelog * Tue Apr 22 2008 JP PIALASSE tests@pialasse.com 2.6-06 - tranlsation of comments into server-manager fucntion - correction of expand template /usr/share/denyhosts/data/ [SME 4200] * Mon Apr 21 2008 JP PIALASSE tests@pialasse.com 2.6-05 - corrections to be added on contribs.org - bug for whiteliste, file is moved to /usr/share/denyhosts/data/ [SME 4200] - HTML bug corrected in the server-manager * Wed Apr 02 2008 JP PIALASSE tests@pialasse.com 2.6-04 - minor bug changes * Mon Mar 31 2008 JP PIALASSE tests@pialasse.com 2.6-0.3 - bug in install scriptlet corrected - bug about XML error on install corrected * Sun Mar 30 2008 JP PIALASSE tests@pialasse.com 2.6-0.2 - incorrect template name for hosts.allow corrected * Sat Mar 29 2008 JP PIALASSE tests@pialasse.com 2.6-0.1 - first package for SME from denyhosts src rpm for fedora core 4 - panel for server-manager