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
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 DenyHosts is a script intended to be run by Linux system
25 administrators to help thwart SSH server attacks.
27 If you've ever looked at your SSH log (/var/log/secure on Redhat,
28 /var/log/auth.log on Mandrake, etc...) you may be alarmed to see how
29 many hackers attempted to gain access to your server. Hopefully, none
30 of them were successful (but then again, how would you know?).
31 Wouldn't it be better to automatically prevent that attacker from
32 continuing to gain entry into your system?
34 %description -l pl.UTF-8
35 DenyHosts jest skryptem dla administratorów systemów Linux, którego
36 zadaniem jest odparcie ataków na serwery SSH.
38 W logach SSH można znaleźć wiele informacji o próbach uzyskania
39 dostępu do serwera poprzez usługę SSH. Dobrze jest zapobiec kolejnym
40 próbom włamania przez odcięcie włamywaczom dostępu do serwera.
46 echo 'VERSION="%{version}"' > version.py
50 rm -rf $RPM_BUILD_ROOT
51 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/cron.d,/etc/rc.d/init.d,%{_sbindir},/var/lib/%{name}}
53 python setup.py install \
54 --root=$RPM_BUILD_ROOT \
57 install %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.d/%{name}
58 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}
59 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
60 mv $RPM_BUILD_ROOT%{_datadir}/denyhosts/daemon-control-dist $RPM_BUILD_ROOT%{_sbindir}/%{name}ctl
61 rm $RPM_BUILD_ROOT%{py_sitescriptdir}/%{name}/*.py
62 rm -r $RPM_BUILD_ROOT%{_datadir}/denyhosts
63 echo "127.0.0.1" > $RPM_BUILD_ROOT/var/lib/%{name}/allowed-hosts
66 rm -rf $RPM_BUILD_ROOT
69 /sbin/chkconfig --add %{name}
70 %service DenyHosts restart
73 if [ "$1" = "0" ]; then
74 %service DenyHosts stop
75 /sbin/chkconfig --del %{name}
79 %defattr(644,root,root,755)
80 %doc README.txt CHANGELOG.txt
81 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.cfg
82 %config(noreplace,missingok) %verify(not md5 mtime size) /etc/cron.d/%{name}
83 %attr(755,root,root) %{_bindir}/*
84 %attr(755,root,root) %{_sbindir}/*
85 %attr(754,root,root) /etc/rc.d/init.d/%{name}
87 %config(noreplace) %verify(not md5 mtime size) /var/lib/%{name}/allowed-hosts
88 %{py_sitescriptdir}/DenyHosts-*.egg-info
89 %dir %{py_sitescriptdir}/%{name}
90 %{py_sitescriptdir}/%{name}/*.py[co]