diff options
author | Jeff Bilyk <jbilyk@gmail.com> | 2013-02-28 15:55:29 -0500 |
---|---|---|
committer | Jeff Bilyk <jbilyk@gmail.com> | 2013-02-28 15:55:29 -0500 |
commit | 364f710147bb394d3d5a12edc47d251125ffb480 (patch) | |
tree | fd88447bbb2926539440f8266c80cc41aa93f968 /main | |
parent | cff4cd3ac59d7c416afa37ecefea031d3db41ad9 (diff) | |
download | aports-364f710147bb394d3d5a12edc47d251125ffb480.tar.bz2 aports-364f710147bb394d3d5a12edc47d251125ffb480.tar.xz |
main/apache-mod-auth-radius: moved from testing
Diffstat (limited to 'main')
-rw-r--r-- | main/apache-mod-auth-radius/APKBUILD | 46 | ||||
-rw-r--r-- | main/apache-mod-auth-radius/mod-auth-radius.conf | 22 | ||||
-rw-r--r-- | main/apache-mod-auth-radius/remote-ip.patch | 29 |
3 files changed, 97 insertions, 0 deletions
diff --git a/main/apache-mod-auth-radius/APKBUILD b/main/apache-mod-auth-radius/APKBUILD new file mode 100644 index 000000000..c31667467 --- /dev/null +++ b/main/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/main/apache-mod-auth-radius/mod-auth-radius.conf b/main/apache-mod-auth-radius/mod-auth-radius.conf new file mode 100644 index 000000000..44499221d --- /dev/null +++ b/main/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/main/apache-mod-auth-radius/remote-ip.patch b/main/apache-mod-auth-radius/remote-ip.patch new file mode 100644 index 000000000..0c461091e --- /dev/null +++ b/main/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 |