summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--authnz_external.conf21
-rw-r--r--mod_authnz_external-3.3.1-remote_ip.patch20
-rw-r--r--mod_authnz_external.spec60
4 files changed, 105 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..1e65467
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,4 @@
+SRCDIR := $(shell pwd)
+NAME := $(shell basename $(SRCDIR))
+include ../common/Makefile
+
diff --git a/authnz_external.conf b/authnz_external.conf
new file mode 100644
index 0000000..0b8a017
--- /dev/null
+++ b/authnz_external.conf
@@ -0,0 +1,21 @@
+
+LoadModule authnz_external_module modules/mod_authnz_external.so
+
+DefineExternalAuth pwauth pipe /usr/bin/pwauth
+
+#
+# see also: http://code.google.com/p/mod-auth-external/wiki/ConfigApache22
+#
+
+#<Location "/staff">
+#
+# # Require SSL connection for password protection.
+# SSLRequireSSL
+#
+# AuthType Basic
+# AuthName "Staff content"
+# AuthBasicProvider external
+# AuthExternal pwauth
+# require valid-user
+#
+#</Location>
diff --git a/mod_authnz_external-3.3.1-remote_ip.patch b/mod_authnz_external-3.3.1-remote_ip.patch
new file mode 100644
index 0000000..821a057
--- /dev/null
+++ b/mod_authnz_external-3.3.1-remote_ip.patch
@@ -0,0 +1,20 @@
+--- mod_authnz_external-3.3.1/mod_authnz_external.c.orig 2011-10-07 12:43:34.000000000 -0600
++++ mod_authnz_external-3.3.1/mod_authnz_external.c 2012-05-06 23:24:41.774553228 -0600
+@@ -443,8 +443,17 @@ static int exec_external(const char *ext
+ if (remote_host != NULL)
+ child_env[i++]= apr_pstrcat(p, ENV_HOST"=", remote_host,NULL);
+
++#if ((AP_SERVER_MAJORVERSION_NUMBER == 2) \
++ && (AP_SERVER_MINORVERSION_NUMBER == 2))
+ if (c->remote_ip)
+ child_env[i++]= apr_pstrcat(p, ENV_IP"=", c->remote_ip, NULL);
++#elif ((AP_SERVER_MAJORVERSION_NUMBER == 2) \
++ && (AP_SERVER_MINORVERSION_NUMBER == 4))
++ if (c->client_ip)
++ child_env[i++]= apr_pstrcat(p, ENV_IP"=", c->client_ip, NULL);
++#else
++#error buildable only under APR 2.2 or 2.4
++#endif
+
+ if (r->uri)
+ child_env[i++]= apr_pstrcat(p, ENV_URI"=", r->uri, NULL);
diff --git a/mod_authnz_external.spec b/mod_authnz_external.spec
new file mode 100644
index 0000000..2146442
--- /dev/null
+++ b/mod_authnz_external.spec
@@ -0,0 +1,60 @@
+%global modsuffix authnz_external
+%global conffile %{modsuffix}.conf
+
+Summary: An Apache module used for authentication
+Name: mod_%{modsuffix}
+Version: 3.3.1
+Release: 1%{?dist}
+License: ASL 1.0
+Group: System Environment/Libraries
+URL: http://code.google.com/p/mod-auth-external/
+Source: http://mod-auth-external.googlecode.com/files/%{name}-%{version}.tar.gz
+Source1: %{conffile}
+Patch1: mod_authnz_external-3.3.1-remote_ip.patch
+Requires: pwauth, httpd-mmn = %(cat %{_includedir}/httpd/.mmn || echo missing)
+BuildRequires: httpd-devel
+
+%description
+Mod_Auth_External can be used to quickly construct secure, reliable
+authentication systems. It can also be mis-used to quickly open gaping
+holes in your security. Read the documentation, and use with extreme
+caution.
+
+%global modulesdir %{_libdir}/httpd/modules
+%global confdir %{_sysconfdir}/httpd/conf
+
+
+%prep
+%setup -q
+%patch1 -p1 -b .remote_ip
+
+%build
+apxs -c -I . %{name}.c
+
+
+%install
+mkdir -p %{buildroot}%{modulesdir} %{buildroot}%{confdir}.d
+apxs -i -S LIBEXECDIR=%{buildroot}%{modulesdir} -n %{name} %{name}.la
+install -p -m 644 -t %{buildroot}%{confdir}.d/ %{SOURCE1}
+
+# in case we're on a 64-bit machine, otherwise a no-op
+sed -i \
+ -e 's@/usr/lib/@%{_libdir}/@' \
+ %{buildroot}%{confdir}.d/%{conffile}
+
+
+%files
+%{modulesdir}/%{name}.so
+%config(noreplace) %lang(en) %{confdir}.d/%{conffile}
+%doc AUTHENTICATORS CHANGES README TODO UPGRADE
+
+
+%changelog
+* Sun May 20 2012 Remi Collet <RPMS@FamilleCollet.com> - 3.3.1-1
+- sync with rawhide, build for remi-dev repo.
+
+* Fri May 05 2012 Philip Prindeville <philipp@fedoraproject.org> 3.2.6-1
+- Initial version post packaging review.
+
+* Tue Apr 17 2012 Philip Prindeville <philipp@fedoraproject.org> 3.2.6-0
+- Initial RPM packaging.