summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Heim <phreak@gentoo.org>2007-01-09 21:27:49 +0000
committerChristian Heim <phreak@gentoo.org>2007-01-09 21:27:49 +0000
commit10f9b987d474612a0dbac5cc511910ab56720507 (patch)
treeee44401780344ac98fe7c6be593ad49633aa4e4e /net-www/mod_auth_mysql
parentAdded a license for the Descent 2 data, extracted from the readme.txt shipped... (diff)
downloadgentoo-2-10f9b987d474612a0dbac5cc511910ab56720507.tar.gz
gentoo-2-10f9b987d474612a0dbac5cc511910ab56720507.tar.bz2
gentoo-2-10f9b987d474612a0dbac5cc511910ab56720507.zip
Revision bump, including a fix for =net-www/apache-2.2* (hopefully fixing #128501).
(Portage version: 2.1.2_rc4-r6)
Diffstat (limited to 'net-www/mod_auth_mysql')
-rw-r--r--net-www/mod_auth_mysql/ChangeLog15
-rw-r--r--net-www/mod_auth_mysql/files/digest-mod_auth_mysql-3.0.0-r23
-rw-r--r--net-www/mod_auth_mysql/files/mod_auth_mysql-3.0.0-apache-2.2.patch131
-rw-r--r--net-www/mod_auth_mysql/files/mod_auth_mysql-3.0.0-htpasswd2-auth-style.patch35
-rw-r--r--net-www/mod_auth_mysql/mod_auth_mysql-3.0.0-r2.ebuild49
5 files changed, 230 insertions, 3 deletions
diff --git a/net-www/mod_auth_mysql/ChangeLog b/net-www/mod_auth_mysql/ChangeLog
index 07a863076ca4..482ec1bd5720 100644
--- a/net-www/mod_auth_mysql/ChangeLog
+++ b/net-www/mod_auth_mysql/ChangeLog
@@ -1,12 +1,21 @@
# ChangeLog for net-www/mod_auth_mysql
-# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-www/mod_auth_mysql/ChangeLog,v 1.24 2006/12/07 16:36:01 chtekk Exp $
+# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-www/mod_auth_mysql/ChangeLog,v 1.25 2007/01/09 21:27:49 phreak Exp $
- 07 Dec 2006; Luca Longinotti <chtekk@gentoo.org>
+ 07 Dec 2006; Luca Longinotti <chtekk@gentoo.org>
-files/12_mod_auth_mysql.conf, -files/mod_auth_mysql.patch, metadata.xml,
-mod_auth_mysql-3.0.0.ebuild, mod_auth_mysql-3.0.0-r1.ebuild:
Ebuild cleanup, set mysql as herd too.
+*mod_auth_mysql-3.0.0-r2 (09 Jan 2007)
+
+ 09 Jan 2007; Christian Heim <phreak@gentoo.org>
+ +files/mod_auth_mysql-3.0.0-apache-2.2.patch,
+ +files/mod_auth_mysql-3.0.0-htpasswd2-auth-style.patch,
+ +mod_auth_mysql-3.0.0-r2.ebuild:
+ Revision bump, including a fix for =net-www/apache-2.2* (hopefully fixing
+ #128501).
+
23 Nov 2006; Francesco Riosa <vivo@gentoo.org>
mod_auth_mysql-3.0.0.ebuild, mod_auth_mysql-3.0.0-r1.ebuild:
dev-db/mysql => virtual/mysql
diff --git a/net-www/mod_auth_mysql/files/digest-mod_auth_mysql-3.0.0-r2 b/net-www/mod_auth_mysql/files/digest-mod_auth_mysql-3.0.0-r2
new file mode 100644
index 000000000000..b841d6624e79
--- /dev/null
+++ b/net-www/mod_auth_mysql/files/digest-mod_auth_mysql-3.0.0-r2
@@ -0,0 +1,3 @@
+MD5 a9ffde3dabeddf32de50bf75597c809e mod_auth_mysql-3.0.0.tar.gz 19257
+RMD160 ef68d6ec7c99c4059a38ba74f41c22e2f88f3863 mod_auth_mysql-3.0.0.tar.gz 19257
+SHA256 56da2e386583548f2fd9976101633f028d5d4649b46f428ff1d0dd1639efbad4 mod_auth_mysql-3.0.0.tar.gz 19257
diff --git a/net-www/mod_auth_mysql/files/mod_auth_mysql-3.0.0-apache-2.2.patch b/net-www/mod_auth_mysql/files/mod_auth_mysql-3.0.0-apache-2.2.patch
new file mode 100644
index 000000000000..30881f878d23
--- /dev/null
+++ b/net-www/mod_auth_mysql/files/mod_auth_mysql-3.0.0-apache-2.2.patch
@@ -0,0 +1,131 @@
+Index: mod_auth_mysql-3.0.0/mod_auth_mysql.c
+===================================================================
+--- mod_auth_mysql-3.0.0.orig/mod_auth_mysql.c
++++ mod_auth_mysql-3.0.0/mod_auth_mysql.c
+@@ -206,7 +206,7 @@
+ #define SNPRINTF apr_snprintf
+ #define PSTRDUP apr_pstrdup
+ #define PSTRNDUP apr_pstrndup
+- #define STRCAT ap_pstrcat
++ #define STRCAT apr_pstrcat
+ #define POOL apr_pool_t
+ #include "http_request.h" /* for ap_hook_(check_user_id | auth_checker)*/
+ #include "ap_compat.h"
+@@ -237,7 +237,7 @@
+ #define SNPRINTF ap_snprintf
+ #define PSTRDUP ap_pstrdup
+ #define PSTRNDUP ap_pstrndup
+- #define STRCAT ap_pstrcat
++ #define STRCAT apr_pstrcat
+ #define POOL pool
+ #include <stdlib.h>
+ #include "ap_sha1.h"
+@@ -589,87 +589,87 @@ static void * create_mysql_auth_dir_conf
+ static
+ command_rec mysql_auth_cmds[] = {
+ AP_INIT_TAKE1("AuthMySQLHost", ap_set_string_slot,
+- (void *) APR_XtOffsetOf(mysql_auth_config_rec, mysqlhost),
++ (void *) APR_OFFSETOF(mysql_auth_config_rec, mysqlhost),
+ OR_AUTHCFG, "mysql server host name"),
+
+ AP_INIT_TAKE1("AuthMySQLPort", ap_set_int_slot,
+- (void *) APR_XtOffsetOf(mysql_auth_config_rec, mysqlport),
++ (void *) APR_OFFSETOF(mysql_auth_config_rec, mysqlport),
+ OR_AUTHCFG, "mysql server port number"),
+
+ AP_INIT_TAKE1("AuthMySQLSocket", ap_set_string_slot,
+- (void *) APR_XtOffsetOf(mysql_auth_config_rec, mysqlsocket),
++ (void *) APR_OFFSETOF(mysql_auth_config_rec, mysqlsocket),
+ OR_AUTHCFG, "mysql server socket path"),
+
+ AP_INIT_TAKE1("AuthMySQLUser", ap_set_string_slot,
+- (void *) APR_XtOffsetOf(mysql_auth_config_rec, mysqluser),
++ (void *) APR_OFFSETOF(mysql_auth_config_rec, mysqluser),
+ OR_AUTHCFG, "mysql server user name"),
+
+ AP_INIT_TAKE1("AuthMySQLPassword", ap_set_string_slot,
+- (void *) APR_XtOffsetOf(mysql_auth_config_rec, mysqlpasswd),
++ (void *) APR_OFFSETOF(mysql_auth_config_rec, mysqlpasswd),
+ OR_AUTHCFG, "mysql server user password"),
+
+ AP_INIT_TAKE1("AuthMySQLDB", ap_set_string_slot,
+- (void *) APR_XtOffsetOf(mysql_auth_config_rec, mysqlDB),
++ (void *) APR_OFFSETOF(mysql_auth_config_rec, mysqlDB),
+ OR_AUTHCFG, "mysql database name"),
+
+ AP_INIT_TAKE1("AuthMySQLUserTable", ap_set_string_slot,
+- (void *) APR_XtOffsetOf(mysql_auth_config_rec, mysqlpwtable),
++ (void *) APR_OFFSETOF(mysql_auth_config_rec, mysqlpwtable),
+ OR_AUTHCFG, "mysql user table name"),
+
+ AP_INIT_TAKE1("AuthMySQLGroupTable", ap_set_string_slot,
+- (void *) APR_XtOffsetOf(mysql_auth_config_rec, mysqlgrptable),
++ (void *) APR_OFFSETOF(mysql_auth_config_rec, mysqlgrptable),
+ OR_AUTHCFG, "mysql group table name"),
+
+ AP_INIT_TAKE1("AuthMySQLNameField", ap_set_string_slot,
+- (void *) APR_XtOffsetOf(mysql_auth_config_rec, mysqlNameField),
++ (void *) APR_OFFSETOF(mysql_auth_config_rec, mysqlNameField),
+ OR_AUTHCFG, "mysql User ID field name within User table"),
+
+ AP_INIT_TAKE1("AuthMySQLGroupField", ap_set_string_slot,
+- (void *) APR_XtOffsetOf(mysql_auth_config_rec, mysqlGroupField),
++ (void *) APR_OFFSETOF(mysql_auth_config_rec, mysqlGroupField),
+ OR_AUTHCFG, "mysql Group field name within table"),
+
+ AP_INIT_TAKE1("AuthMySQLGroupUserNameField", ap_set_string_slot,
+- (void *) APR_XtOffsetOf(mysql_auth_config_rec, mysqlGroupUserNameField),
++ (void *) APR_OFFSETOF(mysql_auth_config_rec, mysqlGroupUserNameField),
+ OR_AUTHCFG, "mysql User ID field name within Group table"),
+
+ AP_INIT_TAKE1("AuthMySQLPasswordField", ap_set_string_slot,
+- (void *) APR_XtOffsetOf(mysql_auth_config_rec, mysqlPasswordField),
++ (void *) APR_OFFSETOF(mysql_auth_config_rec, mysqlPasswordField),
+ OR_AUTHCFG, "mysql Password field name within table"),
+
+ AP_INIT_TAKE1("AuthMySQLPwEncryption", ap_set_string_slot,
+- (void *) APR_XtOffsetOf(mysql_auth_config_rec, mysqlEncryptionField),
++ (void *) APR_OFFSETOF(mysql_auth_config_rec, mysqlEncryptionField),
+ OR_AUTHCFG, "mysql password encryption method"),
+
+ AP_INIT_TAKE1("AuthMySQLSaltField", ap_set_string_slot,
+- (void*) APR_XtOffsetOf(mysql_auth_config_rec, mysqlSaltField),
++ (void*) APR_OFFSETOF(mysql_auth_config_rec, mysqlSaltField),
+ OR_AUTHCFG, "mysql salfe field name within table"),
+
+ /* AP_INIT_FLAG("AuthMySQLKeepAlive", ap_set_flag_slot,
+- (void *) APR_XtOffsetOf(mysql_auth_config_rec, mysqlKeepAlive),
++ (void *) APR_OFFSETOF(mysql_auth_config_rec, mysqlKeepAlive),
+ OR_AUTHCFG, "mysql connection kept open across requests if On"),
+ */
+ AP_INIT_FLAG("AuthMySQLAuthoritative", ap_set_flag_slot,
+- (void *) APR_XtOffsetOf(mysql_auth_config_rec, mysqlAuthoritative),
++ (void *) APR_OFFSETOF(mysql_auth_config_rec, mysqlAuthoritative),
+ OR_AUTHCFG, "mysql lookup is authoritative if On"),
+
+ AP_INIT_FLAG("AuthMySQLNoPasswd", ap_set_flag_slot,
+- (void *) APR_XtOffsetOf(mysql_auth_config_rec, mysqlNoPasswd),
++ (void *) APR_OFFSETOF(mysql_auth_config_rec, mysqlNoPasswd),
+ OR_AUTHCFG, "If On, only check if user exists; ignore password"),
+
+ AP_INIT_FLAG("AuthMySQLEnable", ap_set_flag_slot,
+- (void *) APR_XtOffsetOf(mysql_auth_config_rec, mysqlEnable),
++ (void *) APR_OFFSETOF(mysql_auth_config_rec, mysqlEnable),
+ OR_AUTHCFG, "enable mysql authorization"),
+
+ AP_INIT_TAKE1("AuthMySQLUserCondition", ap_set_string_slot,
+- (void *) APR_XtOffsetOf(mysql_auth_config_rec, mysqlUserCondition),
++ (void *) APR_OFFSETOF(mysql_auth_config_rec, mysqlUserCondition),
+ OR_AUTHCFG, "condition to add to user where-clause"),
+
+ AP_INIT_TAKE1("AuthMySQLGroupCondition", ap_set_string_slot,
+- (void *) APR_XtOffsetOf(mysql_auth_config_rec, mysqlGroupCondition),
++ (void *) APR_OFFSETOF(mysql_auth_config_rec, mysqlGroupCondition),
+ OR_AUTHCFG, "condition to add to group where-clause"),
+
+ AP_INIT_TAKE1("AuthMySQLCharacterSet", ap_set_string_slot,
+- (void *) APR_XtOffsetOf(mysql_auth_config_rec, mysqlCharacterSet),
++ (void *) APR_OFFSETOF(mysql_auth_config_rec, mysqlCharacterSet),
+ OR_AUTHCFG, "mysql character set to be used"),
+
+ { NULL }
diff --git a/net-www/mod_auth_mysql/files/mod_auth_mysql-3.0.0-htpasswd2-auth-style.patch b/net-www/mod_auth_mysql/files/mod_auth_mysql-3.0.0-htpasswd2-auth-style.patch
new file mode 100644
index 000000000000..e7f6eb31ef3f
--- /dev/null
+++ b/net-www/mod_auth_mysql/files/mod_auth_mysql-3.0.0-htpasswd2-auth-style.patch
@@ -0,0 +1,35 @@
+Index: mod_auth_mysql-3.0.0/mod_auth_mysql.c
+===================================================================
+--- mod_auth_mysql-3.0.0.orig/mod_auth_mysql.c
++++ mod_auth_mysql-3.0.0/mod_auth_mysql.c
+@@ -288,6 +288,7 @@ static short pw_crypted(POOL * pool, con
+ static short pw_aes(POOL * pool, const char * real_pw, const char * sent_pw, const char * salt);
+ #endif
+ static short pw_sha1(POOL * pool, const char * real_pw, const char * sent_pw, const char * salt);
++static short pw_apr(POOL * pool, const char * real_pw, const char * sent_pw, const char * salt);
+ static short pw_plain(POOL * pool, const char * real_pw, const char * sent_pw, const char * salt);
+
+ static char * format_remote_host(request_rec * r, char ** parm);
+@@ -318,7 +319,8 @@ static encryption encryptions[] = {{"cry
+ #if _AES
+ {"aes", SALT_REQUIRED, pw_aes},
+ #endif
+- {"sha1", NO_SALT, pw_sha1}};
++ {"sha1", NO_SALT, pw_sha1},
++ {"apr", NO_SALT, pw_apr}};
+ typedef struct { /* User formatting patterns */
+ char pattern; /* Pattern to match */
+ char * (*func)(request_rec * r, char ** parm);
+@@ -856,6 +858,12 @@ static short pw_sha1(POOL * pool, const
+ return strcasecmp(bin2hex(pool, scrambled_sent_pw, enc_len), real_pw) == 0;
+ }
+
++/* checks passwords from htpasswd */
++static short pw_apr(POOL * pool, const char * real_pw, const char * sent_pw, const char * salt) {
++ /* apr_password_validate will do the job */
++ return apr_password_validate(sent_pw, real_pw) == APR_SUCCESS;
++}
++
+ /* checks plain text passwords */
+ static short pw_plain(POOL * pool, const char * real_pw, const char * sent_pw, const char * salt) {
+ return strcmp(real_pw, sent_pw) == 0;
diff --git a/net-www/mod_auth_mysql/mod_auth_mysql-3.0.0-r2.ebuild b/net-www/mod_auth_mysql/mod_auth_mysql-3.0.0-r2.ebuild
new file mode 100644
index 000000000000..8dda92f2c450
--- /dev/null
+++ b/net-www/mod_auth_mysql/mod_auth_mysql-3.0.0-r2.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-www/mod_auth_mysql/mod_auth_mysql-3.0.0-r2.ebuild,v 1.1 2007/01/09 21:27:49 phreak Exp $
+
+inherit apache-module eutils
+
+KEYWORDS="~amd64 ~x86"
+
+DESCRIPTION="Basic authentication for Apache using a MySQL database."
+HOMEPAGE="http://modauthmysql.sourceforge.net/"
+SRC_URI="mirror://sourceforge/modauthmysql/${P}.tar.gz"
+LICENSE="Apache-1.1"
+SLOT="0"
+
+DEPEND="virtual/mysql
+ sys-libs/zlib"
+RDEPEND="${DEPEND}"
+
+BASE_CONFIG_PVR="2.8.1"
+
+APXS1_ARGS="-DENABLE=0 -c -I/usr/include/mysql -lmysqlclient -lm -lz ${PN}.c"
+APACHE1_MOD_CONF="${BASE_CONFIG_PVR}/12_mod_auth_mysql"
+APACHE1_MOD_DEFINE="AUTH_MYSQL"
+
+APXS2_ARGS="-c -I/usr/include/mysql -lmysqlclient -lm -lz ${PN}.c"
+APACHE2_MOD_CONF="${BASE_CONFIG_PVR}/12_mod_auth_mysql"
+APACHE2_MOD_DEFINE="AUTH_MYSQL"
+
+DOCFILES="README"
+
+need_apache
+
+src_unpack() {
+ unpack ${A}
+ EPATCH_OPTS="-d ${S} -p1" epatch "${FILESDIR}/${P}-apache-2.2.patch"
+ EPATCH_OPTS="-d ${S} -p1" epatch "${FILESDIR}/${P}-htpasswd2-auth-style.patch"
+}
+
+pkg_postinst() {
+ if ! useq apache2 ; then
+ elog "With regard to bug #132391 the behaviour of ${PN}"
+ elog "has changed for Apache-1.3.XX."
+ elog
+ elog "You now need to enable ${PN} in your .htaccess"
+ elog "files explicitely using:"
+ elog
+ elog " AuthMySQLEnable On"
+ fi
+}