diff options
Diffstat (limited to 'www-apache/mod_auth_token')
5 files changed, 102 insertions, 0 deletions
diff --git a/www-apache/mod_auth_token/Manifest b/www-apache/mod_auth_token/Manifest new file mode 100644 index 000000000000..e3e4f2a31fdd --- /dev/null +++ b/www-apache/mod_auth_token/Manifest @@ -0,0 +1 @@ +DIST mod_auth_token-1.0.6-beta.tar.gz 555111 SHA256 10888bde6aa42cfce34a593eabe7f582dcabe6fca814e2496c06fdf444334ee9 diff --git a/www-apache/mod_auth_token/files/75_mod_auth_token.conf b/www-apache/mod_auth_token/files/75_mod_auth_token.conf new file mode 100644 index 000000000000..3962fc66a708 --- /dev/null +++ b/www-apache/mod_auth_token/files/75_mod_auth_token.conf @@ -0,0 +1,26 @@ +<IfDefine AUTH_TOKEN> + + LoadModule auth_token_module modules/mod_auth_token.so + + # The token is an hex-encoded MD5 hash of the secret password, relative file + # path and the timestamp. It is encoded onto the URI as: + # <uri-prefix><token>/<timestamp-in-hex><rel-path + # where the token is generated as + # md5("secret" + "/path/to/file.txt" + dechex(time_now())) + # To add the IP of client into the in the md5 hash, enable AuthTokenLimitByIp. + + #<Location /protected/> + #AuthTokenSecret "secret" + #AuthTokenPrefix /protected/ + #AuthTokenTimeout 60 + #AuthTokenLimitByIp off + #</Location> + + # Example: + # /protected/dee0ed6174a894113d5e8f6c98f0e92b/43eaf9c5/path/to/file.txt + # maps to + # /protected/path/to/file.txt + +</IfDefine> + +# vim: ts=4 filetype=apache
\ No newline at end of file diff --git a/www-apache/mod_auth_token/files/mod_auth_token-1.0.6_beta-ap_pstrcat.patch b/www-apache/mod_auth_token/files/mod_auth_token-1.0.6_beta-ap_pstrcat.patch new file mode 100644 index 000000000000..54a00e072fa4 --- /dev/null +++ b/www-apache/mod_auth_token/files/mod_auth_token-1.0.6_beta-ap_pstrcat.patch @@ -0,0 +1,13 @@ +Index: mod_auth_token/mod_auth_token.c +=================================================================== +--- mod_auth_token.orig/mod_auth_token.c ++++ mod_auth_token/mod_auth_token.c +@@ -64,7 +64,7 @@ static const char *auth_token_set_prefix + auth_token_config_rec *conf = (auth_token_config_rec*)config; + + if (arg[len - 1] != '/') { +- ap_set_string_slot(cmd, config, apr_pstrcat(cmd->pool, arg, '/')); ++ ap_set_string_slot(cmd, config, apr_pstrcat(cmd->pool, arg, "/", NULL)); + conf->prefix_len = len + 1; + } + else { diff --git a/www-apache/mod_auth_token/metadata.xml b/www-apache/mod_auth_token/metadata.xml new file mode 100644 index 000000000000..c594eca9664d --- /dev/null +++ b/www-apache/mod_auth_token/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>proxy-maintainers</herd> + <maintainer> + <email>pavel.stratil-jun@fenix.cz</email> + <description>Proxied co-maintainer assign bugs to him</description> + </maintainer> + <maintainer> + <email>flameeyes@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="google-code">mod-auth-token</remote-id> + </upstream> +</pkgmetadata> diff --git a/www-apache/mod_auth_token/mod_auth_token-1.0.6_beta.ebuild b/www-apache/mod_auth_token/mod_auth_token-1.0.6_beta.ebuild new file mode 100644 index 000000000000..4384270ace67 --- /dev/null +++ b/www-apache/mod_auth_token/mod_auth_token-1.0.6_beta.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=3 + +inherit apache-module eutils + +MY_P="${PN}-${PV/_/-}" +DESCRIPTION="Token based URI access module for Apache2" +HOMEPAGE="http://code.google.com/p/mod-auth-token/" +SRC_URI="http://mod-auth-token.googlecode.com/files/${MY_P}.tar.gz" + +KEYWORDS="~amd64" +LICENSE="Apache-2.0" +SLOT="0" +IUSE="" + +DEPEND="" +RDEPEND="" + +APACHE2_MOD_CONF="75_${PN}" +APACHE2_MOD_DEFINE="AUTH_TOKEN" + +need_apache2_2 + +S="${WORKDIR}/${PN}" + +src_prepare() { + epatch "${FILESDIR}"/${P}-ap_pstrcat.patch +} + +src_compile() { + local flag= + APXS2_ARGS= + + for flag in ${CFLAGS}; do + APXS2_ARGS+=" -Wc,${flag}" + done + + for flag in ${LDFLAGS}; do + APXS2_ARGS+=" -Wl,${flag}" + done + + APXS2_ARGS="${APXS2_ARGS} -c ${PN}.c" + apache-module_src_compile +} |