MySQL authentication support for Apache, submitted by Sam Smith

This commit is contained in:
jakob 2002-09-15 19:28:36 +00:00
parent 612c230803
commit 287e7c5541
9 changed files with 136 additions and 0 deletions

View File

@ -0,0 +1,40 @@
# $OpenBSD: Makefile,v 1.1.1.1 2002/09/15 19:28:36 jakob Exp $
COMMENT= "Apache MySQL authentication module"
# This port currently only works with archs supporting dynamic loading
# and has Apache that supports DSO's.
ONLY_FOR_ARCHS= alpha i386 m68k powerpc sparc sparc64
VERSION= 3.2
DISTNAME= mod_auth_mysql-${VERSION}
PKGNAME= ${DISTNAME}
CATEGORIES= www
MAINTAINER= Sam Smith <S@mSmith.net>
HOMEPAGE= http://sourceforge.net/projects/mod-auth-mysql
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=mod-auth-mysql/}
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
LIB_DEPENDS= :mysql-client-3.23.*:databases/mysql
BUILD_DEPENDS= ${LIB_DEPENDS}
NO_CONFIGURE= true
post-build:
sed 's,!!PREFIX!!,${PREFIX},' \
< ${FILESDIR}/mod_auth_mysql-enable \
> ${WRKBUILD}/mod_auth_mysql-enable
do-install:
${INSTALL_PROGRAM} ${WRKBUILD}/mod_auth_mysql.so ${PREFIX}/lib/
${INSTALL_SCRIPT} ${WRKBUILD}/mod_auth_mysql-enable ${PREFIX}/sbin/
${INSTALL_MAN_DIR} ${PREFIX}/share/doc/mod_auth_mysql
${INSTALL_MAN} ${WRKSRC}/{README,USAGE} ${PREFIX}/share/doc/mod_auth_mysql
.include <bsd.port.mk>

View File

@ -0,0 +1,3 @@
MD5 (mod_auth_mysql-3.2.tar.gz) = 66e9ee64094946199a5e524c60ceeee5
RMD160 (mod_auth_mysql-3.2.tar.gz) = 240ee7035655a6fe82a74e70644b34c036b91831
SHA1 (mod_auth_mysql-3.2.tar.gz) = e9596b3c8c57b727cb9671f4e393ba9ad9da54f7

View File

@ -0,0 +1,18 @@
#!/bin/sh
#
# $OpenBSD: mod_auth_mysql-enable,v 1.1.1.1 2002/09/15 19:28:36 jakob Exp $
MODULE=!!PREFIX!!/lib/mod_auth_mysql.so
if [ `id -u` -ne 0 ]; then
echo "You must be root to run this script."
exit
fi
if [ ! -f ${MODULE} ]; then
echo "Cannot find mod_auth_mysql module (${MODULE})"
exit 1
else
echo "Enabling MySQL Authentication module..."
/usr/sbin/apxs -i -a -n auth_mysql ${MODULE}
fi

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-Makefile,v 1.1.1.1 2002/09/15 19:28:36 jakob Exp $
--- Makefile Mon Sep 10 15:12:08 2001
+++ Makefile Tue Sep 10 20:17:09 2002
@@ -3,7 +3,7 @@
DSO = mod_auth_mysql.so
SRCS = mod_auth_mysql.c
HDRS = mod_auth_mysql.h
-OPTS = -I/usr/include/mysql -L/usr/lib/mysql -lmysqlclient
+OPTS = -I$(LOCALBASE)/include/mysql -L$(LOCALBASE)/lib/mysql -lmysqlclient
all: $(DSO)

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-USAGE,v 1.1.1.1 2002/09/15 19:28:36 jakob Exp $
--- USAGE Mon Sep 10 15:11:37 2001
+++ USAGE Tue Sep 10 21:17:21 2002
@@ -31,7 +31,7 @@
2. Create the auth table, e.g.:
prompt> mysql http_auth
mysql> create table mysql_auth (
- -> username char(25),
+ -> username char(25) not null,
-> passwd char(25),
-> groups char(25),
-> primary key (username)

View File

@ -0,0 +1,27 @@
#!/bin/sh
#
# $OpenBSD: DEINSTALL,v 1.1.1.1 2002/09/15 19:28:36 jakob Exp $
#
# mod_auth_mysql de-installation
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
CONF=`apxs -q SYSCONFDIR`/httpd.conf
MODULE=/usr/lib/apache/modules/mod_auth_mysql.so
rm -f ${MODULE}
echo
echo "+---------------"
echo "| To completely deinstall the $1 package you"
echo "| should edit ${CONF}"
echo "| and remove the line that starts with "
echo "| LoadModule auth_mysql_module "
echo "|"
echo "| Do not do this if you plan on re-installing $1"
echo "| package before the next apache restart."
echo "+---------------"
echo
exit 0

View File

@ -0,0 +1,5 @@
This is the Apache MySQL authentication module. It allows any Apache
web-server to use a MySQL database for authentication and accounting
requests.
WWW: ${HOMEPAGE}

View File

@ -0,0 +1,13 @@
+---------------
| To finish the install of mod_auth_mysql, you need
| to enable the module using the following command
|
| ${PREFIX}/sbin/mod_auth_mysql-enable
|
| You should also read
| ${PREFIX}/share/doc/mod_auth_mysql/USAGE
|
| If you already have Apache running on your machine,
| you should not use "apachectl restart" - instead,
| you should fully stop and then restart the server.
+---------------

View File

@ -0,0 +1,6 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2002/09/15 19:28:36 jakob Exp $
lib/mod_auth_mysql.so
sbin/mod_auth_mysql-enable
share/doc/mod_auth_mysql/README
share/doc/mod_auth_mysql/USAGE
@dirrm share/doc/mod_auth_mysql