]>
Commit | Line | Data |
---|---|---|
b2157cc2 | 1 | Summary: Script to help thwart SSH server attacks |
688ab4ae | 2 | Summary(pl.UTF-8): Skrypt do blokowania ataków na serwery SSH |
cb64b9ac | 3 | Name: DenyHosts |
0477d14c MB |
4 | Version: 2.6 |
5 | Release: 1 | |
bb66a4c6 | 6 | License: GPL v2 |
cb64b9ac | 7 | Group: Applications/System |
93ac586d | 8 | Source0: http://dl.sourceforge.net/denyhosts/%{name}-%{version}.tar.gz |
0477d14c | 9 | # Source0-md5: fc2365305a9402886a2b0173d1beb7df |
cb64b9ac | 10 | Source1: %{name}.cron |
11 | Source2: %{name}.cfg | |
75d37289 | 12 | Source3: %{name}.init |
5d2c4546 | 13 | URL: http://www.denyhosts.net/ |
0477d14c | 14 | BuildRequires: python-devel >= 1:2.5 |
711ced82 | 15 | BuildRequires: python-modules |
16 | BuildRequires: rpm-pythonprov | |
4cfdae93 | 17 | BuildRequires: rpmbuild(macros) >= 1.268 |
66c5315b | 18 | Requires(post,preun): /sbin/chkconfig |
b711731f | 19 | Requires: python |
288da489 | 20 | Requires: python-modules |
66c5315b | 21 | Requires: rc-scripts |
cb64b9ac | 22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
23 | ||
24 | %description | |
25 | DenyHosts is a script intended to be run by Linux system | |
b2157cc2 | 26 | administrators to help thwart SSH server attacks. |
cb64b9ac | 27 | |
b2157cc2 | 28 | If you've ever looked at your SSH log (/var/log/secure on Redhat, |
cb64b9ac | 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? | |
34 | ||
6aea5cf1 JR |
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. | |
cb64b9ac | 38 | |
6aea5cf1 JR |
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. | |
cb64b9ac | 42 | |
43 | %prep | |
44 | %setup -q | |
cb64b9ac | 45 | |
46 | %build | |
cb64b9ac | 47 | echo 'VERSION="%{version}"' > version.py |
48 | python setup.py build | |
49 | ||
50 | %install | |
51 | rm -rf $RPM_BUILD_ROOT | |
75d37289 | 52 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/cron.d,/etc/rc.d/init.d,%{_sbindir},/var/lib/%{name}} |
cb64b9ac | 53 | |
54 | python setup.py install \ | |
55 | --root=$RPM_BUILD_ROOT \ | |
56 | --optimize=2 | |
57 | ||
b2157cc2 | 58 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.d/%{name} |
cb64b9ac | 59 | install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir} |
75d37289 | 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 | |
cb64b9ac | 65 | |
cb64b9ac | 66 | %clean |
67 | rm -rf $RPM_BUILD_ROOT | |
68 | ||
75d37289 | 69 | %post |
70 | /sbin/chkconfig --add %{name} | |
4cfdae93 | 71 | %service DenyHosts restart |
75d37289 | 72 | |
73 | %preun | |
74 | if [ "$1" = "0" ]; then | |
4cfdae93 | 75 | %service DenyHosts stop |
711ced82 | 76 | /sbin/chkconfig --del %{name} |
75d37289 | 77 | fi |
78 | ||
cb64b9ac | 79 | %files |
80 | %defattr(644,root,root,755) | |
75d37289 | 81 | %doc README.txt CHANGELOG.txt |
cb64b9ac | 82 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.cfg |
f7f90951 | 83 | %config(noreplace,missingok) %verify(not md5 mtime size) /etc/cron.d/%{name} |
cb64b9ac | 84 | %attr(755,root,root) %{_bindir}/* |
75d37289 | 85 | %attr(755,root,root) %{_sbindir}/* |
caefdfa1 | 86 | %attr(754,root,root) /etc/rc.d/init.d/%{name} |
75d37289 | 87 | %dir /var/lib/%{name} |
132d470c | 88 | %config(noreplace) %verify(not md5 mtime size) /var/lib/%{name}/allowed-hosts |
0477d14c | 89 | %{py_sitescriptdir}/DenyHosts-*.egg-info |
75d37289 | 90 | %dir %{py_sitescriptdir}/%{name} |
91 | %{py_sitescriptdir}/%{name}/*.py[co] |