summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Bilyk <jbilyk@gmail.com>2013-02-28 15:45:23 -0500
committerJeff Bilyk <jbilyk@gmail.com>2013-02-28 15:45:23 -0500
commitcff4cd3ac59d7c416afa37ecefea031d3db41ad9 (patch)
tree0cc046b443e21517efbe38b2abe818b9a96671ee
parentef3ce7bd1808cc82dab605f3754dc6f4407c97e8 (diff)
downloadaports-cff4cd3ac59d7c416afa37ecefea031d3db41ad9.tar.bz2
aports-cff4cd3ac59d7c416afa37ecefea031d3db41ad9.tar.xz
testing/apache-mod-auth-radius: new aport
-rw-r--r--testing/apache-mod-auth-radius/APKBUILD46
-rw-r--r--testing/apache-mod-auth-radius/mod-auth-radius.conf22
-rw-r--r--testing/apache-mod-auth-radius/remote-ip.patch29
3 files changed, 97 insertions, 0 deletions
diff --git a/testing/apache-mod-auth-radius/APKBUILD b/testing/apache-mod-auth-radius/APKBUILD
new file mode 100644
index 000000000..c31667467
--- /dev/null
+++ b/testing/apache-mod-auth-radius/APKBUILD
@@ -0,0 +1,46 @@
+# Contributor: Jeff Bilyk <jbilyk@alpinelinux.org>
+# Maintainer:
+pkgname=apache-mod-auth-radius
+_pkgname=mod_auth_radius
+pkgver=1.5.8
+pkgrel=0
+pkgdesc="Apache authentication module to become RADIUS client for AAA requests"
+url="http://freeradius.org/mod_auth_radius/"
+arch="all"
+license="GPL"
+depends="apache2"
+makedepends="apache2-dev freeradius-dev"
+install=""
+source="ftp://ftp.freeradius.org/pub/radius/$_pkgname-$pkgver.tar
+ mod-auth-radius.conf
+ remote-ip.patch"
+
+_builddir="$srcdir"/$_pkgname-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ apxs -c mod_auth_radius-2.0.c
+}
+
+package() {
+ cd "$_builddir"
+ mkdir -p "$pkgdir"/etc/apache2/conf.d
+ mkdir -p "$pkgdir"/usr/lib/apache2
+ /usr/share/apache2/build/instdso.sh SH_LIBTOOL='/usr/share/build-1/libtool' mod_auth_radius-2.0.la "$pkgdir"/usr/lib/apache2/
+ /usr/share/build-1/libtool --mode=install install mod_auth_radius-2.0.la "$pkgdir"/usr/lib/apache2/
+ install -D -m644 ../../mod-auth-radius.conf "$pkgdir"/etc/apache2/conf.d/mod-auth-radius.conf
+ rm "$pkgdir"/usr/lib/apache2/*.la
+}
+
+md5sums="87d8ef049736254cc09f8b34667f0e59 mod_auth_radius-1.5.8.tar
+b0e6eb036f57f06972e626dc9ddf4983 mod-auth-radius.conf
+8a68838a41b3dc32ab6f4adc58439a3b remote-ip.patch"
diff --git a/testing/apache-mod-auth-radius/mod-auth-radius.conf b/testing/apache-mod-auth-radius/mod-auth-radius.conf
new file mode 100644
index 000000000..44499221d
--- /dev/null
+++ b/testing/apache-mod-auth-radius/mod-auth-radius.conf
@@ -0,0 +1,22 @@
+#
+# The mod_auth_kerb module implements Kerberos authentication over
+# HTTP, following the "Negotiate" protocol.
+#
+
+LoadModule auth_radius_module modules/mod_auth_radius-2.0.so
+
+# 5 second timeout
+AddRadiusAuth radius_server_address:1812 shared_secret 5
+# Valid for 60 min
+AuthRadiusCookieValid 60
+
+<Directory /var/www>
+ AuthType Basic
+ AuthName "RADIUS authentication"
+ AuthBasicAuthoritative Off
+ AuthBasicProvider radius
+ AuthRadiusAuthoritative on
+ AuthRadiusActive On
+ Require valid-user
+</Directory>
+
diff --git a/testing/apache-mod-auth-radius/remote-ip.patch b/testing/apache-mod-auth-radius/remote-ip.patch
new file mode 100644
index 000000000..0c461091e
--- /dev/null
+++ b/testing/apache-mod-auth-radius/remote-ip.patch
@@ -0,0 +1,29 @@
+--- mod_auth_radius-2.0.c
++++ mod_auth_radius-2.0.c.patched
+@@ -630,7 +630,7 @@
+ {
+ char one[COOKIE_SIZE], two[COOKIE_SIZE];
+ char *cookie = apr_pcalloc(r->pool, COOKIE_SIZE);
+- conn_rec *c = r->connection;
++ request_rec *c = r->connection;
+ server_rec *s = r->server;
+ radius_server_config_rec *scr = (radius_server_config_rec *)
+ ap_get_module_config (s->module_config, &radius_auth_module);
+@@ -680,7 +680,7 @@
+ * benefit here.
+ */
+ apr_snprintf(one, COOKIE_SIZE, "%s%s%s%s%s%08x", scr->secret,
+- r->user, passwd, c->remote_ip, hostname, expires);
++ r->user, passwd, c->useragent_ip, hostname, expires);
+
+ /* if you're REALLY worried about what's going on */
+
+@@ -688,7 +688,7 @@
+ ap_log_error(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, 0, r->server," secret = %s\n", scr->secret);
+ ap_log_error(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, 0, r->server," user = %s\n", r->user);
+ ap_log_error(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, 0, r->server," passwd = %s\n", passwd);
+- ap_log_error(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, 0, r->server," remote ip = %s\n", c->remote_ip);
++ ap_log_error(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, 0, r->server," remote ip = %s\n", c->useragent_ip);
+ ap_log_error(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, 0, r->server," hostname = %s\n", hostname);
+ ap_log_error(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, 0, r->server," expiry = %08x\n", expires);
+ #endif