aboutsummaryrefslogtreecommitdiff
path: root/www/mod_auth_mysql_another
diff options
context:
space:
mode:
authorMartin Blapp <mbr@FreeBSD.org>2004-01-11 18:52:38 +0000
committerMartin Blapp <mbr@FreeBSD.org>2004-01-11 18:52:38 +0000
commit276cbb36175a9efac09b98c988e4e4337a517ef3 (patch)
tree952bc3aae23b82b912d54bb242b6554a28bdaa62 /www/mod_auth_mysql_another
parent4a18c8b0dcd140bf0b5efde4779f767a0fcfbaa2 (diff)
downloadports-276cbb36175a9efac09b98c988e4e4337a517ef3.tar.gz
ports-276cbb36175a9efac09b98c988e4e4337a517ef3.zip
Notes
Diffstat (limited to 'www/mod_auth_mysql_another')
-rw-r--r--www/mod_auth_mysql_another/files/patch-mod_auth_mysql.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/www/mod_auth_mysql_another/files/patch-mod_auth_mysql.c b/www/mod_auth_mysql_another/files/patch-mod_auth_mysql.c
new file mode 100644
index 000000000000..d8a75fd7f455
--- /dev/null
+++ b/www/mod_auth_mysql_another/files/patch-mod_auth_mysql.c
@@ -0,0 +1,33 @@
+--- mod_auth_mysql.c Sat May 10 16:12:34 2003
++++ mod_auth_mysql.c Sun Jan 11 13:16:47 2004
+@@ -97,6 +97,7 @@
+ * MODULE-DEFINITION-END
+ */
+
++#define MYSQL_CRYPT_LEN 17U
+
+ #ifdef APACHE2
+ #define PCALLOC apr_pcalloc
+@@ -617,7 +618,8 @@
+ conn_rec *c = r->connection;
+ const char *sent_pw, *real_pw;
+ int res;
+- char *scrambled_sent_pw;
++ unsigned long hash_res[2];
++ char scrambled_sent_pw[MYSQL_CRYPT_LEN];
+
+ if ((res = ap_get_basic_auth_pw (r, &sent_pw)))
+ return res;
+@@ -658,8 +660,10 @@
+
+ /* if AuthMySQLScrambledPassword is On, compare the scrambled password */
+ if(sec->mysqlScrambled) {
+- scrambled_sent_pw = PCALLOC(r->pool, 33);
+- make_scrambled_password(scrambled_sent_pw, sent_pw);
++ /* make_scrambled_password(scrambled_sent_pw, sent_pw); */
++ hash_password(hash_res, sent_pw);
++ snprintf(scrambled_sent_pw, sizeof scrambled_sent_pw, "%08lx%08lx",
++ hash_res[0], hash_res[1]);
+ if(strcmp(real_pw, scrambled_sent_pw)) {
+ passwords_match = 0;
+ }