diff options
author | jeh <jeh@FreeBSD.org> | 2006-07-11 19:49:01 +0800 |
---|---|---|
committer | jeh <jeh@FreeBSD.org> | 2006-07-11 19:49:01 +0800 |
commit | 0d3faa8287f60158199f92bb8f76ba40d0e56c1f (patch) | |
tree | 58a23da6339927b1f903e06d6f097c196c867c17 | |
parent | 2afd69bbc187e4d33664d52cef5cfc7430b9e2b0 (diff) | |
download | freebsd-ports-graphics-0d3faa8287f60158199f92bb8f76ba40d0e56c1f.tar.gz freebsd-ports-graphics-0d3faa8287f60158199f92bb8f76ba40d0e56c1f.tar.zst freebsd-ports-graphics-0d3faa8287f60158199f92bb8f76ba40d0e56c1f.zip |
The buffer for creating a scrambled password is too small for newer
versions of MySQL and was causing segfaults
-rw-r--r-- | www/mod_auth_mysql/Makefile | 2 | ||||
-rw-r--r-- | www/mod_auth_mysql/files/patch-ad | 26 |
2 files changed, 22 insertions, 6 deletions
diff --git a/www/mod_auth_mysql/Makefile b/www/mod_auth_mysql/Makefile index 65d4a84658c..8c367a8fa31 100644 --- a/www/mod_auth_mysql/Makefile +++ b/www/mod_auth_mysql/Makefile @@ -6,7 +6,7 @@ PORTNAME= mod_auth_mysql PORTVERSION= 2.20 -PORTREVISION= 7 +PORTREVISION= 8 CATEGORIES= www MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= mod-auth-mysql diff --git a/www/mod_auth_mysql/files/patch-ad b/www/mod_auth_mysql/files/patch-ad index 2e305c698b4..f3b9c4a732c 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; } |