rpms/denyhosts/devel denyhosts-0.5.5-workdir.patch, NONE, 1.1 denyhosts-allowed-hosts, NONE, 1.1 denyhosts.cron, NONE, 1.1 denyhosts.init, NONE, 1.1 denyhosts.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Aaron Kurtz (dragoon) fedora-extras-commits at redhat.com
Fri May 20 04:57:04 UTC 2005


Author: dragoon

Update of /cvs/extras/rpms/denyhosts/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23729/devel

Modified Files:
	.cvsignore sources 
Added Files:
	denyhosts-0.5.5-workdir.patch denyhosts-allowed-hosts 
	denyhosts.cron denyhosts.init denyhosts.spec 
Log Message:
auto-import denyhosts-0.5.5-2 on branch devel from denyhosts-0.5.5-2.src.rpm

denyhosts-0.5.5-workdir.patch:

--- NEW FILE denyhosts-0.5.5-workdir.patch ---
--- denyhosts.cfg-dist.orig	2005-05-12 15:27:50.811623951 -0500
+++ denyhosts.cfg-dist	2005-05-12 15:28:22.074067140 -0500
@@ -52,7 +52,7 @@
 #
 # WORK_DIR: the path that DenyHosts will use for writing data to
 # (it will be created if it does not already exist).       
-WORK_DIR = denyhosts
+WORK_DIR = /var/lib/denyhosts
 #
 #######################################################################
 


--- NEW FILE denyhosts-allowed-hosts ---
# We mustn't block localhost
127.0.0.1


--- NEW FILE denyhosts.cron ---
*/10 * * * * root [ -f /var/lock/subsys/denyhosts ] && /usr/bin/denyhosts.py -c /etc/denyhosts.conf



--- NEW FILE denyhosts.init ---
#!/bin/bash
#
# denyhosts     This shell script enables the denyhosts cron job
#
# Author:       Seth Vidal <skvidal at phy.duke.edu> (original script)
#		Jason Tibbitts <tibbs at math.uh.edu> (denyhost changes)
#
# chkconfig:	- 50 01
#
# description:  Enable periodic execution of denyhosts, an SSH log watcher
# processname	denyhosts
# config:	/etc/denyhosts.cfg
#

# source function library
. /etc/rc.d/init.d/functions

lockfile=/var/lock/subsys/denyhosts

RETVAL=0

start() {
	echo -n $"Enabling denyhosts: "
	touch "$lockfile" && success || failure
	RETVAL=$?
	echo
}

stop() {
	echo -n $"Disabling denyhosts: "
	rm -f "$lockfile" && success || failure
	RETVAL=$?
	echo
}

restart() {
	stop
	start
}

case "$1" in
  start)
	start
	;;
  stop) 
	stop
	;;
  restart|force-reload)
	restart
	;;
  reload)
	;;
  condrestart)
	[ -f "$lockfile" ] && restart
	;;
  status)
	if [ -f $lockfile ]; then
		echo $"Denyhosts is enabled."
		RETVAL=0
	else
		echo $"Denyhosts is disabled."
		RETVAL=3
	fi
	;;
  *)
	echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart}"
	exit 1
esac

exit $RETVAL


--- NEW FILE denyhosts.spec ---
Name:           denyhosts
Version:        0.5.5
Release: 2%{?dist}
Summary:        A script to help thwart ssh server attacks

Group:          Applications/System
License:        GPL
URL:            http://denyhosts.sourceforge.net/
Source0:        http://dl.sourceforge.net/denyhosts/DenyHosts-%{version}.tar.gz
Source1:	denyhosts.cron
Source2:	denyhosts.init
Source3:	denyhosts-allowed-hosts
Patch0:		denyhosts-0.5.5-workdir.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArchitectures: noarch

#BuildRequires:  
Requires:       openssh-server

%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.

%prep
%setup -q -n DenyHosts-%{version}
%patch0 -p0 

%install
rm -rf $RPM_BUILD_ROOT

install -d $RPM_BUILD_ROOT%{_bindir}
install -d $RPM_BUILD_ROOT%{_initrddir}
install -d $RPM_BUILD_ROOT%{_sysconfdir}/cron.d

install -d -m 700 $RPM_BUILD_ROOT%{_localstatedir}/lib/denyhosts

install -p -m 755 denyhosts.py $RPM_BUILD_ROOT%{_bindir}
install -p -m 600 denyhosts.cfg-dist $RPM_BUILD_ROOT%{_sysconfdir}/denyhosts.conf
install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/denyhosts
install -p -m 755 %{SOURCE2} $RPM_BUILD_ROOT%{_initrddir}/denyhosts
install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_localstatedir}/lib/denyhosts/allowed-hosts

for i in allowed-warned-hosts hosts offset suspicious-logins \
         users-hosts users-invalid users-valid; do
  touch $RPM_BUILD_ROOT%{_localstatedir}/lib/denyhosts/$i
done


%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/chkconfig --add denyhosts
/sbin/service denyhosts condrestart >> /dev/null
exit 0

%preun
if [ $1 = 0 ]; then
  /sbin/chkconfig --del denyhosts
  /sbin/service denyhosts stop >> /dev/null
fi
exit 0

%files
%defattr(-,root,root,-)
%doc LICENSE.txt README.txt setup.py
%config(noreplace) %{_sysconfdir}/denyhosts.conf
%config(noreplace) %{_sysconfdir}/cron.d/denyhosts
%config(noreplace) %{_localstatedir}/lib/denyhosts/allowed-hosts

%ghost %{_localstatedir}/lib/denyhosts/allowed-warned-hosts
%ghost %{_localstatedir}/lib/denyhosts/hosts
%ghost %{_localstatedir}/lib/denyhosts/offset
%ghost %{_localstatedir}/lib/denyhosts/suspicious-logins
%ghost %{_localstatedir}/lib/denyhosts/users-hosts
%ghost %{_localstatedir}/lib/denyhosts/users-invalid
%ghost %{_localstatedir}/lib/denyhosts/users-valid

%dir %{_localstatedir}/lib/denyhosts

%{_bindir}/denyhosts.py
%{_initrddir}/denyhosts

%changelog
* Thu May 19 2005 Jason L Tibbitts III <tibbs at math.uh.edu> - 0.5.5-2
- Use dist tag
- Don't automatically enable at install time
- Include %ghost'ed allowed-warned-hosts file
- Use %ghost instead of including zero length files.
- Source is at dl.sourceforge.net

* Thu May 12 2005 Jason L Tibbitts III <tibbs at math.uh.edu> - 0.5.5-1
- Initial build



Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/denyhosts/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	20 May 2005 04:56:16 -0000	1.1
+++ .cvsignore	20 May 2005 04:57:02 -0000	1.2
@@ -0,0 +1 @@
+DenyHosts-0.5.5.tar.gz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/denyhosts/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	20 May 2005 04:56:16 -0000	1.1
+++ sources	20 May 2005 04:57:02 -0000	1.2
@@ -0,0 +1 @@
+e5b49f8e949d3afd3bbd9d4611267dae  DenyHosts-0.5.5.tar.gz




More information about the fedora-extras-commits mailing list