diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5ec3902 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/mod_intercept_form_submit-0.9.8.tar.gz diff --git a/.mod_intercept_form_submit.metadata b/.mod_intercept_form_submit.metadata new file mode 100644 index 0000000..c813f88 --- /dev/null +++ b/.mod_intercept_form_submit.metadata @@ -0,0 +1 @@ +860762757b5bbebba08e9c380069093216e34bbb SOURCES/mod_intercept_form_submit-0.9.8.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SPECS/mod_intercept_form_submit.spec b/SPECS/mod_intercept_form_submit.spec new file mode 100644 index 0000000..813f870 --- /dev/null +++ b/SPECS/mod_intercept_form_submit.spec @@ -0,0 +1,81 @@ +%{!?_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.8 +Release: 2%{?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 per +# https://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering#Summary +%{?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 -std=c99" mod_intercept_form_submit.c +%if "%{_httpd_modconfdir}" != "%{_httpd_confdir}" +echo > intercept_form_submit.confx +echo "# Load the module in %{_httpd_modconfdir}/55-intercept_form_submit.conf" >> intercept_form_submit.confx +cat intercept_form_submit.conf >> intercept_form_submit.confx +%else +cat intercept_form_submit.module > intercept_form_submit.confx +cat intercept_form_submit.conf >> intercept_form_submit.confx +%endif + +%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.module $RPM_BUILD_ROOT%{_httpd_modconfdir}/55-intercept_form_submit.conf +%endif +install -Dp -m 0644 intercept_form_submit.confx $RPM_BUILD_ROOT%{_httpd_confdir}/intercept_form_submit.conf + +%files +%doc README LICENSE docs/* +%if "%{_httpd_modconfdir}" != "%{_httpd_confdir}" +%config(noreplace) %{_httpd_modconfdir}/55-intercept_form_submit.conf +%endif +%config(noreplace) %{_httpd_confdir}/intercept_form_submit.conf +%{_httpd_moddir}/*.so + +%changelog +* Mon Jun 30 2014 Jan Pazdziora - 0.9.8-1 +- 1109923 - Fix module loading/configuration for Apache 2.4. +- Document the runtime dependency on pam_authenticate_with_login_password. +- Comment/code cleanup. + +* Tue May 13 2014 Jan Pazdziora - 0.9.7-1 +- No longer call lookup_identity_hook explicitly, hook order does + the same. +- Silence compile warnings by specifying C99. + +* Tue Apr 15 2014 Jan Pazdziora - 0.9.6-1 +- Add support for InterceptFormLoginRealms. + +* Thu Jan 30 2014 Jan Pazdziora - 0.9.5-1 +- 1058809 - .spec changes for Fedora package review. +