diff options
author | Donny Davies <woodchip@gentoo.org> | 2002-11-28 20:34:47 +0000 |
---|---|---|
committer | Donny Davies <woodchip@gentoo.org> | 2002-11-28 20:34:47 +0000 |
commit | 7eba6dba58d33500e18b9d0b1e2362b757a76459 (patch) | |
tree | add73700f1963ae7c1cd34a7f1b2bea569ceb44b /net-www/mod_auth_mysql | |
parent | updated layout (diff) | |
download | historical-7eba6dba58d33500e18b9d0b1e2362b757a76459.tar.gz historical-7eba6dba58d33500e18b9d0b1e2362b757a76459.tar.bz2 historical-7eba6dba58d33500e18b9d0b1e2362b757a76459.zip |
new Apache2 module
Diffstat (limited to 'net-www/mod_auth_mysql')
-rw-r--r-- | net-www/mod_auth_mysql/ChangeLog | 8 | ||||
-rw-r--r-- | net-www/mod_auth_mysql/files/12_mod_auth_mysql.conf | 129 | ||||
-rw-r--r-- | net-www/mod_auth_mysql/files/digest-mod_auth_mysql-1.11 | 1 | ||||
-rw-r--r-- | net-www/mod_auth_mysql/mod_auth_mysql-1.11.ebuild | 30 |
4 files changed, 168 insertions, 0 deletions
diff --git a/net-www/mod_auth_mysql/ChangeLog b/net-www/mod_auth_mysql/ChangeLog new file mode 100644 index 000000000000..678551836213 --- /dev/null +++ b/net-www/mod_auth_mysql/ChangeLog @@ -0,0 +1,8 @@ +# ChangeLog for net-www/mod_auth_mysql +# Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL +# $Header: /var/cvsroot/gentoo-x86/net-www/mod_auth_mysql/ChangeLog,v 1.1 2002/11/28 20:32:10 woodchip Exp $ + +*mod_auth_mysql-1.11 (28 Nov 2002) + + 28 Nov 2002; Donny Davies <woodchip@gentoo.org> : + Initial import; created by me. diff --git a/net-www/mod_auth_mysql/files/12_mod_auth_mysql.conf b/net-www/mod_auth_mysql/files/12_mod_auth_mysql.conf new file mode 100644 index 000000000000..6d87594c8d85 --- /dev/null +++ b/net-www/mod_auth_mysql/files/12_mod_auth_mysql.conf @@ -0,0 +1,129 @@ +<IfDefine AUTH_MYSQL> + <IfModule !mod_auth_mysql.c> + LoadModule mysql_auth_module extramodules/mod_auth_mysql.so + </IfModule> +</IfDefine> + +<IfModule mod_auth_mysql.c> + +# +# mod_auth_mysql can be used to limit access to documents by checking +# data in a MySQL database. +# + +# This will enable user-based MySQL authentication of everything +# within /home/httpd. You'll need to do the following as the MySQL +# root user beforehand: +# +# CREATE DATABASE auth; +# USE auth; +# CREATE TABLE users ( +# user_name CHAR(30) NOT NULL, +# user_passwd CHAR(20) NOT NULL, +# PRIMARY KEY (user_name) +# ); +# GRANT SELECT +# ON auth.users +# TO authuser@localhost +# IDENTIFIED BY 'PaSsW0Rd'; +# +# INSERT INTO users VALUES ('testuser', ENCRYPT('testpass')); +# +#<Directory /home/httpd> +# AuthName "MySQL authenticated zone" +# AuthType Basic +# +# AuthMySQLUser authuser +# AuthMySQLPassword PaSsW0Rd +# AuthMySQLDB auth +# AuthMySQLUserTable users +# AuthMySQLNameField user_name +# AuthMySQLPasswordField user_passwd +# +# require valid-user +#</Directory> + +# This will enable group-based MySQL authentication of everything +# within /home/httpd. You'll need to do the following as the MySQL +# root user beforehand: +# +# CREATE DATABASE auth; +# USE auth; +# CREATE TABLE users ( +# user_name CHAR(30) NOT NULL, +# user_passwd CHAR(20) NOT NULL, +# user_group CHAR(20) NOT NULL, +# PRIMARY KEY (user_name) +# ); +# GRANT SELECT +# ON auth.users +# TO authuser@localhost +# IDENTIFIED BY 'PaSsW0Rd'; +# +# INSERT INTO users VALUES ('testuser', ENCRYPT('testpass'), 'user'); +# INSERT INTO users VALUES ('testadmin', ENCRYPT('testpass'), 'admin'); +# +#<Directory /home/httpd> +# AuthName "MySQL group authenticated zone" +# AuthType Basic +# +# AuthMySQLUser authuser +# AuthMySQLPassword PaSsW0Rd +# AuthMySQLDB auth +# AuthMySQLUserTable users +# AuthMySQLNameField user_name +# AuthMySQLPasswordField user_passwd +# AuthMySQLGroupField user_group +# +# require group admin +#</Directory> + +# Like the above this enables group-based MySQL authentication of +# everything within /home/httpd, but this configuration allows users to +# belong to more than one group. You'll need to do the following as +# the MySQL root user beforehand: +# +# CREATE DATABASE auth; +# USE auth; +# CREATE TABLE users ( +# user_name CHAR(30) NOT NULL, +# user_passwd CHAR(20) NOT NULL, +# PRIMARY KEY (user_name) +# ); +# CREATE TABLE groups ( +# user_name CHAR(30) NOT NULL, +# user_group CHAR(20) NOT NULL, +# PRIMARY KEY (user_name, user_group) +# ); +# GRANT SELECT +# ON auth.users +# TO authuser@localhost +# IDENTIFIED BY 'PaSsW0Rd'; +# GRANT SELECT +# ON auth.groups +# TO authuser@localhost +# IDENTIFIED BY 'PaSsW0Rd'; +# +# INSERT INTO users VALUES ('testuser', ENCRYPT('testpass')); +# INSERT INTO groups VALUES ('testuser', 'user'); +# INSERT INTO users VALUES ('testadmin', ENCRYPT('testpass')); +# INSERT INTO groups VALUES ('testadmin', 'admin'); +# INSERT INTO groups VALUES ('testadmin', 'user'); +# +#<Directory /home/httpd> +# AuthName "MySQL group authenticated zone" +# AuthType Basic +# +# AuthMySQLUser authuser +# AuthMySQLPassword PaSsW0Rd +# AuthMySQLDB auth +# AuthMySQLUserTable users +# AuthMySQLNameField user_name +# AuthMySQLPasswordField user_passwd +# AuthMySQLGroupTable groups +# AuthMySQLGroupField user_group +# +# require group user +#</Directory> + +</IfModule> diff --git a/net-www/mod_auth_mysql/files/digest-mod_auth_mysql-1.11 b/net-www/mod_auth_mysql/files/digest-mod_auth_mysql-1.11 new file mode 100644 index 000000000000..76e17c9d9ca9 --- /dev/null +++ b/net-www/mod_auth_mysql/files/digest-mod_auth_mysql-1.11 @@ -0,0 +1 @@ +MD5 612e92542015e5d176428edc28e2b2f1 mod_auth_mysql-1.11-gentoo.tar.bz2 7395 diff --git a/net-www/mod_auth_mysql/mod_auth_mysql-1.11.ebuild b/net-www/mod_auth_mysql/mod_auth_mysql-1.11.ebuild new file mode 100644 index 000000000000..16c5c21f92a3 --- /dev/null +++ b/net-www/mod_auth_mysql/mod_auth_mysql-1.11.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-www/mod_auth_mysql/mod_auth_mysql-1.11.ebuild,v 1.1 2002/11/28 20:32:10 woodchip Exp $ + +DESCRIPTION="Basic authentication for Apache2 using a MySQL database" +HOMEPAGE="ftp://ftp.kciLink.com/pub/" + +S=${WORKDIR}/${P} +SRC_URI="mirror://gentoo/mod_auth_mysql-1.11-gentoo.tar.bz2" +DEPEND="=dev-db/mysql-3*" +RDEPEND="${DEPEND} =net-www/apache-2*" +LICENSE="Apache-1.1" +KEYWORDS="~x86" +IUSE="" +SLOT="0" + +src_compile() { + apxs2 -c ${PN}.c -I/usr/include/mysql -Wl,-lmysqlclient || die +} + +src_install() { + exeinto /usr/lib/apache2-extramodules + doexe .libs/${PN}.so + insinto /etc/apache2/conf/modules.d + doins ${FILESDIR}/12_mod_auth_mysql.conf + cat mod_auth_mysql.c | tail +84 | head -101 \ + | cut -c 4- > mod_auth_mysql.txt + dodoc ${FILESDIR}/12_mod_auth_mysql.conf \ + mysql-group-auth.txt mod_auth_mysql.txt +} |