aboutsummaryrefslogtreecommitdiffstats
path: root/www/mod_auth_mysql/files/patch-ad
diff options
context:
space:
mode:
Diffstat (limited to 'www/mod_auth_mysql/files/patch-ad')
-rw-r--r--www/mod_auth_mysql/files/patch-ad26
1 files changed, 21 insertions, 5 deletions
diff --git a/www/mod_auth_mysql/files/patch-ad b/www/mod_auth_mysql/files/patch-ad
index 2e305c698b45..f3b9c4a732c3 100644
--- a/www/mod_auth_mysql/files/patch-ad
+++ b/www/mod_auth_mysql/files/patch-ad
@@ -1,6 +1,22 @@
--- mod_auth_mysql.c.orig Sat Oct 3 13:41:41 1998
-+++ mod_auth_mysql.c Tue Feb 24 05:53:32 2004
-@@ -372,7 +372,12 @@
++++ mod_auth_mysql.c Tue Jul 11 07:43:36 2006
+@@ -55,8 +55,14 @@
+
+ static int check_mysql_encryption(const char *passwd, char *enc_passwd)
+ {
+- char scrambled_passwd[32];
++ /* Make more then big enough */
++ char scrambled_passwd[256];
+
++#if MYSQL_VERSION_ID >= 40000
++ make_scrambled_password_323(scrambled_passwd, passwd);
++ if (strcmp(scrambled_passwd, enc_passwd) == 0) return 1;
++#endif /* MYSQL_VERSION_ID >= 40000 */
++
+ make_scrambled_password(scrambled_passwd, passwd);
+ return (!strcmp(scrambled_passwd, enc_passwd));
+ }
+@@ -372,7 +378,12 @@
}
if (name != NULL) { /* open an SQL link */
/* link to the MySQL database and register its cleanup!@$ */
@@ -13,7 +29,7 @@
if (sec->non_persistent && mysql_auth) {
note_cleanups_for_mysql_auth(r->pool, mysql_auth);
}
-@@ -559,6 +564,10 @@
+@@ -559,6 +570,10 @@
switch (mysql_check_user_password(r, c->user, sent_pw, sec)) {
case 0:
@@ -24,7 +40,7 @@
note_basic_auth_failure(r);
return AUTH_REQUIRED;
break;
-@@ -582,6 +591,7 @@
+@@ -582,6 +597,7 @@
{
mysql_auth_config_rec *sec = (mysql_auth_config_rec *) get_module_config(r->per_dir_config, &auth_mysql_module);
char *user = r->connection->user;
@@ -32,7 +48,7 @@
int m = r->method_number;
int method_restricted = 0;
register int x;
-@@ -653,6 +663,10 @@
+@@ -653,6 +669,10 @@
if (!(sec->assume_authoritative)) {
return DECLINED;
}