1 Summary: Script to help thwart SSH server attacks
2 Summary(pl.UTF-8): Skrypt do blokowania ataków na serwery SSH
7 Group: Applications/System
8 Source0: http://dl.sourceforge.net/denyhosts/%{name}-%{version}.tar.gz
9 # Source0-md5: fc2365305a9402886a2b0173d1beb7df
13 URL: http://www.denyhosts.net/
14 BuildRequires: python-devel >= 1:2.5
15 BuildRequires: python-modules
16 BuildRequires: rpm-pythonprov
17 BuildRequires: rpmbuild(macros) >= 1.268
18 Requires(post,preun): /sbin/chkconfig
20 Requires: python-modules
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 DenyHosts is a script intended to be run by Linux system
26 administrators to help thwart SSH server attacks.
28 If you've ever looked at your SSH log (/var/log/secure on Redhat,
29 /var/log/auth.log on Mandrake, etc...) you may be alarmed to see how
30 many hackers attempted to gain access to your server. Hopefully, none
31 of them were successful (but then again, how would you know?).
32 Wouldn't it be better to automatically prevent that attacker from
33 continuing to gain entry into your system?
35 %description -l pl.UTF-8
36 DenyHosts jest skryptem dla administratorów systemów Linux, którego
37 zadaniem jest odparcie ataków na serwery SSH.
39 W logach SSH można znaleźć wiele informacji o próbach uzyskania
40 dostępu do serwera poprzez usługę SSH. Dobrze jest zapobiec kolejnym
41 próbom włamania przez odcięcie włamywaczom dostępu do serwera.
47 echo 'VERSION="%{version}"' > version.py
51 rm -rf $RPM_BUILD_ROOT
52 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/cron.d,/etc/rc.d/init.d,%{_sbindir},/var/lib/%{name}}
54 python setup.py install \
55 --root=$RPM_BUILD_ROOT \
58 install %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.d/%{name}
59 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}
60 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
61 mv $RPM_BUILD_ROOT%{_datadir}/denyhosts/daemon-control-dist $RPM_BUILD_ROOT%{_sbindir}/%{name}ctl
62 rm $RPM_BUILD_ROOT%{py_sitescriptdir}/%{name}/*.py
63 rm -r $RPM_BUILD_ROOT%{_datadir}/denyhosts
64 echo "127.0.0.1" > $RPM_BUILD_ROOT/var/lib/%{name}/allowed-hosts
67 rm -rf $RPM_BUILD_ROOT
70 /sbin/chkconfig --add %{name}
71 %service DenyHosts restart
74 if [ "$1" = "0" ]; then
75 %service DenyHosts stop
76 /sbin/chkconfig --del %{name}
80 %defattr(644,root,root,755)
81 %doc README.txt CHANGELOG.txt
82 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.cfg
83 %config(noreplace,missingok) %verify(not md5 mtime size) /etc/cron.d/%{name}
84 %attr(755,root,root) %{_bindir}/*
85 %attr(755,root,root) %{_sbindir}/*
86 %attr(754,root,root) /etc/rc.d/init.d/%{name}
88 %config(noreplace) %verify(not md5 mtime size) /var/lib/%{name}/allowed-hosts
89 %{py_sitescriptdir}/DenyHosts-*.egg-info
90 %dir %{py_sitescriptdir}/%{name}
91 %{py_sitescriptdir}/%{name}/*.py[co]