From e6c954176e7efb539c7a464dac6dae8fcfd79daa Mon Sep 17 00:00:00 2001 From: mat Date: Tue, 30 Sep 2014 13:19:16 +0000 Subject: Fix with apache 2.4. Sponsored by: Absolight --- www/mod_auth_cookie_mysql2/Makefile | 2 +- .../files/patch-mod_auth_cookie_sql2.c | 29 ++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 www/mod_auth_cookie_mysql2/files/patch-mod_auth_cookie_sql2.c diff --git a/www/mod_auth_cookie_mysql2/Makefile b/www/mod_auth_cookie_mysql2/Makefile index 8fd93dc1a0ae..165458f3c0a1 100644 --- a/www/mod_auth_cookie_mysql2/Makefile +++ b/www/mod_auth_cookie_mysql2/Makefile @@ -13,7 +13,7 @@ MAINTAINER= apache@FreeBSD.org COMMENT= Allows authentication against MySQL database via secure cookie USE_MYSQL= yes -USE_APACHE= 22 +USE_APACHE= 22+ AP_FAST_BUILD= yes AP_GENPLIST= yes diff --git a/www/mod_auth_cookie_mysql2/files/patch-mod_auth_cookie_sql2.c b/www/mod_auth_cookie_mysql2/files/patch-mod_auth_cookie_sql2.c new file mode 100644 index 000000000000..3a91df04e14f --- /dev/null +++ b/www/mod_auth_cookie_mysql2/files/patch-mod_auth_cookie_sql2.c @@ -0,0 +1,29 @@ +--- mod_auth_cookie_sql2.c.orig 2009-06-17 23:28:01 UTC ++++ mod_auth_cookie_sql2.c +@@ -182,7 +182,11 @@ + ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, r, ERRTAG "valid cookie found, data: %s", cookies); + #endif + ++#if MODULE_MAGIC_NUMBER_MAJOR >= 20111130 ++ db_ret=check_against_db(conf, r, conf->cookiename, value, username,r->useragent_ip, conf->sql_addon, tc); ++#else + db_ret=check_against_db(conf, r, conf->cookiename, value, username,r->connection->remote_ip, conf->sql_addon, tc); ++#endif + } + } + } +@@ -205,7 +209,13 @@ + *value = '\0'; + value++; + +- if ((db_ret=check_against_db(conf, r, cookies, value, username, r->connection->remote_ip, conf->sql_addon, tc)) == RET_AUTHORIZED) { ++ if ((db_ret=check_against_db(conf, r, cookies, value, username, ++#if MODULE_MAGIC_NUMBER_MAJOR >= 20111130 ++ r->useragent_ip, ++#else ++ r->connection->remote_ip, ++#endif ++ conf->sql_addon, tc)) == RET_AUTHORIZED) { + // found valid cookie + + #ifdef AUTH_COOKIE_SQL2_DEBUG -- cgit