ports/133982: New port: www/mod_auth_mysql_debian Apache 2 module for MySQL authentication
Morton Jonuschat
mjonuschat at gmail.com
Fri Apr 24 22:00:15 UTC 2009
>Number: 133982
>Category: ports
>Synopsis: New port: www/mod_auth_mysql_debian Apache 2 module for MySQL authentication
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Fri Apr 24 22:00:14 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator: Morton Jonuschat
>Release: 7.2-RC1
>Organization:
>Environment:
FreeBSD localhost 7.2-RC1 FreeBSD 7.2-RC1 #0: Sat Apr 18 09:06:35 CEST 2009 root at localhost:/usr/obj/usr/src/sys/GENERIC i386
>Description:
New port for the Debian provided version of an Apache2 MySQL authentication module
A module for the Apache 2 web server which enables HTTP authentication against information stored in a MySQL database.
WWW: http://packages.debian.org/en/lenny/libapache2-mod-auth-mysql
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# mod_auth_mysql_debian
# mod_auth_mysql_debian/files
# mod_auth_mysql_debian/files/patch-008-make-scrambled-password
# mod_auth_mysql_debian/files/patch-013-CVE-2008-2384-charset
# mod_auth_mysql_debian/files/patch-005-directives
# mod_auth_mysql_debian/files/patch-009-port-int
# mod_auth_mysql_debian/files/patch-011-auth_basic
# mod_auth_mysql_debian/files/patch-014-libcrypt
# mod_auth_mysql_debian/files/patch-007-unify-namespace
# mod_auth_mysql_debian/files/patch-003-ftbfs_apache2
# mod_auth_mysql_debian/files/patch-004-reconnect
# mod_auth_mysql_debian/files/Makefile
# mod_auth_mysql_debian/files/patch-010-enctype-apache
# mod_auth_mysql_debian/files/patch-006-options
# mod_auth_mysql_debian/files/patch-012-charset
# mod_auth_mysql_debian/files/patch-001-usage
# mod_auth_mysql_debian/Makefile
# mod_auth_mysql_debian/pkg-descr
# mod_auth_mysql_debian/distinfo
#
echo c - mod_auth_mysql_debian
mkdir -p mod_auth_mysql_debian > /dev/null 2>&1
echo c - mod_auth_mysql_debian/files
mkdir -p mod_auth_mysql_debian/files > /dev/null 2>&1
echo x - mod_auth_mysql_debian/files/patch-008-make-scrambled-password
sed 's/^X//' >mod_auth_mysql_debian/files/patch-008-make-scrambled-password << 'f1e5c1f21c34d8a12c17860dfc3e0356'
X#! /bin/sh /usr/share/dpatch/dpatch-run
X## 008-make_scrambled_password.dpatch by Joey Schulze <joey at debian.org>
X##
X## All lines beginning with `## DP:' are a description of the patch.
X## DP: Adjust the buffer size used by make_scrambled_password()
X
X at DPATCH@
Xdiff -urNad mod-auth-mysql~/mod_auth_mysql.c mod-auth-mysql/mod_auth_mysql.c
X--- mod_auth_mysql.c 2008-05-14 18:46:21.000000000 +0200
X+++ mod_auth_mysql.c 2008-05-14 22:15:44.000000000 +0200
X@@ -103,6 +103,9 @@
X #endif
X #define SHA1SUM_ENCRYPTION_FLAG 1<<6
X
X+/* from include/sha1.h from the mysql-server source distribution */
X+#define SHA1_HASH_SIZE 20 /* Hash size in bytes */
X+
X static int check_no_encryption(const char *passwd, char *enc_passwd)
X {
X return (!strcmp(passwd, enc_passwd));
X@@ -229,7 +232,7 @@
X
X static int check_mysql_encryption(const char *passwd, char *enc_passwd)
X {
X- char scrambled_passwd[32];
X+ char scrambled_passwd[2*SHA1_HASH_SIZE + 2];
X
X make_scrambled_password(scrambled_passwd, passwd);
X return (!strcmp(scrambled_passwd, enc_passwd));
f1e5c1f21c34d8a12c17860dfc3e0356
echo x - mod_auth_mysql_debian/files/patch-013-CVE-2008-2384-charset
sed 's/^X//' >mod_auth_mysql_debian/files/patch-013-CVE-2008-2384-charset << 'ac9987cb4f26c6f935cd8892ddfdd537'
X#! /bin/sh /usr/share/dpatch/dpatch-run
X## 013-CVE-2008-2384_charset.dpatch by <joey at localhost>
X##
X## All lines beginning with `## DP:' are a description of the patch.
X## DP: Fix CVE-2008-2384: Encode strings securely via mysql_real_escape_string()
X
X at DPATCH@
Xdiff -urNad mod-auth-mysql~/mod_auth_mysql.c mod-auth-mysql/mod_auth_mysql.c
X--- mod_auth_mysql.c 2009-01-07 21:47:20.000000000 +0100
X+++ mod_auth_mysql.c 2009-01-08 21:12:47.000000000 +0100
X@@ -340,6 +340,8 @@ typedef struct {
X
X module auth_mysql_module;
X
X+static int open_auth_dblink(request_rec *r, mysql_auth_config_rec *sec);
X+
X #ifdef APACHE2
X static apr_status_t
X #else
X@@ -506,9 +508,9 @@ static const char *set_scrambled_passwor
X * server when passed in as part of a query.
X */
X #ifdef APACHE2
X-static char *mysql_escape(char *str, apr_pool_t *p)
X+static char *mysql_escape(mysql_auth_config_rec *sec, request_rec *r, char *str, apr_pool_t *p)
X #else
X-static char *mysql_escape(char *str, pool *p)
X+static char *mysql_escape(mysql_auth_config_rec *sec, request_rec *r, char *str, pool *p)
X #endif
X {
X char *dest;
X@@ -522,7 +524,7 @@ static char *mysql_escape(char *str, poo
X return str;
X }
X
X- mysql_escape_string(dest, str, strlen(str));
X+ mysql_real_escape_string(sec->dbh, dest, str, strlen(str));
X
X return dest;
X }
X@@ -1374,25 +1376,18 @@ static int open_auth_dblink(request_rec
X }
X
X if (sec->db_charset) {
X+ const char *check;
X+
X APACHELOG(APLOG_DEBUG, r,
X "Setting character set to %s", sec->db_charset);
X
X- query = (char *) PSTRCAT(r->pool, "SET CHARACTER SET ", sec->db_charset, NULL);
X- if (!query) {
X- APACHELOG(APLOG_ERR, r,
X- "Failed to create query string - we're no good...");
X- return -1;
X- }
X+ mysql_set_character_set(sec->dbh, sec->db_charset);
X
X- if (mysql_query(sec->dbh, query)) {
X- if (sec->dbh)
X- {
X- APACHELOG(APLOG_ERR, r,
X- "Query call failed: %s (%i)", mysql_error(sec->dbh),
X- mysql_errno(sec->dbh));
X- }
X+ check = mysql_character_set_name(sec->dbh);
X
X- APACHELOG(APLOG_DEBUG, r, "Failed query was: [%s]", query);
X+ if (!check || strcmp(sec->db_charset, check)) {
X+ APACHELOG(APLOG_ERR, r,
X+ "Failed to set character set to %s", sec->db_charset);
X return -1;
X }
X }
X@@ -1537,11 +1532,27 @@ static int mysql_check_user_password(req
X char *auth_table = "mysql_auth", *auth_user_field = "username",
X *auth_password_field = "passwd", *auth_password_clause = "";
X char *query;
X- char *esc_user = mysql_escape(user, r->pool);
X+ char *esc_user = NULL;
X MYSQL_RES *result;
X MYSQL_ROW sql_row;
X+ int error = CR_UNKNOWN_ERROR;
X int rv;
X
X+ if (!sec->dbh) {
X+ APACHELOG(APLOG_DEBUG, r,
X+ "No DB connection open - firing one up");
X+ if ((error = open_auth_dblink(r, sec))) {
X+ APACHELOG(APLOG_DEBUG, r,
X+ "open_auth_dblink returned %i", error);
X+ return error;
X+ }
X+
X+ APACHELOG(APLOG_DEBUG, r,
X+ "Correctly opened a new DB connection");
X+ }
X+
X+ esc_user = mysql_escape(sec, r, user, r->pool);
X+
X if (sec->user_table) {
X auth_table = sec->user_table;
X }
X@@ -1627,8 +1638,8 @@ static int mysql_check_group(request_rec
X {
X char *auth_table = "mysql_auth", *auth_group_field="groups", *auth_group_clause="";
X char *query;
X- char *esc_user = mysql_escape(user, r->pool);
X- char *esc_group = mysql_escape(group, r->pool);
X+ char *esc_user = mysql_escape(sec, r, user, r->pool);
X+ char *esc_group = mysql_escape(sec, r, group, r->pool);
X MYSQL_RES *result;
X MYSQL_ROW row;
X char *auth_user_field = "username";
ac9987cb4f26c6f935cd8892ddfdd537
echo x - mod_auth_mysql_debian/files/patch-005-directives
sed 's/^X//' >mod_auth_mysql_debian/files/patch-005-directives << '0d68c3ff96acd83f78a831f9a0c35943'
X#! /bin/sh /usr/share/dpatch/dpatch-run
X## 005-directives.dpatch by Joey Schulze <joey at debian.org>
X##
X## All lines beginning with `## DP:' are a description of the patch.
X## DP: Improve documentation for Auth_MySQL_Group_Field
X
X at DPATCH@
Xdiff -u -p -r1.1 -r1.2
X--- DIRECTIVES 14 May 2008 08:46:20 -0000 1.1
X+++ DIRECTIVES 14 May 2008 12:53:34 -0000 1.2
X@@ -125,7 +125,8 @@ AuthMySQL_Password_Field <password_field
X Synonym for Auth_MySQL_Password_Field.
X
X Auth_MySQL_Group_Field <group_field_name>
X- As per ...Username_Field above. Defaults to 'groups'.
X+ As per ...Username_Field above. Defaults to 'groups'. The query
X+ will use FIND_IN_SET(<group_name>,<group_field_name>).
X
X AuthMySQL_Group_Field <group_field_name>
X Synonym for Auth_MySQL_Group_Field.
0d68c3ff96acd83f78a831f9a0c35943
echo x - mod_auth_mysql_debian/files/patch-009-port-int
sed 's/^X//' >mod_auth_mysql_debian/files/patch-009-port-int << '729154df05a118c1109d0d291e2ce3c9'
X#! /bin/sh /usr/share/dpatch/dpatch-run
X## 009-port-int.dpatch by Lehel Bernadt <lehel at pmc-services.hu>
X##
X## All lines beginning with `## DP:' are a description of the patch.
X## DP: Adjust port to int
X
X at DPATCH@
Xdiff -urNad mod-auth-mysql~/mod_auth_mysql.c mod-auth-mysql/mod_auth_mysql.c
X--- mod_auth_mysql.c 2008-05-15 08:44:54.000000000 +0200
X+++ mod_auth_mysql.c 2008-05-15 08:45:35.000000000 +0200
X@@ -753,11 +753,11 @@
X (void*)APR_OFFSETOF(mysql_auth_config_rec, db_socket),
X OR_AUTHCFG, "database host socket" ),
X
X- AP_INIT_TAKE1( "Auth_MySQL_Port", ap_set_string_slot,
X+ AP_INIT_TAKE1( "Auth_MySQL_Port", ap_set_int_slot,
X (void*)APR_OFFSETOF(mysql_auth_config_rec, db_port),
X OR_AUTHCFG, "database host port" ),
X
X- AP_INIT_TAKE1( "AuthMySQL_Port", ap_set_string_slot,
X+ AP_INIT_TAKE1( "AuthMySQL_Port", ap_set_int_slot,
X (void*)APR_OFFSETOF(mysql_auth_config_rec, db_port),
X OR_AUTHCFG, "database host port" ),
X
X@@ -1021,11 +1021,11 @@
X (void *) XtOffsetOf(mysql_auth_config_rec, db_socket),
X OR_AUTHCFG, TAKE1, "database host socket" },
X
X- { "Auth_MySQL_Port", ap_set_string_slot,
X+ { "Auth_MySQL_Port", ap_set_int_slot,
X (void *) XtOffsetOf(mysql_auth_config_rec, db_port),
X OR_AUTHCFG, TAKE1, "database host socket" },
X
X- { "AuthMySQL_Port", ap_set_string_slot,
X+ { "AuthMySQL_Port", ap_set_int_slot,
X (void *) XtOffsetOf(mysql_auth_config_rec, db_port),
X OR_AUTHCFG, TAKE1, "database host socket" },
X
729154df05a118c1109d0d291e2ce3c9
echo x - mod_auth_mysql_debian/files/patch-011-auth_basic
sed 's/^X//' >mod_auth_mysql_debian/files/patch-011-auth_basic << '003611489d92db3e484441eb6db4cbf8'
X#! /bin/sh /usr/share/dpatch/dpatch-run
X## 011-auth_basic.dpatch by Joey Schulze <joey at infodrom.org>
X##
X## DP: Document problems with other authentication modules
X
X at DPATCH@
Xdiff -urNad mod-auth-mysql~/USAGE mod-auth-mysql/USAGE
X--- USAGE 2008-11-21 16:16:37.000000000 +0100
X+++ USAGE 2008-11-21 16:24:41.000000000 +0100
X@@ -123,3 +123,22 @@
X
X The full set of directives available are now listed in the file DIRECTIVES,
X for ease of perusal.
X+
X+Disable other Auth methods
X+--------------------------
X+
X+For some reason Apache has problems handing over authority to this
X+module if this is requested an another auth module is also loaded.
X+
X+If you have another authentication module loaded, you'll have to
X+disable it the hard way.
X+
X+AuthBasicAuthoritative Off
X+AuthUserFile /dev/null
X+
X+The following option is not sufficient
X+
X+Auth_MySQL_Authoritative On
X+
X+If you experience similar problems with group membership, try
X+repeating the same procedure with AuthGroupFile.
003611489d92db3e484441eb6db4cbf8
echo x - mod_auth_mysql_debian/files/patch-014-libcrypt
sed 's/^X//' >mod_auth_mysql_debian/files/patch-014-libcrypt << '5d6d69a4fac51480c960588c185085e1'
X--- mod_auth_mysql.c.orig 2009-04-24 19:28:41.994583658 +0200
X+++ mod_auth_mysql.c 2009-04-24 19:29:29.812631203 +0200
X@@ -60,7 +60,7 @@
X #include <errmsg.h>
X #include <mysqld_error.h>
X
X-#ifdef HAVE_CRYPT_H
X+#if defined(HAVE_CRYPT_H) || defined(HAVE_LIBCRYPT)
X #include <crypt.h>
X #endif
X
X@@ -99,7 +99,7 @@
X #define CRYPT_MD5_ENCRYPTION_FLAG 1<<3
X #endif
X #define PHP_MD5_ENCRYPTION_FLAG 1<<4
X-#ifdef HAVE_CRYPT_H
X+#if defined(HAVE_CRYPT_H) || defined(HAVE_LIBCRYPT)
X #define CRYPT_ENCRYPTION_FLAG 1<<5
X #endif
X #define SHA1SUM_ENCRYPTION_FLAG 1<<6
X@@ -136,7 +136,7 @@
X }
X #endif
X
X-#ifdef HAVE_CRYPT_H
X+#if defined(HAVE_CRYPT_H) || defined(HAVE_LIBCRYPT)
X static int check_crypt_encryption(const char *passwd, char *enc_passwd)
X {
X return (!strcmp(crypt(passwd, enc_passwd), enc_passwd));
X@@ -264,7 +264,9 @@
X #if CRYPT_MD5
X { "Crypt_MD5", check_crypt_MD5_encryption, CRYPT_MD5_ENCRYPTION_FLAG },
X #endif
X+#if defined(HAVE_CRYPT_H) || defined(HAVE_LIBCRYPT)
X { "Crypt", check_crypt_encryption, CRYPT_ENCRYPTION_FLAG },
X+#endif
X { "PHP_MD5", check_PHP_MD5_encryption, PHP_MD5_ENCRYPTION_FLAG },
X { "SHA1Sum", check_SHA1Sum_encryption, SHA1SUM_ENCRYPTION_FLAG},
X { "Apache", check_apache_encryption, APACHE_ENCRYPTION_FLAG },
5d6d69a4fac51480c960588c185085e1
echo x - mod_auth_mysql_debian/files/patch-007-unify-namespace
sed 's/^X//' >mod_auth_mysql_debian/files/patch-007-unify-namespace << '4c5893bf3661b0686efd5200c88e6899'
X#! /bin/sh /usr/share/dpatch/dpatch-run
X## 007-auth_mysql_user.dpatch by Joey Schulze <joey at debain.org>
X##
X## All lines beginning with `## DP:' are a description of the patch.
X## DP: Unify AuthMySQL_ and Auth_MySQL_ namespace
X
X at DPATCH@
Xdiff -urNad mod-auth-mysql~/DIRECTIVES mod-auth-mysql/DIRECTIVES
X--- DIRECTIVES 2008-05-14 21:05:45.000000000 +0200
X+++ DIRECTIVES 2008-05-14 21:05:45.000000000 +0200
X@@ -1,23 +1,27 @@
X All the directives understood by this version of mod-auth-mysql are listed
X-below. The huge number of synonym directives is due to the merging of two
X-separate versions of the program, both of which had subtly different usage
X-symantics. I'm sure there will be rationalisation in the near future.
X+below. All directives exist in the two forms Auth_MySQL_* and AuthMySQL_*
X+and share the same semantics. They are the result of merging two separate
X+versions of the mod_auth_mysql in the first place, both of which had subtly
X+different usage symantics. The directive names have since then unified.
X+
X+Auth_MySQL <on/off>
X+ Enable/disable MySQL authentication
X
X Auth_MySQL_Info <host> <user> <password>
X Server-wide config option to specify the database host, username,
X and password used to connect to the MySQL server.
X
X This option affects all directories which do not override it via
X- AuthMySQL_Host, AuthMySQL_User, and/or AuthMySQL_Password.
X+ Auth_MySQL_Host, Auth_MySQL_User, and/or Auth_MySQL_Password.
X
X-AuthMySQL_DefaultHost <hostname>
X+Auth_MySQL_DefaultHost <hostname>
X Specifies the MySQL server to use for authentication.
X
X This option affects all directories which do not override it via
X- AuthMySQL_Host.
X+ Auth_MySQL_Host.
X
X-AuthMySQL_Host <hostname>
X- Synonym for AuthMySQL_DefaultHost, to be used in .htaccess files and
X+Auth_MySQL_Host <hostname>
X+ Synonym for Auth_MySQL_DefaultHost, to be used in .htaccess files and
X directory-specific entries.
X
X Auth_MySQL_DefaultPort <portnum>
X@@ -28,35 +32,37 @@
X Auth_MySQL_Port.
X
X Auth_MySQL_Port <portnum>
X- Specifies a non-default port to use (other than 3306) when talking
X- to the MySQL server on AuthMySQL_Host or AuthMySQL_DefaultHost.
X+ Synonym for Auth_MySQL_DefaultPort, to be used in .htaccess files and
X+ directory-specific entries.
X
X Auth_MySQL_DefaultSocket <socketname>
X- If using a local MySQL server, you can
X- specify a non-default named pipe to use instead of the default pipe
X- name compiled into your MySQL client library.
X+ If using a local MySQL server, you can specify a non-default named
X+ pipe to use instead of the default pipe name compiled into your MySQL
X+ client library.
X
X This option affects all directories which do not override it via
X Auth_MySQL_Socket.
X
X Auth_MySQL_Socket <socketname>
X- If using a local MySQL server, you can specify a non-default named
X- pipe to use instead of the default one compiled into MySQL with this
X- option.
X+ Synonym for Auth_MySQL_DefaultSocket, to be used in .htaccess files and
X+ directory-specific entries.
X
X-AuthMySQL_DefaultUser <username>
X+Auth_MySQL_DefaultUser <username>
X Specifies the username for connection to the MySQL server.
X
X-AuthMySQL_User <username>
X- Synonym for AuthMySQL_DefaultUser, to be used in .htaccess files and
X+Auth_MySQL_User <username>
X+ Synonym for Auth_MySQL_DefaultUser, to be used in .htaccess files and
X directory-specific entries.
X
X-AuthMySQL_DefaultPassword <password>
X+Auth_MySQL_Username <username>
X+ Synonym for Auth_MySQL_User.
X+
X+Auth_MySQL_DefaultPassword <password>
X Specifies the password user together with the above user.
X
X-AuthMySQL_Password <password>
X- Synonym for AuthMySQL_Password, to be used in .htaccess files and
X- directory-specific entries.
X+Auth_MySQL_Password <password>
X+ Synonym for Auth_MySQL_DefaultPassword, to be used in .htaccess files
X+ and directory-specific entries.
X
X Auth_MySQL_General_DB <database_name>
X Server-wide, specifies a default database name to use.
X@@ -65,13 +71,9 @@
X Synonym for Auth_MySQL_General_DB, to be used in .htaccess files and
X directory-specific entries.
X
X-AuthMySQL_DefaultDB <database_name>
X+Auth_MySQL_DefaultDB <database_name>
X Synonym for Auth_MySQL_General_DB.
X
X-AuthMySQL_DB <database_name>
X- Synonym for Auth_MySQL_General_DB, to be used in .htaccess files and
X- directory-specific entries.
X-
X AuthName "<Realm>"
X Describes the data you're guarding.
X
X@@ -96,27 +98,18 @@
X The name of the MySQL table in the specified database which stores
X username:password pairs. By default, it is 'mysql_auth'.
X
X-AuthMySQL_Password_Table <password_table_name>
X- Synonym for Auth_MySQL_Password_Table.
X-
X Auth_MySQL_Group_Table <group_table_name>
X As per ...Password_Table above, stores username:group pairs.
X Normally you'll store username:password:group triplets in the one
X table, but we are nothing if not flexible. Defaults to
X 'mysql_auth'.
X
X-AuthMySQL_Group_Table <group_table_name>
X- Synonym for Auth_MySQL_Group_Table.
X-
X Auth_MySQL_Username_Field <username_field_name>
X The name of the field which stores usernames. Defaults to
X 'username'. The username/password combo specified in Auth_MySQL_Info
X must have select privileges to this field in the Password and Group
X tables.
X
X-AuthMySQL_Username_Field <username_field_name>
X- Synonym for Auth_MySQL_Username_Field.
X-
X Auth_MySQL_Password_Field <password_field_name>
X As per ...Username_Field above, but for passwords. Same MySQL
X access privileges. Defaults to 'password'.
X@@ -128,9 +121,6 @@
X As per ...Username_Field above. Defaults to 'groups'. The query
X will use FIND_IN_SET(<group_name>,<group_field_name>).
X
X-AuthMySQL_Group_Field <group_field_name>
X- Synonym for Auth_MySQL_Group_Field.
X-
X Auth_MySQL_Group_User_Field <field_name>
X The name of the field in the groups table which stores the username.
X Defaults to the field name specified for usernames in the passwords
X@@ -147,6 +137,9 @@
X Adds arbitrary clause to username:group matching query, for example:
X " AND Allowed=1". Clause has to start with space. Default is empty.
X
X+Auth_MySQL_Where_Clause <SQL fragment>
X+ Synonym for Auth_MySQL_Password_Clause.
X+
X Auth_MySQL_Empty_Passwords <on/off>
X Whether or not to allow empty passwords. If the password field is
X empty (equals to '') and this option is 'on', users would be able to
X@@ -154,9 +147,6 @@
X PASSWORD CHECKING. If this is 'off', they would be denied access.
X Default: 'on'.
X
X-AuthMySQL_Empty_Passwords <on/off>
X- Synonym for Auth_MySQL_Empty_Passwords.
X-
X Auth_MySQL_Encryption_Types <type_list>
X
X Select which types of encryption to check, and in which order to
X@@ -205,9 +195,6 @@
X MySQL
X The hashing scheme used by the MySQL PASSWORD() function.
X
X-AuthMySQL_Encryption_Types <type_list>
X- Synonym for Auth_MySQL_Encryption_Types.
X-
X Auth_MySQL_Encrypted_Passwords <on/off> (DEPRECATED)
X Equivalent to: Auth_MySQL_Encryption_Types Crypt_DES
X Only used if ...Encryption_Types is not set. Defaults to 'on'. If
X@@ -215,17 +202,11 @@
X ...Encryption_Types is not set, passwords are expected to be in
X plaintext.
X
X-AuthMySQL_Encrypted_Passwords <on/off> (DEPRECATED)
X- Synonym for Auth_MySQL_Encrypted_Passwords.
X-
X Auth_MySQL_Scrambled_Passwords <on/off> (DEPRECATED)
X Equivalent to: Auth_MySQL_Encryption_Types MySQL
X The same restrictions apply to this directive as to
X ...Encrypted_Passwords.
X
X-AuthMySQL_Scrambled_Passwords <on/off> (DEPRECATED)
X- Synonym for Auth_MySQL_Scrambled_Passwords.
X-
X Auth_MySQL_Authoritative <on/off>
X Whether or not to use other authentication schemes if the user is
X successfully authenticated. That is, if the user passes the MySQL
X@@ -233,9 +214,6 @@
X option is set 'off'. The default is 'on' (i.e. if the user passes
X the MySQL module, they're considered OK).
X
X-AuthMySQL_Authoritative <on/off>
X- Synonym for Auth_MySQL_Authoritative.
X-
X Auth_MySQL_Non_Persistent <on/off>
X If set to 'on', the link to the MySQL server is explicitly closed
X after each authentication request. Note that I can't think of any
X@@ -245,10 +223,10 @@
X increase the maximum number of simultaneous threads in MySQL and
X keep this option off. Default: off, and for good reason.
X
X-AuthMySQL_Persistent <on/off>
X+Auth_MySQL_Persistent <on/off>
X An antonym for Auth_MySQL_Non_Persistent.
X
X-AuthMySQL_AllowOverride <on/off>
X+Auth_MySQL_AllowOverride <on/off>
X Whether or not .htaccess files are allowed to use their own
X Host/User/Password/DB specifications. If set to 'off', then the
X defaults specified in the httpd.conf cannot be overridden.
X@@ -257,6 +235,3 @@
X Whether or not to enable MySQL authentication. If it's off, the
X MySQL authentication will simply pass authentication off to other
X modules defined.
X-
X-AuthMySQL <on/off>
X- Synonym for Auth_MYSQL.
Xdiff -urNad mod-auth-mysql~/USAGE mod-auth-mysql/USAGE
X--- USAGE 2008-05-14 21:05:45.000000000 +0200
X+++ USAGE 2008-05-14 21:05:45.000000000 +0200
X@@ -44,9 +44,9 @@
X
X or
X
X-AuthMySQL_DefaultHost <host>
X-AuthMySQL_DefaultUser <user>
X-AuthMySQL_DefaultPassword <password>
X+Auth_MySQL_DefaultHost <host>
X+Auth_MySQL_DefaultUser <user>
X+Auth_MySQL_DefaultPassword <password>
X
X This should be placed globally.
X
X@@ -56,12 +56,12 @@
X Auth_MySQL_General_DB <database>
X
X to set that. This setting can be overridden in .htaccess files if
X-AuthMySQL_AllowOverride is set.
X+Auth_MySQL_AllowOverride is set.
X
X On that topic, if you want .htaccess files to be restricted in what they're
X able to connect to database-wise, you can
X
X-AuthMySQL_AllowOverride no
X+Auth_MySQL_AllowOverride no
X
X and the host, user, password, and database name cannot be changed.
X
Xdiff -urNad mod-auth-mysql~/mod_auth_mysql.c mod-auth-mysql/mod_auth_mysql.c
X--- mod_auth_mysql.c 2008-05-14 21:05:45.000000000 +0200
X+++ mod_auth_mysql.c 2008-05-14 21:16:30.000000000 +0200
X@@ -674,14 +674,30 @@
X NULL,
X RSRC_CONF, "host, user and password of the MySQL database" ),
X
X+ AP_INIT_TAKE3( "AuthMySQL_Info", set_auth_mysql_info,
X+ NULL,
X+ RSRC_CONF, "host, user and password of the MySQL database" ),
X+
X+ AP_INIT_TAKE1( "Auth_MySQL_DefaultHost", set_auth_mysql_host,
X+ NULL,
X+ RSRC_CONF, "Default MySQL host" ),
X+
X AP_INIT_TAKE1( "AuthMySQL_DefaultHost", set_auth_mysql_host,
X NULL,
X RSRC_CONF, "Default MySQL host" ),
X
X+ AP_INIT_TAKE1( "Auth_MySQL_DefaultUser", set_auth_mysql_user,
X+ NULL,
X+ RSRC_CONF, "Default MySQL user" ),
X+
X AP_INIT_TAKE1( "AuthMySQL_DefaultUser", set_auth_mysql_user,
X NULL,
X RSRC_CONF, "Default MySQL user" ),
X
X+ AP_INIT_TAKE1( "Auth_MySQL_DefaultPassword", set_auth_mysql_pwd,
X+ NULL,
X+ RSRC_CONF, "Default MySQL password" ),
X+
X AP_INIT_TAKE1( "AuthMySQL_DefaultPassword", set_auth_mysql_pwd,
X NULL,
X RSRC_CONF, "Default MySQL password" ),
X@@ -690,23 +706,39 @@
X NULL,
X RSRC_CONF, "Default MySQL server port" ),
X
X+ AP_INIT_TAKE1( "AuthMySQL_DefaultPort", set_auth_mysql_port,
X+ NULL,
X+ RSRC_CONF, "Default MySQL server port" ),
X+
X AP_INIT_TAKE1( "Auth_MySQL_DefaultSocket", set_auth_mysql_socket,
X NULL,
X RSRC_CONF, "Default MySQL server socket" ),
X
X+ AP_INIT_TAKE1( "AuthMySQL_DefaultSocket", set_auth_mysql_socket,
X+ NULL,
X+ RSRC_CONF, "Default MySQL server socket" ),
X+
X AP_INIT_TAKE1( "Auth_MySQL_General_DB", set_auth_mysql_db,
X NULL,
X RSRC_CONF, "default database for MySQL authentication" ),
X
X+ AP_INIT_TAKE1( "AuthMySQL_General_DB", set_auth_mysql_db,
X+ NULL,
X+ RSRC_CONF, "default database for MySQL authentication" ),
X+
X+ AP_INIT_TAKE1( "Auth_MySQL_DefaultDB", set_auth_mysql_db,
X+ NULL,
X+ RSRC_CONF, "default database for MySQL authentication" ),
X+
X AP_INIT_TAKE1( "AuthMySQL_DefaultDB", set_auth_mysql_db,
X NULL,
X RSRC_CONF, "default database for MySQL authentication" ),
X
X- AP_INIT_TAKE1( "AuthMySQL_Host", ap_set_string_slot,
X+ AP_INIT_TAKE1( "Auth_MySQL_Host", ap_set_string_slot,
X (void*)APR_OFFSETOF(mysql_auth_config_rec, db_host),
X OR_AUTHCFG, "database host" ),
X
X- AP_INIT_TAKE1( "Auth_MySQL_Host", ap_set_string_slot,
X+ AP_INIT_TAKE1( "AuthMySQL_Host", ap_set_string_slot,
X (void*)APR_OFFSETOF(mysql_auth_config_rec, db_host),
X OR_AUTHCFG, "database host" ),
X
X@@ -730,12 +762,20 @@
X (void*)APR_OFFSETOF(mysql_auth_config_rec, db_user),
X OR_AUTHCFG, "database user" ),
X
X+ AP_INIT_TAKE1( "AuthMySQL_Username", ap_set_string_slot,
X+ (void*)APR_OFFSETOF(mysql_auth_config_rec, db_user),
X+ OR_AUTHCFG, "database user" ),
X+
X+ AP_INIT_TAKE1( "Auth_MySQL_User", ap_set_string_slot,
X+ (void*)APR_OFFSETOF(mysql_auth_config_rec, db_user),
X+ OR_AUTHCFG, "database user" ),
X+
X AP_INIT_TAKE1( "AuthMySQL_User", ap_set_string_slot,
X (void*)APR_OFFSETOF(mysql_auth_config_rec, db_user),
X OR_AUTHCFG, "database user" ),
X
X AP_INIT_TAKE1( "Auth_MySQL_Password", ap_set_string_slot,
X- (void*)APR_OFFSETOF(mysql_auth_config_rec, db_pwd),
X+ (void*)APR_OFFSETOF(mysql_auth_config_rec, db_pwd),
X OR_AUTHCFG, "database password" ),
X
X AP_INIT_TAKE1( "AuthMySQL_Password", ap_set_string_slot,
X@@ -762,13 +802,17 @@
X (void*)APR_OFFSETOF(mysql_auth_config_rec, group_table),
X OR_AUTHCFG, "Name of the MySQL table containing the group-name/user-name combination; can be the same as the password-table." ),
X
X+ AP_INIT_TAKE1( "AuthMySQL_Group_Table", ap_set_string_slot,
X+ (void*)APR_OFFSETOF(mysql_auth_config_rec, group_table),
X+ OR_AUTHCFG, "Name of the MySQL table containing the group-name/user-name combination; can be the same as the password-table." ),
X+
X AP_INIT_TAKE1( "Auth_MySQL_Group_Clause", ap_set_string_slot,
X (void*)APR_OFFSETOF(mysql_auth_config_rec, group_where_clause),
X OR_AUTHCFG, "Additional WHERE clause for group/user-name lookup" ),
X
X- AP_INIT_TAKE1( "AuthMySQL_Group_Table", ap_set_string_slot,
X- (void*)APR_OFFSETOF(mysql_auth_config_rec, group_table),
X- OR_AUTHCFG, "Name of the MySQL table containing the group-name/user-name combination; can be the same as the password-table." ),
X+ AP_INIT_TAKE1( "AuthMySQL_Group_Clause", ap_set_string_slot,
X+ (void*)APR_OFFSETOF(mysql_auth_config_rec, group_where_clause),
X+ OR_AUTHCFG, "Additional WHERE clause for group/user-name lookup" ),
X
X AP_INIT_TAKE1( "Auth_MySQL_Password_Field", ap_set_string_slot,
X (void*)APR_OFFSETOF(mysql_auth_config_rec, password_field),
X@@ -782,6 +826,10 @@
X (void*)APR_OFFSETOF(mysql_auth_config_rec, password_where_clause),
X OR_AUTHCFG, "Additional WHERE clause for group password/user-name lookup" ),
X
X+ AP_INIT_TAKE1( "AuthMySQL_Password_Clause", ap_set_string_slot,
X+ (void*)APR_OFFSETOF(mysql_auth_config_rec, password_where_clause),
X+ OR_AUTHCFG, "Additional WHERE clause for group password/user-name lookup" ),
X+
X AP_INIT_TAKE1( "Auth_MySQL_Username_Field", ap_set_string_slot,
X (void*)APR_OFFSETOF(mysql_auth_config_rec, user_field),
X OR_AUTHCFG, "The name of the user-name field in the MySQL password (and possibly group) table(s)." ),
X@@ -822,6 +870,10 @@
X NULL,
X OR_AUTHCFG, "When 'on' the MySQL database is taken to be authoritative and access control is not passed along to other db or access modules." ),
X
X+ AP_INIT_FLAG( "Auth_MySQL_AllowOverride", set_auth_mysql_override,
X+ NULL,
X+ RSRC_CONF, "Allow directory overrides of configuration" ),
X+
X AP_INIT_FLAG( "AuthMySQL_AllowOverride", set_auth_mysql_override,
X NULL,
X RSRC_CONF, "Allow directory overrides of configuration" ),
X@@ -854,6 +906,14 @@
X NULL,
X OR_AUTHCFG, "Use non-persistent MySQL links" ),
X
X+ AP_INIT_FLAG( "AuthMySQL_Non_Persistent", set_non_persistent,
X+ NULL,
X+ OR_AUTHCFG, "Use non-persistent MySQL links" ),
X+
X+ AP_INIT_FLAG( "Auth_MySQL_Persistent", set_persistent,
X+ NULL,
X+ OR_AUTHCFG, "Use non-persistent MySQL links" ),
X+
X AP_INIT_FLAG( "AuthMySQL_Persistent", set_persistent,
X NULL,
X OR_AUTHCFG, "Use non-persistent MySQL links" ),
X@@ -870,6 +930,10 @@
X (void*)APR_OFFSETOF(mysql_auth_config_rec, password_where_clause),
X OR_AUTHCFG, "Additional WHERE clause for group password/user-name lookup" ),
X
X+ AP_INIT_TAKE1( "AuthMySQL_Where", ap_set_string_slot,
X+ (void*)APR_OFFSETOF(mysql_auth_config_rec, password_where_clause),
X+ OR_AUTHCFG, "Additional WHERE clause for group password/user-name lookup" ),
X+
X { NULL }
X };
X #else
X@@ -878,14 +942,30 @@
X NULL,
X RSRC_CONF, TAKE3, "host, user and password of the MySQL database" },
X
X+ { "AuthMySQL_Info", set_auth_mysql_info,
X+ NULL,
X+ RSRC_CONF, TAKE3, "host, user and password of the MySQL database" },
X+
X+ { "Auth_MySQL_DefaultHost", set_auth_mysql_host,
X+ NULL,
X+ RSRC_CONF, TAKE1, "Default MySQL host" },
X+
X { "AuthMySQL_DefaultHost", set_auth_mysql_host,
X NULL,
X RSRC_CONF, TAKE1, "Default MySQL host" },
X
X+ { "Auth_MySQL_DefaultUser", set_auth_mysql_user,
X+ NULL,
X+ RSRC_CONF, TAKE1, "Default MySQL user" },
X+
X { "AuthMySQL_DefaultUser", set_auth_mysql_user,
X NULL,
X RSRC_CONF, TAKE1, "Default MySQL user" },
X
X+ { "Auth_MySQL_DefaultPassword", set_auth_mysql_pwd,
X+ NULL,
X+ RSRC_CONF, TAKE1, "Default MySQL password" },
X+
X { "AuthMySQL_DefaultPassword", set_auth_mysql_pwd,
X NULL,
X RSRC_CONF, TAKE1, "Default MySQL password" },
X@@ -894,23 +974,39 @@
X NULL,
X RSRC_CONF, TAKE1, "Default MySQL server port" },
X
X+ { "AuthMySQL_DefaultPort", set_auth_mysql_port,
X+ NULL,
X+ RSRC_CONF, TAKE1, "Default MySQL server port" },
X+
X { "Auth_MySQL_DefaultSocket", set_auth_mysql_socket,
X NULL,
X RSRC_CONF, TAKE1, "Default MySQL server socket" },
X
X+ { "AuthMySQL_DefaultSocket", set_auth_mysql_socket,
X+ NULL,
X+ RSRC_CONF, TAKE1, "Default MySQL server socket" },
X+
X { "Auth_MySQL_General_DB", set_auth_mysql_db,
X NULL,
X RSRC_CONF, TAKE1, "default database for MySQL authentication" },
X
X+ { "AuthMySQL_General_DB", set_auth_mysql_db,
X+ NULL,
X+ RSRC_CONF, TAKE1, "default database for MySQL authentication" },
X+
X+ { "Auth_MySQL_DefaultDB", set_auth_mysql_db,
X+ NULL,
X+ RSRC_CONF, TAKE1, "default database for MySQL authentication" },
X+
X { "AuthMySQL_DefaultDB", set_auth_mysql_db,
X NULL,
X RSRC_CONF, TAKE1, "default database for MySQL authentication" },
X
X- { "AuthMySQL_Host", ap_set_string_slot,
X+ { "Auth_MySQL_Host", ap_set_string_slot,
X (void *) XtOffsetOf(mysql_auth_config_rec, db_host),
X OR_AUTHCFG, TAKE1, "database host" },
X
X- { "Auth_MySQL_Host", ap_set_string_slot,
X+ { "AuthMySQL_Host", ap_set_string_slot,
X (void *) XtOffsetOf(mysql_auth_config_rec, db_host),
X OR_AUTHCFG, TAKE1, "database host" },
X
X@@ -918,14 +1014,30 @@
X (void *) XtOffsetOf(mysql_auth_config_rec, db_socket),
X OR_AUTHCFG, TAKE1, "database host socket" },
X
X+ { "AuthMySQL_Socket", ap_set_string_slot,
X+ (void *) XtOffsetOf(mysql_auth_config_rec, db_socket),
X+ OR_AUTHCFG, TAKE1, "database host socket" },
X+
X { "Auth_MySQL_Port", ap_set_string_slot,
X (void *) XtOffsetOf(mysql_auth_config_rec, db_port),
X OR_AUTHCFG, TAKE1, "database host socket" },
X
X+ { "AuthMySQL_Port", ap_set_string_slot,
X+ (void *) XtOffsetOf(mysql_auth_config_rec, db_port),
X+ OR_AUTHCFG, TAKE1, "database host socket" },
X+
X { "Auth_MySQL_Username", ap_set_string_slot,
X (void *) XtOffsetOf(mysql_auth_config_rec, db_user),
X OR_AUTHCFG, TAKE1, "database user" },
X
X+ { "AuthMySQL_Username", ap_set_string_slot,
X+ (void *) XtOffsetOf(mysql_auth_config_rec, db_user),
X+ OR_AUTHCFG, TAKE1, "database user" },
X+
X+ { "Auth_MySQL_User", ap_set_string_slot,
X+ (void *) XtOffsetOf(mysql_auth_config_rec, db_user),
X+ OR_AUTHCFG, TAKE1, "database user" },
X+
X { "AuthMySQL_User", ap_set_string_slot,
X (void *) XtOffsetOf(mysql_auth_config_rec, db_user),
X OR_AUTHCFG, TAKE1, "database user" },
X@@ -958,14 +1070,18 @@
X (void *) XtOffsetOf(mysql_auth_config_rec, group_table),
X OR_AUTHCFG, TAKE1, "Name of the MySQL table containing the group-name/user-name combination; can be the same as the password-table." },
X
X+ { "AuthMySQL_Group_Table", ap_set_string_slot,
X+ (void *) XtOffsetOf(mysql_auth_config_rec, group_table),
X+ OR_AUTHCFG, TAKE1, "Name of the MySQL table containing the group-name/user-name combination; can be the same as the password-table." },
X+
X { "Auth_MySQL_Group_Clause", ap_set_string_slot,
X (void *) XtOffsetOf(mysql_auth_config_rec, group_where_clause),
X OR_AUTHCFG, TAKE1, "Additional WHERE clause for group/user-name lookup" },
X
X- { "AuthMySQL_Group_Table", ap_set_string_slot,
X- (void *) XtOffsetOf(mysql_auth_config_rec, group_table),
X- OR_AUTHCFG, TAKE1, "Name of the MySQL table containing the group-name/user-name combination; can be the same as the password-table." },
X-
X+ { "AuthMySQL_Group_Clause", ap_set_string_slot,
X+ (void *) XtOffsetOf(mysql_auth_config_rec, group_where_clause),
X+ OR_AUTHCFG, TAKE1, "Additional WHERE clause for group/user-name lookup" },
X+
X { "Auth_MySQL_Password_Field", ap_set_string_slot,
X (void *) XtOffsetOf(mysql_auth_config_rec, password_field),
X OR_AUTHCFG, TAKE1, "The name of the field in the MySQL password table" },
X@@ -978,6 +1094,10 @@
X (void *) XtOffsetOf(mysql_auth_config_rec, password_where_clause),
X OR_AUTHCFG, TAKE1, "Additional WHERE clause for group password/user-name lookup" },
X
X+ { "AuthMySQL_Password_Clause", ap_set_string_slot,
X+ (void *) XtOffsetOf(mysql_auth_config_rec, password_where_clause),
X+ OR_AUTHCFG, TAKE1, "Additional WHERE clause for group password/user-name lookup" },
X+
X { "Auth_MySQL_Username_Field", ap_set_string_slot,
X (void *) XtOffsetOf(mysql_auth_config_rec, user_field),
X OR_AUTHCFG, TAKE1, "The name of the user-name field in the MySQL password (and possibly group) table(s)." },
X@@ -1018,6 +1138,10 @@
X NULL,
X OR_AUTHCFG, FLAG, "When 'on' the MySQL database is taken to be authoritative and access control is not passed along to other db or access modules." },
X
X+ { "Auth_MySQL_AllowOverride", set_auth_mysql_override,
X+ NULL,
X+ RSRC_CONF, FLAG, "Allow directory overrides of configuration" },
X+
X { "AuthMySQL_AllowOverride", set_auth_mysql_override,
X NULL,
X RSRC_CONF, FLAG, "Allow directory overrides of configuration" },
X@@ -1050,6 +1174,14 @@
X NULL,
X OR_AUTHCFG, FLAG, "Use non-persistent MySQL links" },
X
X+ { "AuthMySQL_Non_Persistent", set_non_persistent,
X+ NULL,
X+ OR_AUTHCFG, FLAG, "Use non-persistent MySQL links" },
X+
X+ { "Auth_MySQL_Persistent", set_persistent,
X+ NULL,
X+ OR_AUTHCFG, FLAG, "Use non-persistent MySQL links" },
X+
X { "AuthMySQL_Persistent", set_persistent,
X NULL,
X OR_AUTHCFG, FLAG, "Use non-persistent MySQL links" },
X@@ -1066,6 +1198,10 @@
X (void *) XtOffsetOf(mysql_auth_config_rec, password_where_clause),
X OR_AUTHCFG, TAKE1, "Additional WHERE clause for group password/user-name lookup" },
X
X+ { "AuthMySQL_Where", ap_set_string_slot,
X+ (void *) XtOffsetOf(mysql_auth_config_rec, password_where_clause),
X+ OR_AUTHCFG, TAKE1, "Additional WHERE clause for group password/user-name lookup" },
X+
X { NULL }
X };
X
4c5893bf3661b0686efd5200c88e6899
echo x - mod_auth_mysql_debian/files/patch-003-ftbfs_apache2
sed 's/^X//' >mod_auth_mysql_debian/files/patch-003-ftbfs_apache2 << 'd330cfc391c6d2da46cb8e20bbd111f9'
X#! /bin/sh /usr/share/dpatch/dpatch-run
X## 003-ftbfs_apache2.2.dpatch by Julian Calaby <julian.calaby at gmail.com>
X##
X## DP: Fixes the FTBFS against apache2.2 (see #389579 for more information)
X
X at DPATCH@
X
X--- mod_auth_mysql.c 2006-11-21 15:07:43.000000000 +1100
X+++ mod_auth_mysql.c 2006-11-21 16:42:29.000000000 +1100
X@@ -48,6 +48,7 @@
X #include <http_log.h>
X #ifdef APACHE2
X #include "http_request.h" /* for ap_hook_(check_user_id | auth_checker)*/
X+#include <apr_general.h>
X #include <apr_md5.h>
X #include <apr_sha1.h>
X #else
X@@ -684,123 +685,123 @@
X RSRC_CONF, "default database for MySQL authentication" ),
X
X AP_INIT_TAKE1( "AuthMySQL_Host", ap_set_string_slot,
X- (void*)APR_XtOffsetOf(mysql_auth_config_rec, db_host),
X+ (void*)APR_OFFSETOF(mysql_auth_config_rec, db_host),
X OR_AUTHCFG, "database host" ),
X
X AP_INIT_TAKE1( "Auth_MySQL_Host", ap_set_string_slot,
X- (void*)APR_XtOffsetOf(mysql_auth_config_rec, db_host),
X+ (void*)APR_OFFSETOF(mysql_auth_config_rec, db_host),
X OR_AUTHCFG, "database host" ),
X
X AP_INIT_TAKE1( "Auth_MySQL_Socket", ap_set_string_slot,
X- (void*)APR_XtOffsetOf(mysql_auth_config_rec, db_socket),
X+ (void*)APR_OFFSETOF(mysql_auth_config_rec, db_socket),
X OR_AUTHCFG, "database host socket" ),
X
X AP_INIT_TAKE1( "AuthMySQL_Socket", ap_set_string_slot,
X- (void*)APR_XtOffsetOf(mysql_auth_config_rec, db_socket),
X+ (void*)APR_OFFSETOF(mysql_auth_config_rec, db_socket),
X OR_AUTHCFG, "database host socket" ),
X
X AP_INIT_TAKE1( "Auth_MySQL_Port", ap_set_string_slot,
X- (void*)APR_XtOffsetOf(mysql_auth_config_rec, db_port),
X+ (void*)APR_OFFSETOF(mysql_auth_config_rec, db_port),
X OR_AUTHCFG, "database host port" ),
X
X AP_INIT_TAKE1( "AuthMySQL_Port", ap_set_string_slot,
X- (void*)APR_XtOffsetOf(mysql_auth_config_rec, db_port),
X+ (void*)APR_OFFSETOF(mysql_auth_config_rec, db_port),
X OR_AUTHCFG, "database host port" ),
X
X AP_INIT_TAKE1( "Auth_MySQL_Username", ap_set_string_slot,
X- (void*)APR_XtOffsetOf(mysql_auth_config_rec, db_user),
X+ (void*)APR_OFFSETOF(mysql_auth_config_rec, db_user),
X OR_AUTHCFG, "database user" ),
X
X AP_INIT_TAKE1( "AuthMySQL_User", ap_set_string_slot,
X- (void*)APR_XtOffsetOf(mysql_auth_config_rec, db_user),
X+ (void*)APR_OFFSETOF(mysql_auth_config_rec, db_user),
X OR_AUTHCFG, "database user" ),
X
X AP_INIT_TAKE1( "Auth_MySQL_Password", ap_set_string_slot,
X- (void*)APR_XtOffsetOf(mysql_auth_config_rec, db_pwd),
X+ (void*)APR_OFFSETOF(mysql_auth_config_rec, db_pwd),
X OR_AUTHCFG, "database password" ),
X
X AP_INIT_TAKE1( "AuthMySQL_Password", ap_set_string_slot,
X- (void*)APR_XtOffsetOf(mysql_auth_config_rec, db_pwd),
X+ (void*)APR_OFFSETOF(mysql_auth_config_rec, db_pwd),
X OR_AUTHCFG, "database password" ),
X
X AP_INIT_TAKE1( "Auth_MySQL_DB", ap_set_string_slot,
X- (void*)APR_XtOffsetOf(mysql_auth_config_rec, db_name),
X+ (void*)APR_OFFSETOF(mysql_auth_config_rec, db_name),
X OR_AUTHCFG, "database name" ),
X
X AP_INIT_TAKE1( "AuthMySQL_DB", ap_set_string_slot,
X- (void*)APR_XtOffsetOf(mysql_auth_config_rec, db_name),
X+ (void*)APR_OFFSETOF(mysql_auth_config_rec, db_name),
X OR_AUTHCFG, "database name" ),
X
X AP_INIT_TAKE1( "Auth_MySQL_Password_Table", ap_set_string_slot,
X- (void*)APR_XtOffsetOf(mysql_auth_config_rec, user_table),
X+ (void*)APR_OFFSETOF(mysql_auth_config_rec, user_table),
X OR_AUTHCFG, "Name of the MySQL table containing the password/user-name combination" ),
X
X AP_INIT_TAKE1( "AuthMySQL_Password_Table", ap_set_string_slot,
X- (void*)APR_XtOffsetOf(mysql_auth_config_rec, user_table),
X+ (void*)APR_OFFSETOF(mysql_auth_config_rec, user_table),
X OR_AUTHCFG, "Name of the MySQL table containing the password/user-name combination" ),
X
X AP_INIT_TAKE1( "Auth_MySQL_Group_Table", ap_set_string_slot,
X- (void*)APR_XtOffsetOf(mysql_auth_config_rec, group_table),
X+ (void*)APR_OFFSETOF(mysql_auth_config_rec, group_table),
X OR_AUTHCFG, "Name of the MySQL table containing the group-name/user-name combination; can be the same as the password-table." ),
X
X AP_INIT_TAKE1( "Auth_MySQL_Group_Clause", ap_set_string_slot,
X- (void*)APR_XtOffsetOf(mysql_auth_config_rec, group_where_clause),
X+ (void*)APR_OFFSETOF(mysql_auth_config_rec, group_where_clause),
X OR_AUTHCFG, "Additional WHERE clause for group/user-name lookup" ),
X
X AP_INIT_TAKE1( "AuthMySQL_Group_Table", ap_set_string_slot,
X- (void*)APR_XtOffsetOf(mysql_auth_config_rec, group_table),
X+ (void*)APR_OFFSETOF(mysql_auth_config_rec, group_table),
X OR_AUTHCFG, "Name of the MySQL table containing the group-name/user-name combination; can be the same as the password-table." ),
X
X AP_INIT_TAKE1( "Auth_MySQL_Password_Field", ap_set_string_slot,
X- (void*)APR_XtOffsetOf(mysql_auth_config_rec, password_field),
X+ (void*)APR_OFFSETOF(mysql_auth_config_rec, password_field),
X OR_AUTHCFG, "The name of the field in the MySQL password table" ),
X
X AP_INIT_TAKE1( "AuthMySQL_Password_Field", ap_set_string_slot,
X- (void*)APR_XtOffsetOf(mysql_auth_config_rec, password_field),
X+ (void*)APR_OFFSETOF(mysql_auth_config_rec, password_field),
X OR_AUTHCFG, "The name of the field in the MySQL password table" ),
X
X AP_INIT_TAKE1( "Auth_MySQL_Password_Clause", ap_set_string_slot,
X- (void*)APR_XtOffsetOf(mysql_auth_config_rec, password_where_clause),
X+ (void*)APR_OFFSETOF(mysql_auth_config_rec, password_where_clause),
X OR_AUTHCFG, "Additional WHERE clause for group password/user-name lookup" ),
X
X AP_INIT_TAKE1( "Auth_MySQL_Username_Field", ap_set_string_slot,
X- (void*)APR_XtOffsetOf(mysql_auth_config_rec, user_field),
X+ (void*)APR_OFFSETOF(mysql_auth_config_rec, user_field),
X OR_AUTHCFG, "The name of the user-name field in the MySQL password (and possibly group) table(s)." ),
X
X AP_INIT_TAKE1( "AuthMySQL_Username_Field", ap_set_string_slot,
X- (void*)APR_XtOffsetOf(mysql_auth_config_rec, user_field),
X+ (void*)APR_OFFSETOF(mysql_auth_config_rec, user_field),
X OR_AUTHCFG, "The name of the user-name field in the MySQL password (and possibly group) table(s)." ),
X
X AP_INIT_TAKE1( "Auth_MySQL_Group_Field", ap_set_string_slot,
X- (void*)APR_XtOffsetOf(mysql_auth_config_rec, group_field),
X+ (void*)APR_OFFSETOF(mysql_auth_config_rec, group_field),
X OR_AUTHCFG, "The name of the group field in the MySQL group table; must be set if you want to use groups." ),
X
X AP_INIT_TAKE1( "AuthMySQL_Group_Field", ap_set_string_slot,
X- (void*)APR_XtOffsetOf(mysql_auth_config_rec, group_field),
X+ (void*)APR_OFFSETOF(mysql_auth_config_rec, group_field),
X OR_AUTHCFG, "The name of the group field in the MySQL group table; must be set if you want to use groups." ),
X
X AP_INIT_TAKE1( "Auth_MySQL_Group_User_Field", ap_set_string_slot,
X- (void*)APR_XtOffsetOf(mysql_auth_config_rec, group_user_field),
X+ (void*)APR_OFFSETOF(mysql_auth_config_rec, group_user_field),
X OR_AUTHCFG, "The name of the user-name field in the MySQL group table; defaults to the same as the username field for the password table." ),
X
X AP_INIT_TAKE1( "AuthMySQL_Group_User_Field", ap_set_string_slot,
X- (void*)APR_XtOffsetOf(mysql_auth_config_rec, group_user_field),
X+ (void*)APR_OFFSETOF(mysql_auth_config_rec, group_user_field),
X OR_AUTHCFG, "The name of the user-name field in the MySQL group table; defaults to the same as the username field for the password table." ),
X
X AP_INIT_FLAG( "Auth_MySQL_Empty_Passwords", ap_set_flag_slot,
X- (void*)APR_XtOffsetOf(mysql_auth_config_rec, allow_empty_passwords),
X+ (void*)APR_OFFSETOF(mysql_auth_config_rec, allow_empty_passwords),
X OR_AUTHCFG, "Enable (on) or disable (off) empty password strings; in which case any user password is accepted." ),
X
X AP_INIT_FLAG( "AuthMySQL_Empty_Passwords", ap_set_flag_slot,
X- (void*)APR_XtOffsetOf(mysql_auth_config_rec, allow_empty_passwords),
X+ (void*)APR_OFFSETOF(mysql_auth_config_rec, allow_empty_passwords),
X OR_AUTHCFG, "Enable (on) or disable (off) empty password strings; in which case any user password is accepted." ),
X
X AP_INIT_FLAG( "Auth_MySQL_Authoritative", ap_set_flag_slot,
X- (void*)APR_XtOffsetOf(mysql_auth_config_rec, authoritative),
X+ (void*)APR_OFFSETOF(mysql_auth_config_rec, authoritative),
X OR_AUTHCFG, "When 'on' the MySQL database is taken to be authoritative and access control is not passed along to other db or access modules." ),
X
X AP_INIT_FLAG( "AuthMySQL_Authoritative", ap_set_flag_slot,
X- (void*)APR_XtOffsetOf(mysql_auth_config_rec, authoritative),
X+ (void*)APR_OFFSETOF(mysql_auth_config_rec, authoritative),
X OR_AUTHCFG, "When 'on' the MySQL database is taken to be authoritative and access control is not passed along to other db or access modules." ),
X
X AP_INIT_FLAG( "AuthMySQL_AllowOverride", set_auth_mysql_override,
X@@ -848,7 +849,7 @@
X OR_AUTHCFG, "Enable MySQL authentication" ),
X
X AP_INIT_TAKE1( "Auth_MySQL_Where", ap_set_string_slot,
X- (void*)APR_XtOffsetOf(mysql_auth_config_rec, password_where_clause),
X+ (void*)APR_OFFSETOF(mysql_auth_config_rec, password_where_clause),
X OR_AUTHCFG, "Additional WHERE clause for group password/user-name lookup" ),
X
X { NULL }
d330cfc391c6d2da46cb8e20bbd111f9
echo x - mod_auth_mysql_debian/files/patch-004-reconnect
sed 's/^X//' >mod_auth_mysql_debian/files/patch-004-reconnect << 'a9938ad040b7ff8e5ff9989c0467920d'
X#! /bin/sh /usr/share/dpatch/dpatch-run
X## 004-reconnect.dpatch by Matej Vela <vela at debian.org>
X##
X## All lines beginning with `## DP:' are a description of the patch.
X## DP: Automatically re-establish connections with MySQL 5.0.3+.
X
X at DPATCH@
Xdiff -urNad libapache-mod-auth-mysql-4.3.9~/mod_auth_mysql.c libapache-mod-auth-mysql-4.3.9/mod_auth_mysql.c
X--- mod_auth_mysql.c 2008-02-12 15:33:56.000000000 +0100
X+++ mod_auth_mysql.c 2008-02-12 15:43:30.000000000 +0100
X@@ -1092,6 +1092,9 @@
X char *dbname = auth_db_name, *user = auth_db_user, *pwd = auth_db_pwd;
X void (*sigpipe_handler)();
X unsigned long client_flag = 0;
X+#if MYSQL_VERSION_ID >= 50013
X+ my_bool do_reconnect = 1;
X+#endif
X
X APACHELOG(APLOG_DEBUG, r, "Opening DB connection for %s", sec->dir);
X
X@@ -1160,6 +1163,13 @@
X return errno;
X }
X
X+#if MYSQL_VERSION_ID >= 50013
X+ /* The default is no longer to automatically reconnect on failure,
X+ * (as of 5.0.3) so we have to set that option here. The option is
X+ * available from 5.0.13. */
X+ mysql_options(sec->dbh, MYSQL_OPT_RECONNECT, &do_reconnect);
X+#endif
X+
X signal(SIGPIPE, sigpipe_handler);
X
X APACHELOG(APLOG_DEBUG, r, "Persistent in %s is %i", sec->dir, sec->persistent);
a9938ad040b7ff8e5ff9989c0467920d
echo x - mod_auth_mysql_debian/files/Makefile
sed 's/^X//' >mod_auth_mysql_debian/files/Makefile << '75e190e16de44d8b2b76eb23506efc99'
X#
X# $FreeBSD: ports/www/mod_auth_mysql_another/files/Makefile,v 1.1 2006/04/15 13:21:00 mbr Exp $
X#
Xall: build
X
Xbuild:
X %%APXS%% -c -L%%AP_LIB%% -I%%AP_INC%% -lmysqlclient -lm -lz mod_auth_mysql.c
X
Xinstall:
X %%APXS%% -i mod_auth_mysql.so
75e190e16de44d8b2b76eb23506efc99
echo x - mod_auth_mysql_debian/files/patch-010-enctype-apache
sed 's/^X//' >mod_auth_mysql_debian/files/patch-010-enctype-apache << '3a9c7d03fce84ee2eab21a45bcdf57a3'
X#! /bin/sh /usr/share/dpatch/dpatch-run
X## 010-enctype-apache.dpatch by Andreas Barth <aba at not.so.argh.org>
X## Joey Schulze <joey at infodrom.org>
X##
X## All lines beginning with `## DP:' are a description of the patch.
X## DP: Provide an Apache authentication method
X
X at DPATCH@
Xdiff -urNad mod-auth-mysql~/DIRECTIVES mod-auth-mysql/DIRECTIVES
X--- DIRECTIVES 2008-05-15 12:55:28.000000000 +0200
X+++ DIRECTIVES 2008-05-15 12:55:29.000000000 +0200
X@@ -194,6 +194,10 @@
X
X MySQL
X The hashing scheme used by the MySQL PASSWORD() function.
X+
X+ Apache
X+ The hashing scheme used by htpasswd utility. Compatible to
X+ authuserfile.
X
X Auth_MySQL_Encrypted_Passwords <on/off> (DEPRECATED)
X Equivalent to: Auth_MySQL_Encryption_Types Crypt_DES
Xdiff -urNad mod-auth-mysql~/mod_auth_mysql.c mod-auth-mysql/mod_auth_mysql.c
X--- mod_auth_mysql.c 2008-05-15 12:55:28.000000000 +0200
X+++ mod_auth_mysql.c 2008-05-15 12:56:28.000000000 +0200
X@@ -103,6 +103,7 @@
X #define CRYPT_ENCRYPTION_FLAG 1<<5
X #endif
X #define SHA1SUM_ENCRYPTION_FLAG 1<<6
X+#define APACHE_ENCRYPTION_FLAG 1<<7
X
X /* from include/sha1.h from the mysql-server source distribution */
X #define SHA1_HASH_SIZE 20 /* Hash size in bytes */
X@@ -239,6 +240,15 @@
X return (!strcmp(scrambled_passwd, enc_passwd));
X }
X
X+static int check_apache_encryption(const char *passwd, char *enc_passwd)
X+{
X+#ifdef APACHE2
X+ return (!apr_password_validate(passwd, enc_passwd));
X+#else
X+ return (!ap_validate_password(passwd, enc_passwd));
X+#endif
X+}
X+
X typedef struct {
X char *name;
X int (*check_function)(const char *passwd, char *enc_passwd);
X@@ -257,6 +267,7 @@
X { "Crypt", check_crypt_encryption, CRYPT_ENCRYPTION_FLAG },
X { "PHP_MD5", check_PHP_MD5_encryption, PHP_MD5_ENCRYPTION_FLAG },
X { "SHA1Sum", check_SHA1Sum_encryption, SHA1SUM_ENCRYPTION_FLAG},
X+ { "Apache", check_apache_encryption, APACHE_ENCRYPTION_FLAG },
X /* add additional encryption types below */
X { NULL, NULL, 0 }
X };
3a9c7d03fce84ee2eab21a45bcdf57a3
echo x - mod_auth_mysql_debian/files/patch-006-options
sed 's/^X//' >mod_auth_mysql_debian/files/patch-006-options << '29fc4b8c507d90d8818c3589d661909a'
X#! /bin/sh /usr/share/dpatch/dpatch-run
X## 006-options.dpatch by Adrian Bridgett <adrian at smop.co.uk>
X##
X## All lines beginning with `## DP:' are a description of the patch.
X## DP: Properly set 1-byte int config variables
X
X at DPATCH@
Xdiff -urNad mod-auth-mysql~/mod_auth_mysql.c mod-auth-mysql/mod_auth_mysql.c
X--- mod_auth_mysql.c 2008-05-14 19:35:05.000000000 +0200
X+++ mod_auth_mysql.c 2008-05-14 20:05:44.000000000 +0200
X@@ -645,6 +645,24 @@
X return NULL;
X }
X
X+static const char *set_empty_passwords(cmd_parms *cmd, void *sconf, int arg)
X+{
X+ mysql_auth_config_rec *sec = (mysql_auth_config_rec *) sconf;
X+
X+ sec->allow_empty_passwords = arg;
X+ APACHELOG(APLOG_DEBUG, cmd, "set_empty_passwords: Setting allow_empty_passwords in %s to %i", sec->dir, sec->allow_empty_passwords);
X+ return NULL;
X+}
X+
X+static const char *set_authoritative(cmd_parms *cmd, void *sconf, int arg)
X+{
X+ mysql_auth_config_rec *sec = (mysql_auth_config_rec *) sconf;
X+
X+ sec->authoritative = arg;
X+ APACHELOG(APLOG_DEBUG, cmd, "set_authoritative: Setting authoritative in %s to %i", sec->dir, sec->authoritative);
X+ return NULL;
X+}
X+
X /* The command list. What it's called, when it's legal to use it, and
X * what to do when we find it. Pretty cool, IMHO.
X */
X@@ -788,20 +806,20 @@
X (void*)APR_OFFSETOF(mysql_auth_config_rec, group_user_field),
X OR_AUTHCFG, "The name of the user-name field in the MySQL group table; defaults to the same as the username field for the password table." ),
X
X- AP_INIT_FLAG( "Auth_MySQL_Empty_Passwords", ap_set_flag_slot,
X- (void*)APR_OFFSETOF(mysql_auth_config_rec, allow_empty_passwords),
X+ AP_INIT_FLAG( "Auth_MySQL_Empty_Passwords", set_empty_passwords,
X+ NULL,
X OR_AUTHCFG, "Enable (on) or disable (off) empty password strings; in which case any user password is accepted." ),
X
X- AP_INIT_FLAG( "AuthMySQL_Empty_Passwords", ap_set_flag_slot,
X- (void*)APR_OFFSETOF(mysql_auth_config_rec, allow_empty_passwords),
X+ AP_INIT_FLAG( "AuthMySQL_Empty_Passwords", set_empty_passwords,
X+ NULL,
X OR_AUTHCFG, "Enable (on) or disable (off) empty password strings; in which case any user password is accepted." ),
X
X- AP_INIT_FLAG( "Auth_MySQL_Authoritative", ap_set_flag_slot,
X- (void*)APR_OFFSETOF(mysql_auth_config_rec, authoritative),
X+ AP_INIT_FLAG( "Auth_MySQL_Authoritative", set_authoritative,
X+ NULL,
X OR_AUTHCFG, "When 'on' the MySQL database is taken to be authoritative and access control is not passed along to other db or access modules." ),
X
X- AP_INIT_FLAG( "AuthMySQL_Authoritative", ap_set_flag_slot,
X- (void*)APR_OFFSETOF(mysql_auth_config_rec, authoritative),
X+ AP_INIT_FLAG( "AuthMySQL_Authoritative", set_authoritative,
X+ NULL,
X OR_AUTHCFG, "When 'on' the MySQL database is taken to be authoritative and access control is not passed along to other db or access modules." ),
X
X AP_INIT_FLAG( "AuthMySQL_AllowOverride", set_auth_mysql_override,
X@@ -984,20 +1002,20 @@
X (void *) XtOffsetOf(mysql_auth_config_rec, group_user_field),
X OR_AUTHCFG, TAKE1, "The name of the user-name field in the MySQL group table; defaults to the same as the username field for the password table." },
X
X- { "Auth_MySQL_Empty_Passwords", ap_set_flag_slot,
X- (void *) XtOffsetOf(mysql_auth_config_rec, allow_empty_passwords),
X+ { "Auth_MySQL_Empty_Passwords", set_empty_passwords,
X+ NULL,
X OR_AUTHCFG, FLAG, "Enable (on) or disable (off) empty password strings; in which case any user password is accepted." },
X
X- { "AuthMySQL_Empty_Passwords", ap_set_flag_slot,
X- (void *) XtOffsetOf(mysql_auth_config_rec, allow_empty_passwords),
X+ { "AuthMySQL_Empty_Passwords", set_empty_passwords,
X+ NULL,
X OR_AUTHCFG, FLAG, "Enable (on) or disable (off) empty password strings; in which case any user password is accepted." },
X
X- { "Auth_MySQL_Authoritative", ap_set_flag_slot,
X- (void *) XtOffsetOf(mysql_auth_config_rec, authoritative),
X+ { "Auth_MySQL_Authoritative", set_authoritative,
X+ NULL,
X OR_AUTHCFG, FLAG, "When 'on' the MySQL database is taken to be authoritative and access control is not passed along to other db or access modules." },
X
X- { "AuthMySQL_Authoritative", ap_set_flag_slot,
X- (void *) XtOffsetOf(mysql_auth_config_rec, authoritative),
X+ { "AuthMySQL_Authoritative", set_authoritative,
X+ NULL,
X OR_AUTHCFG, FLAG, "When 'on' the MySQL database is taken to be authoritative and access control is not passed along to other db or access modules." },
X
X { "AuthMySQL_AllowOverride", set_auth_mysql_override,
29fc4b8c507d90d8818c3589d661909a
echo x - mod_auth_mysql_debian/files/patch-012-charset
sed 's/^X//' >mod_auth_mysql_debian/files/patch-012-charset << 'fccc0cc7ae716b238ac11f1623201452'
X#! /bin/sh /usr/share/dpatch/dpatch-run
X## 012-charset.dpatch by Joey Schulze <joey at infodrom.org>
X##
X## DP: Add support for specifying the connection character set
X## DP: via Auth_MySQL_CharacterSet.
X
X at DPATCH@
Xdiff -urNad mod-auth-mysql~/DIRECTIVES mod-auth-mysql/DIRECTIVES
X--- DIRECTIVES 2008-11-21 17:05:40.000000000 +0100
X+++ DIRECTIVES 2008-11-21 17:05:40.000000000 +0100
X@@ -74,6 +74,18 @@
X Auth_MySQL_DefaultDB <database_name>
X Synonym for Auth_MySQL_General_DB.
X
X+Auth_MySQL_CharacterSet <character set>
X+
X+ Set the connection character set to the specified one. Otherwise no
X+ particular character set is used when the connection is created.
X+ This could cause problems with differently encoded strings and table
X+ or column collations. The parameter must be a valid MySQL
X+ character. It is mandatory if the character set used for tables/rows
X+ differs from the default.
X+
X+AuthMySQL_CharacterSet <character set>
X+ Synonym for Auth_MySQL_CharacterSet.
X+
X AuthName "<Realm>"
X Describes the data you're guarding.
X
Xdiff -urNad mod-auth-mysql~/mod_auth_mysql.c mod-auth-mysql/mod_auth_mysql.c
X--- mod_auth_mysql.c 2008-11-21 17:05:40.000000000 +0100
X+++ mod_auth_mysql.c 2008-11-21 17:05:50.000000000 +0100
X@@ -299,6 +299,7 @@
X char *db_user;
X char *db_pwd;
X char *db_name;
X+ char *db_charset;
X
X MYSQL *dbh;
X
X@@ -344,6 +345,7 @@
X #else
X static void
X #endif
X+
X auth_mysql_cleanup(void *ptr)
X {
X mysql_auth_config_rec *sec = ptr;
X@@ -395,7 +397,7 @@
X sizeof(mysql_auth_config_rec));
X #endif
X
X- sec->db_name = sec->db_socket = sec->db_user = sec->db_pwd = NULL;
X+ sec->db_name = sec->db_socket = sec->db_user = sec->db_pwd = sec->db_charset = NULL;
X
X sec->dbh = NULL;
X /* When the memory for this connection record is cleaned, we must
X@@ -804,6 +806,14 @@
X (void*)APR_OFFSETOF(mysql_auth_config_rec, db_name),
X OR_AUTHCFG, "database name" ),
X
X+ AP_INIT_TAKE1( "Auth_MySQL_CharacterSet", ap_set_string_slot,
X+ (void*)APR_OFFSETOF(mysql_auth_config_rec, db_charset),
X+ OR_AUTHCFG, "character set" ),
X+
X+ AP_INIT_TAKE1( "AuthMySQL_CharacterSet", ap_set_string_slot,
X+ (void*)APR_OFFSETOF(mysql_auth_config_rec, db_charset),
X+ OR_AUTHCFG, "character set" ),
X+
X AP_INIT_TAKE1( "Auth_MySQL_Password_Table", ap_set_string_slot,
X (void*)APR_OFFSETOF(mysql_auth_config_rec, user_table),
X OR_AUTHCFG, "Name of the MySQL table containing the password/user-name combination" ),
X@@ -1072,6 +1082,14 @@
X (void *) XtOffsetOf(mysql_auth_config_rec, db_name),
X OR_AUTHCFG, TAKE1, "database name" },
X
X+ { "Auth_MySQL_CharacterSet", ap_set_string_slot,
X+ (void *) XtOffsetOf(mysql_auth_config_rec, db_charset),
X+ OR_AUTHCFG, TAKE1, "character set" },
X+
X+ { "AuthMySQL_CharacterSet", ap_set_string_slot,
X+ (void *) XtOffsetOf(mysql_auth_config_rec, db_charset),
X+ OR_AUTHCFG, TAKE1, "character set" },
X+
X { "Auth_MySQL_Password_Table", ap_set_string_slot,
X (void *) XtOffsetOf(mysql_auth_config_rec, user_table),
X OR_AUTHCFG, TAKE1, "Name of the MySQL table containing the password/user-name combination" },
X@@ -1264,6 +1282,7 @@
X #if MYSQL_VERSION_ID >= 50013
X my_bool do_reconnect = 1;
X #endif
X+ char *query;
X
X APACHELOG(APLOG_DEBUG, r, "Opening DB connection for %s", sec->dir);
X
X@@ -1354,6 +1373,30 @@
X #endif
X }
X
X+ if (sec->db_charset) {
X+ APACHELOG(APLOG_DEBUG, r,
X+ "Setting character set to %s", sec->db_charset);
X+
X+ query = (char *) PSTRCAT(r->pool, "SET CHARACTER SET ", sec->db_charset, NULL);
X+ if (!query) {
X+ APACHELOG(APLOG_ERR, r,
X+ "Failed to create query string - we're no good...");
X+ return -1;
X+ }
X+
X+ if (mysql_query(sec->dbh, query)) {
X+ if (sec->dbh)
X+ {
X+ APACHELOG(APLOG_ERR, r,
X+ "Query call failed: %s (%i)", mysql_error(sec->dbh),
X+ mysql_errno(sec->dbh));
X+ }
X+
X+ APACHELOG(APLOG_DEBUG, r, "Failed query was: [%s]", query);
X+ return -1;
X+ }
X+ }
X+
X /* W00t! We made it! */
X return 0;
X }
fccc0cc7ae716b238ac11f1623201452
echo x - mod_auth_mysql_debian/files/patch-001-usage
sed 's/^X//' >mod_auth_mysql_debian/files/patch-001-usage << '198fdbc242efc6483f5a816cf3dacff6'
X#! /bin/sh /usr/share/dpatch/dpatch-run
X## 001-usage.dpatch by Matthew Palmer <mpalmer at debian.org>
X##
X## DP: Explain the md5 and sha1 cryptographic methods better
X
X at DPATCH@
X
X--- USAGE
X+++ USAGE
X@@ -18,7 +18,10 @@
X primary key (username)
X );
X
X-This would work quite well.
X+This would work quite well. Remember that the passwd field needs to be long
X+enough to store the entire password string -- for example, if you are using
X+MD5 passwords, passwd needs to be 32 characters long, and if you are using
X+SHA1 it must be 40 characters long.
X
X NOTE 1: You don't have to use a new table for the purpose of storing
X usernames and passwords; I quite happily use a 'members' table (with all
198fdbc242efc6483f5a816cf3dacff6
echo x - mod_auth_mysql_debian/Makefile
sed 's/^X//' >mod_auth_mysql_debian/Makefile << '5b79d25101ca0df03ce36ae5abbf814f'
X# New ports collection makefile for: apache mod_auth_mysql_debian
X# Date created: 2009/04/24
X# Whom: mjonuschat at gmail.com
X#
X# $FreeBSD$
X
XPORTNAME= mod_auth_mysql
XPORTVERSION= 4.3.9
XCATEGORIES= www
XMASTER_SITES= ${MASTER_SITE_DEBIAN}
XMASTER_SITE_SUBDIR= pool/main/m/${PORTNAME:S/_/-/g}
XPKGNAMESUFFIX= _debian
XDISTNAME=${PORTNAME:S/_/-/g}_${PORTVERSION}.orig
X
XMAINTAINER= mjonuschat at gmail.com
XCOMMENT= Allows users to use MySQL databases for user authentication
X
XUSE_MYSQL= YES
X
XRUN_DEPENDS+= mysql:${PORTSDIR}/databases/mysql50-server
X
XWRKSRC= ${WRKDIR}/${PORTNAME:S/_/-/g}-${PORTVERSION}
X
XHAS_CONFIGURE= YES
XCONFIGURE_ARGS= --with-apxs=${APXS}
XMODULENAME= mod_auth_mysql
X
XUSE_APACHE= 20+
X
XAP_FAST_BUILD= YES
XAP_GENPLIST= YES
XAP_INC= ${LOCALBASE}/include/mysql
XAP_LIB= ${LOCALBASE}/lib/mysql
XAP_EXTRAS= -DAPACHE2 -lmysqlclient -lz -lm
X
X.if !defined(NOPORTDOCS)
XPORTDOCS= INSTALL DIRECTIVES USAGE
X.endif
X
Xpost-install:
X.if !defined(NOPORTDOCS)
X @${MKDIR} ${DOCSDIR}
X @cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
X.endif
X
X.include <bsd.port.mk>
5b79d25101ca0df03ce36ae5abbf814f
echo x - mod_auth_mysql_debian/pkg-descr
sed 's/^X//' >mod_auth_mysql_debian/pkg-descr << 'c2bcb625571e8f991bc45c3da606748b'
XA module for the Apache 2 web server which enables HTTP authentication
Xagainst information stored in a MySQL database.
X
XThere are a few different mod_auth_mysql modules in the ports tree. Some
Xonly work with apache 1.3, some haven't been updated or maintained for a few
Xyears.
X
XThis version of mod_auth_mysql is being maintained within the current
XDebian Linux development and sees regular maintainance and updates.
X
XWWW: http://packages.qa.debian.org/m/mod-auth-mysql.html
X
X- Morton Jonuschat
Xmjonuschat at gmail.com
c2bcb625571e8f991bc45c3da606748b
echo x - mod_auth_mysql_debian/distinfo
sed 's/^X//' >mod_auth_mysql_debian/distinfo << 'd3dde000e2cd710fff7fd26d1e5f6f70'
XMD5 (mod-auth-mysql_4.3.9.orig.tar.gz) = 9c1ecbe5fb64d4c93444311ff34bfe35
XSHA256 (mod-auth-mysql_4.3.9.orig.tar.gz) = ed0d42547808fe9a213cf62e93ffef65e518da774bb497138d126f2de4a54d2e
XSIZE (mod-auth-mysql_4.3.9.orig.tar.gz) = 48479
d3dde000e2cd710fff7fd26d1e5f6f70
exit
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list