summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Pazdziora <jpazdziora@redhat.com>2014-01-06 15:27:07 +0800
committerJan Pazdziora <jpazdziora@redhat.com>2014-01-09 09:24:56 +0800
commit476703f669d8795ffe7684d1d400191545ce6f6f (patch)
tree3969dcb0a2501284a297e075d58ea5b79d1c097e
parentb21b2a6b89959a76cfde6a766508c0f1cb85b3ee (diff)
downloadmod_authnz_pam-476703f669d8795ffe7684d1d400191545ce6f6f.tar.gz
mod_authnz_pam-476703f669d8795ffe7684d1d400191545ce6f6f.tar.xz
mod_authnz_pam-476703f669d8795ffe7684d1d400191545ce6f6f.zip
Sample config and .spec file.mod_authnz_pam-0.5
-rw-r--r--authnz_pam.conf22
-rw-r--r--mod_authnz_pam.spec61
2 files changed, 83 insertions, 0 deletions
diff --git a/authnz_pam.conf b/authnz_pam.conf
new file mode 100644
index 0000000..41cb70d
--- /dev/null
+++ b/authnz_pam.conf
@@ -0,0 +1,22 @@
+
+# LoadModule authnz_pam_module modules/mod_authnz_pam.so
+#
+# <Location /protected>
+# AuthType Basic
+# AuthName "private area"
+# AuthBasicProvider PAM
+# AuthPAMService webapp
+# Require valid-user
+# </Location>
+#
+# <Location /login>
+# AuthType Kerberos
+# AuthName "Kerberos Login"
+# KrbMethodNegotiate On
+# KrbMethodK5Passwd Off
+# KrbAuthRealms EXAMPLE.COM
+# Krb5KeyTab /etc/http.keytab
+# KrbLocalUserMapping On
+# Require pam-account webapp
+# </Location>
+
diff --git a/mod_authnz_pam.spec b/mod_authnz_pam.spec
new file mode 100644
index 0000000..9178823
--- /dev/null
+++ b/mod_authnz_pam.spec
@@ -0,0 +1,61 @@
+%{!?_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: PAM Basic Authentication provider and authorization checker
+Name: mod_authnz_pam
+Version: 0.5
+Release: 1%{?dist}
+License: ASL 2.0
+Group: System Environment/Daemons
+URL: http://www.adelton.com/apache/mod_authnz_pam/
+Source0: http://www.adelton.com/apache/mod_authnz_pam/%{name}-%{version}.tar.gz
+BuildRequires: httpd-devel
+BuildRequires: pam-devel
+BuildRequires: pkgconfig
+Requires(pre): httpd
+Requires: httpd
+Requires: pam
+
+# Suppres auto-provides for module DSO
+%{?filter_provides_in: %filter_provides_in %{_libdir}/httpd/modules/.*\.so$}
+%{?filter_setup}
+
+%description
+mod_authnz_pam is a Basic Authentication provider which runs the
+[login, password] authentication through the PAM stack; it can also
+be used as an authorization module, supplementing authentication
+done by other modules, for example mod_auth_kerb.
+
+%prep
+%setup -q -n %{name}-%{version}
+
+%build
+%{_httpd_apxs} -c mod_authnz_pam.c -lpam -Wall -pedantic
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -Dm 755 .libs/mod_authnz_pam.so $RPM_BUILD_ROOT%{_httpd_moddir}/mod_authnz_pam.so
+
+%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
+%endif
+
+%files
+%doc README LICENSE
+%if "%{_httpd_modconfdir}" != "%{_httpd_confdir}"
+%config(noreplace) %{_httpd_modconfdir}/*.conf
+%else
+%config(noreplace) %{_httpd_confdir}/authnz_pam.conf
+%endif
+%{_httpd_moddir}/*.so
+
+%changelog
+* Mon Jan 06 2014 Jan Pazdziora - 0.5-1
+- Initial release.