summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Pazdziora <jpazdziora@redhat.com>2014-06-23 14:05:31 +0200
committerJan Pazdziora <jpazdziora@redhat.com>2014-06-23 14:25:36 +0200
commitbfaf0205b2dee4814f9eef65dcb034e829b6f133 (patch)
tree4c6bcb2d55d237dd0600149de62f1b50333ecb27
parentb74c74f5425d8db489f5273f5594f2c0e5b77815 (diff)
downloadmod_authnz_pam-bfaf0205b2dee4814f9eef65dcb034e829b6f133.tar.gz
mod_authnz_pam-bfaf0205b2dee4814f9eef65dcb034e829b6f133.tar.xz
mod_authnz_pam-bfaf0205b2dee4814f9eef65dcb034e829b6f133.zip
For Apache 2.4, separate module loading from configuration.
-rw-r--r--authnz_pam.conf2
-rw-r--r--authnz_pam.module3
-rw-r--r--mod_authnz_pam.spec15
3 files changed, 12 insertions, 8 deletions
diff --git a/authnz_pam.conf b/authnz_pam.conf
index da57cd8..e579e39 100644
--- a/authnz_pam.conf
+++ b/authnz_pam.conf
@@ -1,6 +1,4 @@
-# LoadModule authnz_pam_module modules/mod_authnz_pam.so
-#
# <Location /login>
# AuthType Kerberos
# AuthName "Kerberos Login"
diff --git a/authnz_pam.module b/authnz_pam.module
new file mode 100644
index 0000000..841c594
--- /dev/null
+++ b/authnz_pam.module
@@ -0,0 +1,3 @@
+
+# LoadModule authnz_pam_module modules/mod_authnz_pam.so
+
diff --git a/mod_authnz_pam.spec b/mod_authnz_pam.spec
index a508d1a..ba900ba 100644
--- a/mod_authnz_pam.spec
+++ b/mod_authnz_pam.spec
@@ -36,6 +36,12 @@ can also be used as full Basic Authentication provider which runs the
%build
%{_httpd_apxs} -c -Wc,"%{optflags} -Wall -pedantic -std=c99" -lpam mod_authnz_pam.c
+%if "%{_httpd_modconfdir}" != "%{_httpd_confdir}"
+cp authnz_pam.conf authnz_pam.confx
+%else
+cat authnz_pam.module > authnz_pam.confx
+cat authnz_pam.conf >> authnz_pam.confx
+%endif
%install
rm -rf $RPM_BUILD_ROOT
@@ -43,19 +49,16 @@ install -Dm 755 .libs/mod_authnz_pam.so $RPM_BUILD_ROOT%{_httpd_moddir}/mod_auth
%if "%{_httpd_modconfdir}" != "%{_httpd_confdir}"
# httpd >= 2.4.x
-install -Dp -m 0644 authnz_pam.conf $RPM_BUILD_ROOT%{_httpd_modconfdir}/55-authnz_pam.conf
-%else
-# httpd <= 2.2.x
-install -Dp -m 0644 authnz_pam.conf $RPM_BUILD_ROOT%{_httpd_confdir}/authnz_pam.conf
+install -Dp -m 0644 authnz_pam.module $RPM_BUILD_ROOT%{_httpd_modconfdir}/55-authnz_pam.conf
%endif
+install -Dp -m 0644 authnz_pam.confx $RPM_BUILD_ROOT%{_httpd_confdir}/authnz_pam.conf
%files
%doc README LICENSE
%if "%{_httpd_modconfdir}" != "%{_httpd_confdir}"
%config(noreplace) %{_httpd_modconfdir}/55-authnz_pam.conf
-%else
-%config(noreplace) %{_httpd_confdir}/authnz_pam.conf
%endif
+%config(noreplace) %{_httpd_confdir}/authnz_pam.conf
%{_httpd_moddir}/*.so
%changelog