summaryrefslogtreecommitdiff
path: root/www/ap-auth-mysql
diff options
context:
space:
mode:
authorjdolecek <jdolecek>2004-07-16 11:28:19 +0000
committerjdolecek <jdolecek>2004-07-16 11:28:19 +0000
commit7984fc12b55e7557dc258110be5e41d18f9eb4ae (patch)
tree8187ddb03cc29d4942068fe97dcfe4ba9ee36847 /www/ap-auth-mysql
parentaed0a8015005d98110a01244f9602b908ac2e306 (diff)
downloadpkgsrc-7984fc12b55e7557dc258110be5e41d18f9eb4ae.tar.gz
Import ap-auth-mysql 4.3.1, Apache module for user authentication
using information stored in a MySQL database. Based on pkgwip package done by cube@, thanks a lot! Package should support both Apache 1.x and 2.x, but only Apache 1.x tested at the moment.
Diffstat (limited to 'www/ap-auth-mysql')
-rw-r--r--www/ap-auth-mysql/DESCR2
-rw-r--r--www/ap-auth-mysql/MESSAGE9
-rw-r--r--www/ap-auth-mysql/Makefile33
-rw-r--r--www/ap-auth-mysql/PLIST5
-rw-r--r--www/ap-auth-mysql/distinfo8
-rw-r--r--www/ap-auth-mysql/patches/patch-aa10
-rw-r--r--www/ap-auth-mysql/patches/patch-ab30
-rw-r--r--www/ap-auth-mysql/patches/patch-ac261
-rw-r--r--www/ap-auth-mysql/patches/patch-ad32
9 files changed, 390 insertions, 0 deletions
diff --git a/www/ap-auth-mysql/DESCR b/www/ap-auth-mysql/DESCR
new file mode 100644
index 00000000000..397ce787268
--- /dev/null
+++ b/www/ap-auth-mysql/DESCR
@@ -0,0 +1,2 @@
+A module for the Apache web server which enables HTTP authentication
+against information stored in a MySQL database.
diff --git a/www/ap-auth-mysql/MESSAGE b/www/ap-auth-mysql/MESSAGE
new file mode 100644
index 00000000000..9489f030f9c
--- /dev/null
+++ b/www/ap-auth-mysql/MESSAGE
@@ -0,0 +1,9 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1.1.1 2004/07/16 11:28:19 jdolecek Exp $
+
+In order to use this module in your Apache installation, you need to
+add the following to your httpd.conf file:
+
+ LoadModule auth_mysql_module ${PREFIX}/lib/httpd/mod_auth_mysql.so
+
+===========================================================================
diff --git a/www/ap-auth-mysql/Makefile b/www/ap-auth-mysql/Makefile
new file mode 100644
index 00000000000..4e0f8890cef
--- /dev/null
+++ b/www/ap-auth-mysql/Makefile
@@ -0,0 +1,33 @@
+# $NetBSD: Makefile,v 1.1.1.1 2004/07/16 11:28:19 jdolecek Exp $
+#
+
+DISTNAME= libapache-mod-auth-mysql_4.3.1
+PKGNAME= ${DISTNAME:S/libapache-mod/ap/:S/_/-/}
+WRKSRC= ${WRKDIR}/${DISTNAME:S/_/-/}
+CATEGORIES= www databases security
+MASTER_SITES= ${MASTER_SITE_DEBIAN:=pool/main/liba/libapache-mod-auth-mysql/}
+
+MAINTAINER= tech-pkg@NetBSD.org
+HOMEPAGE= http://packages.debian.org/unstable/web/libapache-mod-auth-mysql.html
+COMMENT= Apache module to allow authentication against a MySQL database
+
+USE_BUILDLINK3= yes
+GNU_CONFIGURE= yes
+
+CONFIGURE_ARGS+= --with-mysql-includes=${BUILDLINK_PREFIX.mysql-client}/include/mysql \
+ --with-mysql-libs=${BUILDLINK_PREFIX.mysql-client}/lib/mysql
+CPPFLAGS+= -I${BUILDLINK_PREFIX.mysql-client}/include/mysql
+LDFLAGS+= -lmysqlclient -L${BUILDLINK_PREFIX.mysql-client}/lib/mysql \
+ -Wl,${RPATH_FLAG} -Wl,${BUILDLINK_PREFIX.mysql-client}/lib/mysql
+
+APACHE_MODULE_NAME= mod_auth_mysql.so
+
+post-install:
+ ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/mod_auth_mysql
+ ${INSTALL_DATA} ${WRKSRC}/DIRECTIVES ${PREFIX}/share/doc/mod_auth_mysql
+ ${INSTALL_DATA} ${WRKSRC}/USAGE ${PREFIX}/share/doc/mod_auth_mysql
+
+.include "../../databases/mysql-client/buildlink3.mk"
+.include "../../www/apache/module.mk"
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/www/ap-auth-mysql/PLIST b/www/ap-auth-mysql/PLIST
new file mode 100644
index 00000000000..1f76c0df91a
--- /dev/null
+++ b/www/ap-auth-mysql/PLIST
@@ -0,0 +1,5 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2004/07/16 11:28:19 jdolecek Exp $
+lib/httpd/mod_auth_mysql.so
+share/doc/mod_auth_mysql/DIRECTIVES
+share/doc/mod_auth_mysql/USAGE
+@dirrm share/doc/mod_auth_mysql
diff --git a/www/ap-auth-mysql/distinfo b/www/ap-auth-mysql/distinfo
new file mode 100644
index 00000000000..edf412c3e93
--- /dev/null
+++ b/www/ap-auth-mysql/distinfo
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1.1.1 2004/07/16 11:28:19 jdolecek Exp $
+
+SHA1 (libapache-mod-auth-mysql_4.3.1.tar.gz) = c5563028ed6574fd087944ac0507009dfc14b749
+Size (libapache-mod-auth-mysql_4.3.1.tar.gz) = 56247 bytes
+SHA1 (patch-aa) = c18f857317b5838c955ddfea501961e0e2a88e76
+SHA1 (patch-ab) = 0afe885fc1d1b5461b0423eef347fd72511be907
+SHA1 (patch-ac) = fb32367d7b77a3df6728f2ad93a7c46e76a0e454
+SHA1 (patch-ad) = ea796e555cc2e52af424e2e70484692656095858
diff --git a/www/ap-auth-mysql/patches/patch-aa b/www/ap-auth-mysql/patches/patch-aa
new file mode 100644
index 00000000000..9cf7e2599b0
--- /dev/null
+++ b/www/ap-auth-mysql/patches/patch-aa
@@ -0,0 +1,10 @@
+$NetBSD: patch-aa,v 1.1.1.1 2004/07/16 11:28:19 jdolecek Exp $
+
+--- config.h.in.orig 2004-05-11 04:32:13.000000000 +0200
++++ config.h.in 2004-07-16 12:36:49.000000000 +0200
+@@ -47,3 +47,5 @@
+
+ /* Define to empty if `const' does not conform to ANSI C. */
+ #undef const
++
++#undef HAVE_LIBCRYPT
diff --git a/www/ap-auth-mysql/patches/patch-ab b/www/ap-auth-mysql/patches/patch-ab
new file mode 100644
index 00000000000..553d05364b0
--- /dev/null
+++ b/www/ap-auth-mysql/patches/patch-ab
@@ -0,0 +1,30 @@
+$NetBSD: patch-ab,v 1.1.1.1 2004/07/16 11:28:19 jdolecek Exp $
+
+--- configure.ac.orig 2003-09-24 01:39:03.000000000 +0200
++++ configure.ac
+@@ -84,11 +84,14 @@ AC_SUBST(build_opts, "$mysql_includes $m
+
+ # Checks for header files.
+ AC_CHECK_HEADERS([crypt.h])
++AC_CHECK_LIB([crypt], [crypt])
+
+-if test -n $HAVE_CRYPT_H; then
++if test -n $HAVE_CRYPT_H -a $HAVE_LIBCRYPT; then
+ AC_TRY_RUN(
+ [
++#ifdef HAVE_CRYPT_H
+ #include <crypt.h>
++#endif
+ #include <string.h>
+
+ int main()
+@@ -101,7 +104,9 @@ AC_DEFINE(CRYPT_MD5),
+ ,,)
+ AC_TRY_RUN(
+ [
++#ifdef HAVE_CRYPT_H
+ #include <crypt.h>
++#endif
+ #include <string.h>
+
+ int main()
diff --git a/www/ap-auth-mysql/patches/patch-ac b/www/ap-auth-mysql/patches/patch-ac
new file mode 100644
index 00000000000..7441ddfb3b0
--- /dev/null
+++ b/www/ap-auth-mysql/patches/patch-ac
@@ -0,0 +1,261 @@
+$NetBSD: patch-ac,v 1.1.1.1 2004/07/16 11:28:19 jdolecek Exp $
+
+--- configure.orig 2004-05-11 07:19:18.000000000 +0200
++++ configure 2004-07-16 12:40:48.000000000 +0200
+@@ -953,7 +953,7 @@
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi
+- cd "$ac_popdir"
++ cd $ac_popdir
+ done
+ fi
+
+@@ -1886,7 +1886,8 @@
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag"
++ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -1944,7 +1945,8 @@
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag"
++ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -2060,7 +2062,8 @@
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag"
++ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -2114,7 +2117,8 @@
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag"
++ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -2159,7 +2163,8 @@
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag"
++ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -2203,7 +2208,8 @@
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag"
++ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -2282,7 +2288,8 @@
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag"
++ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -2765,7 +2772,8 @@
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag"
++ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -2935,7 +2943,8 @@
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag"
++ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -3002,7 +3011,8 @@
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag"
++ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -3118,7 +3128,81 @@
+ done
+
+
+-if test -n $HAVE_CRYPT_H; then
++echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
++echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
++if test "${ac_cv_lib_crypt_crypt+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lcrypt $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any gcc2 internal prototype to avoid an error. */
++#ifdef __cplusplus
++extern "C"
++#endif
++/* We use char because int might match the return type of a gcc2
++ builtin and then its argument prototype would still apply. */
++char crypt ();
++int
++main ()
++{
++crypt ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag"
++ || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_crypt_crypt=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_lib_crypt_crypt=no
++fi
++rm -f conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
++echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
++if test $ac_cv_lib_crypt_crypt = yes; then
++ cat >>confdefs.h <<_ACEOF
++#define HAVE_LIBCRYPT 1
++_ACEOF
++
++ LIBS="-lcrypt $LIBS"
++
++fi
++
++
++if test -n $HAVE_CRYPT_H -a $HAVE_LIBCRYPT; then
+ if test "$cross_compiling" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+ See \`config.log' for more details." >&5
+@@ -3133,7 +3217,9 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
++#ifdef HAVE_CRYPT_H
+ #include <crypt.h>
++#endif
+ #include <string.h>
+
+ int main()
+@@ -3181,7 +3267,9 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
++#ifdef HAVE_CRYPT_H
+ #include <crypt.h>
++#endif
+ #include <string.h>
+
+ int main()
+@@ -3294,7 +3382,8 @@
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag"
++ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -3366,7 +3455,8 @@
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag"
++ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -4187,6 +4277,11 @@
+
+
+
++ if test x"$ac_file" != x-; then
++ { echo "$as_me:$LINENO: creating $ac_file" >&5
++echo "$as_me: creating $ac_file" >&6;}
++ rm -f "$ac_file"
++ fi
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+@@ -4225,12 +4320,6 @@
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+-
+- if test x"$ac_file" != x-; then
+- { echo "$as_me:$LINENO: creating $ac_file" >&5
+-echo "$as_me: creating $ac_file" >&6;}
+- rm -f "$ac_file"
+- fi
+ _ACEOF
+ cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
diff --git a/www/ap-auth-mysql/patches/patch-ad b/www/ap-auth-mysql/patches/patch-ad
new file mode 100644
index 00000000000..d7e4e8f8491
--- /dev/null
+++ b/www/ap-auth-mysql/patches/patch-ad
@@ -0,0 +1,32 @@
+$NetBSD: patch-ad,v 1.1.1.1 2004/07/16 11:28:19 jdolecek Exp $
+
+--- mod_auth_mysql.c.orig 2003-11-18 13:59:00.000000000 +0100
++++ mod_auth_mysql.c
+@@ -62,7 +62,7 @@ static int auth_db_override = 1;
+ #define CRYPT_MD5_ENCRYPTION_FLAG 1<<3
+ #endif
+ #define PHP_MD5_ENCRYPTION_FLAG 1<<4
+-#ifdef HAVE_CRYPT_H
++#if defined(HAVE_CRYPT_H) || defined(HAVE_LIBCRYPT)
+ #define CRYPT_ENCRYPTION_FLAG 1<<5
+ #endif
+
+@@ -94,7 +94,7 @@ static int check_crypt_MD5_encryption(co
+ }
+ #endif
+
+-#ifdef HAVE_CRYPT_H
++#if defined(HAVE_CRYPT_H) || defined(HAVE_LIBCRYPT)
+ static int check_crypt_encryption(const char *passwd, char *enc_passwd)
+ {
+ return (!strcmp(crypt(passwd, enc_passwd), enc_passwd));
+@@ -165,7 +165,9 @@ encryption_type_entry supported_encrypti
+ #if CRYPT_MD5
+ { "Crypt_MD5", check_crypt_MD5_encryption, CRYPT_MD5_ENCRYPTION_FLAG },
+ #endif
++#if defined(HAVE_CRYPT_H) || defined(HAVE_LIBCRYPT)
+ { "Crypt", check_crypt_encryption, CRYPT_ENCRYPTION_FLAG },
++#endif
+ { "PHP_MD5", check_PHP_MD5_encryption, PHP_MD5_ENCRYPTION_FLAG },
+ /* add additional encryption types below */
+ { NULL, NULL, 0 }