diff options
author | James E. Housley <jeh@FreeBSD.org> | 2003-09-28 18:30:30 +0000 |
---|---|---|
committer | James E. Housley <jeh@FreeBSD.org> | 2003-09-28 18:30:30 +0000 |
commit | 6c3f74c822c437324a24be54c4ae20e1d1c659f1 (patch) | |
tree | 067e7a174a2665dd87482cd74645faea2de4b41c /www/mod_auth_mysql | |
parent | 23bb797eeb1993082d735635a57ff0ac235fa0ef (diff) |
Notes
Diffstat (limited to 'www/mod_auth_mysql')
-rw-r--r-- | www/mod_auth_mysql/Makefile | 10 | ||||
-rw-r--r-- | www/mod_auth_mysql/files/patch-ad | 20 |
2 files changed, 24 insertions, 6 deletions
diff --git a/www/mod_auth_mysql/Makefile b/www/mod_auth_mysql/Makefile index e2fe5794afba..b5c54f974201 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= 1 +PORTREVISION= 2 CATEGORIES= www MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= mod-auth-mysql @@ -15,7 +15,13 @@ MAINTAINER= jeh@FreeBSD.org COMMENT= Allows users to use MySQL databases for user authentication BUILD_DEPENDS= ${LOCALBASE}/sbin/apxs:${PORTSDIR}/www/${AP_PORT} -LIB_DEPENDS= mysqlclient.10:${PORTSDIR}/databases/mysql323-client +.if exists(${LOCALBASE}/lib/mysql/libmysqlclient.so.10) +LIB_DEPENDS+= mysqlclient.10:${PORTSDIR}/databases/mysql323-client +.elif exists(${LOCALBASE}/lib/mysql/libmysqlclient.so.14) +LIB_DEPENDS+= mysqlclient.14:${PORTSDIR}/databases/mysql41-client +.else +LIB_DEPENDS+= mysqlclient.12:${PORTSDIR}/databases/mysql40-client +.endif RUN_DEPENDS= ${LOCALBASE}/sbin/${AP_TARGET}:${PORTSDIR}/www/${AP_PORT} .include <bsd.port.pre.mk> diff --git a/www/mod_auth_mysql/files/patch-ad b/www/mod_auth_mysql/files/patch-ad index 77c8c469a1fe..0d22b3a8ef91 100644 --- a/www/mod_auth_mysql/files/patch-ad +++ b/www/mod_auth_mysql/files/patch-ad @@ -1,6 +1,18 @@ --- mod_auth_mysql.c.orig Sat Oct 3 13:41:41 1998 -+++ mod_auth_mysql.c Tue Nov 5 07:13:30 2002 -@@ -559,6 +559,10 @@ ++++ mod_auth_mysql.c Sun Sep 28 14:21:47 2003 +@@ -372,7 +372,11 @@ + } + if (name != NULL) { /* open an SQL link */ + /* link to the MySQL database and register its cleanup!@$ */ ++#if MYSQL_VERSION_ID >= 40000 ++ mysql_auth = mysql_real_connect(&auth_sql_server, auth_db_host, user, pwd, name, 0, NULL, 0); ++#else /* MYSQL_VERSION_ID < 40000 */ + mysql_auth = mysql_connect(&auth_sql_server, auth_db_host, user, pwd); ++#endif /* MYSQL_VERSION_ID < 40000 */ + if (sec->non_persistent && mysql_auth) { + note_cleanups_for_mysql_auth(r->pool, mysql_auth); + } +@@ -559,6 +563,10 @@ switch (mysql_check_user_password(r, c->user, sent_pw, sec)) { case 0: @@ -11,7 +23,7 @@ note_basic_auth_failure(r); return AUTH_REQUIRED; break; -@@ -582,6 +586,7 @@ +@@ -582,6 +590,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; @@ -19,7 +31,7 @@ int m = r->method_number; int method_restricted = 0; register int x; -@@ -653,6 +658,10 @@ +@@ -653,6 +662,10 @@ if (!(sec->assume_authoritative)) { return DECLINED; } |