From 07e9d2ed13d21a3df4fd377d804287ed256ba273 Mon Sep 17 00:00:00 2001 From: Jan Pazdziora Date: Fri, 31 Jan 2014 09:20:21 +0800 Subject: [PATCH] Importing mod_intercept_form_submit-0.9.5. --- .gitignore | 1 + mod_intercept_form_submit.spec | 62 ++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 64 insertions(+) create mode 100644 mod_intercept_form_submit.spec diff --git a/.gitignore b/.gitignore index e69de29..c00a8b3 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/mod_intercept_form_submit-0.9.5.tar.gz diff --git a/mod_intercept_form_submit.spec b/mod_intercept_form_submit.spec new file mode 100644 index 0000000..6e91c51 --- /dev/null +++ b/mod_intercept_form_submit.spec @@ -0,0 +1,62 @@ +%{!?_httpd_mmn: %{expand: %%global _httpd_mmn %%(cat %{_includedir}/httpd/.mmn || echo 0-0)}} +%{!?_httpd_apxs: %{expand: %%global _httpd_apxs %%{_sbindir}/apxs}} +%{!?_httpd_confdir: %{expand: %%global _httpd_confdir %%{_sysconfdir}/httpd/conf.d}} +# /etc/httpd/conf.d with httpd < 2.4 and defined as /etc/httpd/conf.modules.d with httpd >= 2.4 +%{!?_httpd_modconfdir: %{expand: %%global _httpd_modconfdir %%{_sysconfdir}/httpd/conf.d}} +%{!?_httpd_moddir: %{expand: %%global _httpd_moddir %%{_libdir}/httpd/modules}} + +Summary: Apache module to intercept login form submission and run PAM authentication +Name: mod_intercept_form_submit +Version: 0.9.5 +Release: 1%{?dist} +License: ASL 2.0 +Group: System Environment/Daemons +URL: http://www.adelton.com/apache/mod_intercept_form_submit/ +Source0: http://www.adelton.com/apache/mod_intercept_form_submit/%{name}-%{version}.tar.gz +BuildRequires: httpd-devel +BuildRequires: pkgconfig +Requires(pre): httpd +Requires: httpd-mmn = %{_httpd_mmn} +Requires: mod_authnz_pam >= 0.7 + +# Suppres auto-provides for module DSO +%{?filter_provides_in: %filter_provides_in %{_libdir}/httpd/modules/.*\.so$} +%{?filter_setup} + +%description +mod_intercept_form_submit can intercept submission of application login +forms. It retrieves the login and password information from the POST +HTTP request, runs PAM authentication with those credentials, and sets +the REMOTE_USER environment variable if the authentication passes. + +%prep +%setup -q -n %{name}-%{version} + +%build +%{_httpd_apxs} -c -Wc,"%{optflags} -Wall -pedantic" mod_intercept_form_submit.c + +%install +rm -rf $RPM_BUILD_ROOT +install -Dm 755 .libs/mod_intercept_form_submit.so $RPM_BUILD_ROOT%{_httpd_moddir}/mod_intercept_form_submit.so + +%if "%{_httpd_modconfdir}" != "%{_httpd_confdir}" +# httpd >= 2.4.x +install -Dp -m 0644 intercept_form_submit.conf $RPM_BUILD_ROOT%{_httpd_modconfdir}/55-intercept_form_submit.conf +%else +# httpd <= 2.2.x +install -Dp -m 0644 intercept_form_submit.conf $RPM_BUILD_ROOT%{_httpd_confdir}/intercept_form_submit.conf +%endif + +%files +%doc README LICENSE docs/* +%if "%{_httpd_modconfdir}" != "%{_httpd_confdir}" +%config(noreplace) %{_httpd_modconfdir}/55-intercept_form_submit.conf +%else +%config(noreplace) %{_httpd_confdir}/intercept_form_submit.conf +%endif +%{_httpd_moddir}/*.so + +%changelog +* Thu Jan 30 2014 Jan Pazdziora - 0.9.5-1 +- 1058809 - .spec changes for Fedora package review. + diff --git a/sources b/sources index e69de29..01349f9 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +aee1b093decfbab0290821ed4dfc0726 mod_intercept_form_submit-0.9.5.tar.gz