summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authormanu <manu>2016-04-06 09:02:07 +0000
committermanu <manu>2016-04-06 09:02:07 +0000
commitcc48b07d5d70d058cceacac476b6862402045602 (patch)
tree4321bbe42bd14d14fc85ff89e5a4e2d747762d2b /www
parentad3899ad78b3048c9a6ca79df851bcf41808acd4 (diff)
downloadpkgsrc-cc48b07d5d70d058cceacac476b6862402045602.tar.gz
Add ap24-authnz-external
This is a newer version of the ap22-authnz-external package that adds support for apache 2.4 and drops support for apache 2.2 Approved by wiz@
Diffstat (limited to 'www')
-rw-r--r--www/ap24-authnz-external/DESCR20
-rw-r--r--www/ap24-authnz-external/MESSAGE9
-rw-r--r--www/ap24-authnz-external/Makefile39
-rw-r--r--www/ap24-authnz-external/PLIST7
-rw-r--r--www/ap24-authnz-external/distinfo6
-rw-r--r--www/ap24-authnz-external/patches/patch-aa50
6 files changed, 131 insertions, 0 deletions
diff --git a/www/ap24-authnz-external/DESCR b/www/ap24-authnz-external/DESCR
new file mode 100644
index 00000000000..0a4e81c24c1
--- /dev/null
+++ b/www/ap24-authnz-external/DESCR
@@ -0,0 +1,20 @@
+The Apache HTTP Daemon can be configured to require users to supply logins
+and passwords before accessing pages in some directories. Authentication is
+the process of checking if the password given is correct for a user. Apache
+has standard modules for authenticating out of several different kinds of
+databases. The external authentication module provides a flexible tool for
+creating authentication systems based on other databases.
+
+The module can be used in either of two somewhat divergent ways:
+1) External Authentication:
+
+When a user supplies a login and password, mod_auth*_external runs a program
+you write, passing it the login and password. Your program does whatever
+checking and logging it needs to, and then returns a Accept/Reject flag to
+Apache.
+
+2) Hardcoded Authentication:
+
+Some hooks have been inserted into mod_auth*_external to make it easy to
+replace the call to the external authentication program with a call to a
+hardcoded internal authentication routine that you write.
diff --git a/www/ap24-authnz-external/MESSAGE b/www/ap24-authnz-external/MESSAGE
new file mode 100644
index 00000000000..8d01b4c1a3c
--- /dev/null
+++ b/www/ap24-authnz-external/MESSAGE
@@ -0,0 +1,9 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1 2016/04/06 09:02:07 manu Exp $
+
+In order to use this module in your Apache installation, you need to
+add the following to your httpd.conf file:
+
+ LoadModule ${MODULE_NAME} lib/httpd/mod_authnz_external.so
+
+===========================================================================
diff --git a/www/ap24-authnz-external/Makefile b/www/ap24-authnz-external/Makefile
new file mode 100644
index 00000000000..d33a5920dfe
--- /dev/null
+++ b/www/ap24-authnz-external/Makefile
@@ -0,0 +1,39 @@
+# $NetBSD: Makefile,v 1.1 2016/04/06 09:02:07 manu Exp $
+#
+
+DISTNAME= mod_authnz_external-${DISTVERS}
+#PKGREVISION= 1
+PKGNAME= ${APACHE_PKG_PREFIX}-authnz-external-${DISTVERS}
+CATEGORIES= www
+MASTER_SITES= https://github.com/phokz/mod-auth-external/archive/
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= https://github.com/phokz/mod-auth-external/tree/master/mod_authnz_external
+COMMENT= Apache module for external program authentication
+LICENSE= apache-1.1
+
+PKG_APACHE_ACCEPTED= apache24
+
+WRKSRC= ${WRKDIR}/mod-auth-external-${DISTNAME}
+APACHE_MODULE_NAME= mod_authnz_external.${MODULE_EXT}
+
+DISTVERS= 3.3.1
+MODULE_EXT= la
+MESSAGE_SUBST+= MODULE_NAME=authnz_external_module
+
+INSTALLATION_DIRS+= share/doc/authnz-external
+
+post-install:
+ ${INSTALL_DATA} ${WRKSRC}/AUTHENTICATORS \
+ ${DESTDIR}${PREFIX}/share/doc/authnz-external
+ ${INSTALL_DATA} ${WRKSRC}/INSTALL \
+ ${DESTDIR}${PREFIX}/share/doc/authnz-external
+ ${INSTALL_DATA} ${WRKSRC}/INSTALL.HARDCODE \
+ ${DESTDIR}${PREFIX}/share/doc/authnz-external
+ ${INSTALL_DATA} ${WRKSRC}/TODO \
+ ${DESTDIR}${PREFIX}/share/doc/authnz-external
+ ${INSTALL_DATA} ${WRKSRC}/UPGRADE \
+ ${DESTDIR}${PREFIX}/share/doc/authnz-external
+
+.include "../../mk/apache.module.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/www/ap24-authnz-external/PLIST b/www/ap24-authnz-external/PLIST
new file mode 100644
index 00000000000..a775c052bcb
--- /dev/null
+++ b/www/ap24-authnz-external/PLIST
@@ -0,0 +1,7 @@
+@comment $NetBSD: PLIST,v 1.1 2016/04/06 09:02:07 manu Exp $
+lib/httpd/mod_authnz_external.so
+share/doc/authnz-external/AUTHENTICATORS
+share/doc/authnz-external/INSTALL
+share/doc/authnz-external/INSTALL.HARDCODE
+share/doc/authnz-external/TODO
+share/doc/authnz-external/UPGRADE
diff --git a/www/ap24-authnz-external/distinfo b/www/ap24-authnz-external/distinfo
new file mode 100644
index 00000000000..794bfd73e48
--- /dev/null
+++ b/www/ap24-authnz-external/distinfo
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1 2016/04/06 09:02:07 manu Exp $
+
+SHA1 (mod_authnz_external-3.3.1.tar.gz) = 75d6eb9e7e7fe81fa12c5f880e6659eef63f1785
+RMD160 (mod_authnz_external-3.3.1.tar.gz) = d15f60f91f0903fd45ad24ff3d5b1031d47751b8
+Size (mod_authnz_external-3.3.1.tar.gz) = 35293 bytes
+SHA1 (patch-aa) = 710a2c1eeeac540a2d4c32723771780b9d14c5b9
diff --git a/www/ap24-authnz-external/patches/patch-aa b/www/ap24-authnz-external/patches/patch-aa
new file mode 100644
index 00000000000..5a81746fe35
--- /dev/null
+++ b/www/ap24-authnz-external/patches/patch-aa
@@ -0,0 +1,50 @@
+$NetBSD
+
+- Build fix for apache 2.4
+- Add HTTP method in environement
+
+Submitted upstream as https://github.com/phokz/mod-auth-external/issues/24
+
+--- mod_authnz_external.c.orig 2011-10-12 16:55:14.000000000 +0200
++++ mod_authnz_external.c 2016-04-04 09:51:14.000000000 +0200
+@@ -91,9 +91,12 @@
+ #define ENV_USER "USER"
+ #define ENV_PASS "PASS"
+ #define ENV_GROUP "GROUP"
+ #define ENV_URI "URI"
++#define ENV_METHOD "METHOD"
+ #define ENV_IP "IP"
++#define ENV_CLIENT_IP "CLIENT_IP"
++#define ENV_USERAGENT_IP "USERAGENT_IP"
+ #define ENV_HOST "HOST" /* Remote Host */
+ #define ENV_HTTP_HOST "HTTP_HOST" /* Local Host */
+ #define ENV_CONTEXT "CONTEXT" /* Arbitrary Data from Config */
+ /* Undefine this if you do not want cookies passed to the script */
+@@ -442,14 +445,25 @@
+ remote_host= ap_get_remote_host(c, r->per_dir_config, REMOTE_HOST,NULL);
+ if (remote_host != NULL)
+ child_env[i++]= apr_pstrcat(p, ENV_HOST"=", remote_host,NULL);
+
+- if (c->remote_ip)
+- child_env[i++]= apr_pstrcat(p, ENV_IP"=", c->remote_ip, NULL);
++ if (c->client_ip) {
++ child_env[i++]= apr_pstrcat(p, ENV_CLIENT_IP"=",
++ c->client_ip, NULL);
++ child_env[i++]= apr_pstrcat(p, ENV_IP"=", c->client_ip, NULL);
++ }
++
++ if (r->useragent_ip)
++ child_env[i++]= apr_pstrcat(p, ENV_USERAGENT_IP"=",
++ r->useragent_ip, NULL);
+
+ if (r->uri)
+ child_env[i++]= apr_pstrcat(p, ENV_URI"=", r->uri, NULL);
+
++ if (r->method)
++ child_env[i++]= apr_pstrcat(r->pool, ENV_METHOD"=",
++ r->method, NULL);
++
+ if ((host= apr_table_get(r->headers_in, "Host")) != NULL)
+ child_env[i++]= apr_pstrcat(p, ENV_HTTP_HOST"=", host, NULL);
+
+ if (dir->context)