Sophie

Sophie

distrib > Mandriva > 9.1 > i586 > by-pkgid > 36b44d4cdaacc6628114e5b0fcc398ab > files > 2

apache2-mod_fortress-2.0.44_1.0-4mdk.src.rpm

#Module-Specific definitions
%define mod_version 1.0
%define release 4mdk
%define mod_name mod_fortress
%define mod_conf 81_%{mod_name}.conf
%define mod_so %{mod_name}.so
%define sourcename %{mod_name}-%{mod_version}

#New ADVX macros
%define ADVXdir %{_datadir}/ADVX
%{expand:%(cat %{ADVXdir}/ADVX-build)}
%{expand:%%global ap_version %(%{apxs} -q ap_version)}

# Standard Module Definitions
%define name %{ap_name}-%{mod_name}
%define version %{ap_version}_%{mod_version}

#Standard ADVX requires
Prereq:		%{ap_name} = %{ap_version}
Prereq:		%{ap_name}-conf
BuildRequires:  ADVX-build >= 1.2
BuildRequires:  %{ap_name}-devel >= 2.0.44-6mdk
Provides: 	ADVXpackage
Provides:	AP20package

Summary:	Mod_fortress is a DSO module for the %{ap_name} Web server.
Name:		%{name}
Version:	%{version}
Release:	%{release}
Group:		System/Servers
Source0:	%{sourcename}.tar.bz2
Source1:	%{mod_conf}.bz2
Source2:	mod_fortress_signatures.conf.bz2

License:	GPL
URL:		http://www.spunge.org/~io/fortress.html
BuildRoot:	%{_tmppath}/%{name}-buildroot
Prereq:		rpm-helper

%description
mod_fortress is an HTTP application firewall and intrusion
detection system, it relies on analysing requests sent from the
client to the webserver, and logs specific malicious requests with
extensive info about the attacker as well as the attacked server 
(if multiple virtual servers). It also has the ability to act as a
non-transparent proxy, thus, protecting/obscuring your server via
sending false return HTTP error codes.

%prep

%setup -q -n fortress
#Fix symbol conflict between mod_fortress and mod_smbauth
#Programmers lack imagination when creating function names!
perl -pi -e "s/strupper/fort_strupper/g;" mod_fortress.c

%build

%{apxs} -c %{mod_name}.c

%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%ADVXinstlib
%ADVXinstconf %{SOURCE1} %{mod_conf}
%ADVXinstdoc %{name}-%{version}

install -d %{buildroot}%{_sysconfdir}/httpd/conf
bzcat %{SOURCE2} > %{buildroot}%{_sysconfdir}/httpd/conf/mod_fortress_signatures.conf

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%post
%ADVXpost

%postun
%ADVXpost

%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog README TODO
%config(noreplace) %{ap_confd}/%{mod_conf}
%config(noreplace) %{_sysconfdir}/httpd/conf/mod_fortress_signatures.conf
%{ap_extralibs}/%{mod_so}
%{ap_webdoc}/*

%changelog
* Fri Feb 28 2003 Jean-Michel Dault <jmdault@mandrakesoft.com> 2.0.44_1.0-4mdk
- Fix symbol conflict between mod_fortress and mod_smbauth
  Programmers lack imagination when creating function names!
- The module works perfectly now.
- Add new config files from Oden.

* Sat Feb 22 2003 Jean-Michel Dault <jmdault@mandrakesoft.com> 2.0.44_1.0-3mdk
- THIS MODULE SEGFAULTS! 
- Tried to see what was going on, but the module if full of defines, and
  code for apache 1.3, apache 2.0, for Unix and Win32 are intermangled
  together. This s*cks, and is impossible to fix unless the author writes 
  a new version.
- I commented out the LoadModule in the configuration file, this way, the
  module will never get loaded. 

* Thu Jan 23 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.44_1.0-2mdk
- fix bug in S1 (offending ^M's)

* Tue Jan 21 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.44_1.0-1mdk
- initial cooker contrib