mod-auth-commit Mailing List for mod_auth
Brought to you by:
firechipmunk,
honx
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(36) |
Dec
(8) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(7) |
Feb
(51) |
Mar
(22) |
Apr
|
May
(6) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Paul Q. <fir...@us...> - 2004-06-19 20:37:37
|
Update of /cvsroot/mod-auth/mod_authn_pop3/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12558 Modified Files: mod_authn_pop3.c Log Message: clarify who wrote it. ---------------------------------------------------------------------- Index: mod_authn_pop3.c =================================================================== RCS file: /cvsroot/mod-auth/mod_authn_pop3/src/mod_authn_pop3.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- mod_authn_pop3.c 2 Mar 2004 08:41:51 -0000 1.5 +++ mod_authn_pop3.c 19 Jun 2004 20:37:28 -0000 1.6 @@ -1,5 +1,6 @@ /* ==================================================================== - * Copyright 2003-2004 Paul Querna and Axel Grossklaus + * Copyright 2003-2004 Paul Querna + * Copyright 2003-2004 Ian Holsman (original author) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +19,8 @@ /** * Apache 2.1 POP3 Authentication Module * - * Special Thanks to Ian Holsman for giving the basis of this module. + * Ian Holsman wrote the original 2.0 AAA module, Paul Querna + * upgraded it to the 2.1 AAA Module. * */ |
From: Paul Q. <fir...@us...> - 2004-05-10 06:51:35
|
Update of /cvsroot/mod-auth/mod_vhost_dbi/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7595 Modified Files: mod_vhost_dbi.c Log Message: begin porting to mod_dbi_pool support Index: mod_vhost_dbi.c =================================================================== RCS file: /cvsroot/mod-auth/mod_vhost_dbi/src/mod_vhost_dbi.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- mod_vhost_dbi.c 4 Mar 2004 08:12:13 -0000 1.1 +++ mod_vhost_dbi.c 10 May 2004 06:51:27 -0000 1.2 @@ -29,10 +29,15 @@ #include "http_protocol.h" #include "http_request.h" +// DBI Pooling Module +#include "mod_dbi_pool.h" + +// libdbi Headers #include <dbi/dbi.h> // include php support. #define HAVE_PHP_SUPPORT +// TODO: use configure.in for this #ifdef HAVE_PHP_SUPPORT #include <stdlib.h> @@ -45,7 +50,9 @@ #endif typedef struct { - + int disabled; + conn_id *id; + char *query; } vhost_dbi_config_rec; static void *vhost_dbi_create_server_config(apr_pool_t * p, server_rec * s) @@ -53,54 +60,183 @@ vhost_dbi_config_rec *vdbir = (vhost_dbi_config_rec *) apr_pcalloc(p, sizeof(vhost_dbi_config_rec)); + vdbir->disabled = 0; + vdbir->id = NULL; + return vdbir; } -static void *vhost_dbi_merge_server_config(apr_pool_t * p, void *parentv, - void *childv) +#define HOSTNAME_MAGIC_CHAR '.' + +/** + * "foo.home.com" -> "'foo.home.com','*.home.com','*.com','*'" + * + */ +const char *expand_hostname(request_rec * r, dbi_conn * dbi, + const char *hostname) { - vhost_dbi_config_rec *parent = (vhost_dbi_config_rec *) parentv; - vhost_dbi_config_rec *child = (vhost_dbi_config_rec *) childv; - vhost_dbi_config_rec *conf = - (vhost_dbi_config_rec *) apr_pcalloc(p, sizeof(vhost_dbi_config_rec)); + char tmp[MAX_STRING_LEN]; + const char *s, *e; + char *p; - if (child->fl == 1) { - conf->fl = child->fl; + tmp[0] = '\0'; + int written = 0; - conf->dbi_database = - (child->dbi_database ? child->dbi_database : parent->dbi_database); - conf->dbi_info_table = - (child->dbi_info_table ? child->dbi_info_table : parent-> - dbi_info_table); - conf->dbi_alias_table = - (child->dbi_alias_table ? child->dbi_alias_table : parent-> - dbi_alias_table); - conf->dbi_host_field = - (child->dbi_host_field ? child->dbi_host_field : parent-> - dbi_host_field); - conf->dbi_path_field = - (child->dbi_path_field ? child->dbi_path_field : parent-> - dbi_path_field); - conf->dbi_host = - (child->dbi_host ? child->dbi_host : parent->dbi_host); - conf->dbi_port = - (child->dbi_port ? child->dbi_port : parent->dbi_port); - conf->dbi_username = - (child->dbi_username ? child->dbi_username : parent->dbi_username); - conf->dbi_password = - (child->dbi_password ? child->dbi_password : parent->dbi_password); + if (!(s = ap_strchr_c(hostname, HOSTNAME_MAGIC_CHAR))) { + p = strdup(hostname); + dbi_driver_quote_string(dbi_conn_get_driver(dbi), &p); + strcat(tmp, p); + free(p); + return apr_pstrdup(r->pool, tmp); + } - conf->default_host = - (child->default_host ? child->default_host : parent->default_host); - conf->dbi_driver = - (child->dbi_driver ? child->dbi_driver : parent->dbi_driver); + ap_log_perror(APLOG_MARK, APLOG_DEBUG, 0, r->pool, + "[mod_vhost_dbi] Hostname to expand: %s", hostname); - } + do { + written += (s - hostname); + // MAX_STRING_LEN-1 so we still have room for a null at the end + if (written >= MAX_STRING_LEN - 1) { + ap_log_perror(APLOG_MARK, APLOG_ERR, 0, r->pool, + "[mod_vhost_dbi] Populated Hostname String would exceed %d bytes", + MAX_STRING_LEN); + return NULL; + } + strncat(tmp, hostname, s - hostname); + + } while ((s = ap_strchr_c(hostname, HOSTNAME_MAGIC_CHAR))); + + strcat(tmp, querystring); + written += strlen(querystring); + ap_log_perror(APLOG_MARK, APLOG_DEBUG, 0, r->pool, + "[mod_authn_dbi.c] Populated result: \"%s\" / %d chars written", + apr_pstrdup(r->pool, tmp), written); + + return apr_pstrdup(r->pool, tmp); +} + +#define QUERYSTRING_MAGIC_CHAR '&' +#define QUERYSTRING_LEFT_DELIM_CHAR '{' +#define QUERYSTRING_RIGHT_DELIM_CHAR '}' + +#define EMPTY_VAR "" /* do NOT set this to NULL! */ + +const char *populate_querystring(request_rec * r, dbi_conn * dbi, + const char *querystring) +{ + char tmp[MAX_STRING_LEN]; /* 8 KByte should be enough for everyone :) */ + const char *s, *e; + char *p; + + tmp[0] = '\0'; + int written = 0; + + if (!(s = ap_strchr_c(querystring, QUERYSTRING_MAGIC_CHAR))) + return querystring; + + ap_log_perror(APLOG_MARK, APLOG_DEBUG, 0, r->pool, + "[mod_vhost_dbi] Querystring to populate: %s", querystring); + do { + written += (s - querystring); + // MAX_STRING_LEN-1 so we still have room for a null at the end + if (written >= MAX_STRING_LEN - 1) { + ap_log_perror(APLOG_MARK, APLOG_ERR, 0, r->pool, + "[mod_vhost_dbi] Populated string would exceed %d bytes", + MAX_STRING_LEN); + return NULL; + } + strncat(tmp, querystring, s - querystring); + + if ((s[1] == QUERYSTRING_LEFT_DELIM_CHAR) + && (e = ap_strchr_c(s, QUERYSTRING_RIGHT_DELIM_CHAR))) { + const char *e2 = e; + char *var; + + p = NULL; + querystring = e + 1; + e = NULL; + var = apr_pstrndup(r->pool, s + 2, e2 - (s + 2)); + + if (!strcasecmp(var, "RequestHostname")) { + e = (r->hostname ? r->hostname : EMPTY_VAR); + } + else if (!strcasecmp(var, "RemoteIP")) { + e = (r->connection->remote_ip ? r->connection-> + remote_ip : EMPTY_VAR); + } + + /* + * Everything but the variable values representing fieldnames and tables gets + * * escaped according to the selected driver + */ + + if (e != NULL) { + p = strdup(e); + dbi_driver_quote_string(dbi_conn_get_driver(dbi_res->conn), + &p); + } + + if (!strcasecmp(var, "ExpandHostname")) { + e = (r->hostname ? expand_hostname(r, dbi, + r->hostname) : EMPTY_VAR); + } + + if (e == NULL) { + ap_log_perror(APLOG_MARK, APLOG_WARNING, 0, r->pool, + "[mod_vhost_dbi] Unknown variable: %s", var); + return NULL; + } + + if (p == NULL) { + p = strdup(e); + } + written += strlen(p); + if (written >= MAX_STRING_LEN - 1) { + ap_log_perror(APLOG_MARK, APLOG_ERR, 0, r->pool, + "[mod_vhost_dbi] Populated string would exceed %d bytes", + MAX_STRING_LEN); + free(p); + return NULL; + } + strcat(tmp, p); + free(p); + + } + else { + ap_log_perror(APLOG_MARK, APLOG_WARNING, 0, r->pool, + "[mod_vhost_dbi] Invalid querystring"); + return NULL; + + }; + + } while ((s = ap_strchr_c(querystring, QUERYSTRING_MAGIC_CHAR))); + + strcat(tmp, querystring); + written += strlen(querystring); + ap_log_perror(APLOG_MARK, APLOG_DEBUG, 0, r->pool, + "[mod_authn_dbi.c] Populated result: \"%s\" / %d chars written", + apr_pstrdup(r->pool, tmp), written); + + return apr_pstrdup(r->pool, tmp); +} + +static const char *set_switch(cmd_parms * cmd, void *config, const char *value) +{ + apr_ssize_t pos = (apr_ssize_t) cmd->info; - return conf; } static const command_rec vhost_dbi_commands[] = { + AP_INIT_TAKE1("VhostDbiConnName", + set_switch, + (void *)0, + RSRC_CONF, + "name of the dbi_pool connection to use"), + AP_INIT_TAKE1("VhostDbiQuery", + set_switch, + (void *)0, + RSRC_CONF, + "name of the dbi_pool connection to use"), AP_INIT_FLAG("VhostDbiEnabled", set_switch, (void *)1, @@ -111,7 +247,7 @@ -static char *get_path(request_rec * r, const char *host, char **env, +static char *find_path(request_rec * r, const char *host, char **env, vhost_dbi_config_rec * vdbir) { dbi_result *res; @@ -122,14 +258,11 @@ int dbi_err; const char *dbi_err_str; - - if (dbi == NULL) { - // XXXXX: use mod_dbi_pool - } + dbi = dbipool_open(vdbir->conn_name); if (dbi == NULL) { ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, 0, r->server, - "vhost_dbi: get_path: DBI connection was not acquired!"); + "vhost_dbi: find_path: DBI connection was not acquired!"); return NULL; } @@ -137,14 +270,17 @@ strcpy(rstr, host); dbi_driver_quote_string(dbi_conn_get_driver(dbi), &rstr); - // XXXXX: Custom SQL Query Here + + // TODO: Custom SQL Query Here qstr = apr_psprintf(r->pool, "SELECT vdbi_info.root_path, vdbi_info.php_path " "FROM vdbi_info, vdbi_alias " "WHERE vdbi_info.idx = vdbi_alias.owner_idx AND " "vdbi_alias.hostname=%s LIMIT 0,1", rstr); + res = dbi_conn_query(dbi, qstr); + if (res == NULL) { dbi_err = dbi_conn_error(dbi, &dbi_err_str); ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, 0, r->server, @@ -152,8 +288,7 @@ dbi_err_str, qstr); free(rstr); dbi_result_free(res); - dbi_conn_close(dbi); - dbi_shutdown(); + dbipool_close(vdbir->conn_name, dbi); return NULL; } @@ -165,8 +300,7 @@ "vhost_dbi: get_path: no results for %s", host); free(rstr); dbi_result_free(res); - dbi_conn_close(dbi); - dbi_shutdown(); + dbipool_close(vdbir->conn_name, dbi); return NULL; default: ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, 0, r->server, @@ -174,8 +308,7 @@ host); free(rstr); dbi_result_free(res); - dbi_conn_close(dbi); - dbi_shutdown(); + dbipool_close(vdbir->conn_name, dbi); return NULL; } @@ -186,8 +319,7 @@ dbi_err, dbi_err_str, qstr); free(rstr); dbi_result_free(res); - dbi_conn_close(dbi); - dbi_shutdown(); + dbipool_close(vdbir->conn_name, dbi); return NULL; } @@ -197,8 +329,8 @@ free(rstr); dbi_result_free(res); - dbi_conn_close(dbi); - dbi_shutdown(); + dbipool_close(vdbir->conn_name, dbi); + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "get_path: %s from SQL: %s", path, qstr); @@ -208,6 +340,7 @@ static int vhost_dbi_init_handler(apr_pool_t * pconf, apr_pool_t * plog, apr_pool_t * ptemp, server_rec * s) { + ap_add_version_component(pconf, "mod_vhost_dbi/0.1.0"); return OK; @@ -224,7 +357,7 @@ char *ptr; int i; - if (!(vdbir->fl == 1)) { + if (!(vdbir->disabled == 1)) { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "vhost_dbi_translate_name: declined http://%s%s module is not configured for this server", apr_table_get(r->headers_in, "Host"), r->uri); @@ -246,7 +379,9 @@ if (ptr = strchr(host, ':')) { *ptr = '\0'; } - path = get_path(r, host, &env, vdbir); + + // TODO: Cache this Result + path = find_path(r, host, &env, vdbir); if (!path) { ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, r->server, |
From: Paul Q. <fir...@us...> - 2004-05-10 06:50:36
|
Update of /cvsroot/mod-auth/mod_dbi_pool/m4 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7450/m4 Added Files: apache.m4 libdbi.m4 outoforder.m4 Log Message: adding m4 files for the build system --- NEW FILE: libdbi.m4 --- dnl Check for Apache, APR and APU dnl CHECK_PATH_LIBDBI() AC_DEFUN(CHECK_LIBDBI, [dnl AC_MSG_CHECKING(for --with-dbi) AC_ARG_WITH( dbi, [AC_HELP_STRING([--with-dbi=PATH],[Path to dbi])], [ if test -e "$withval/include/dbi/dbi.h" then DBI_INCLUDES=$withval/include DBI_LIB=$withval/lib AC_MSG_RESULT([found dbi.h]) else echo AC_MSG_ERROR([$withval/include/dbi/dbi.h not found ]) fi ], AC_MSG_RESULT(no)) AC_MSG_CHECKING(for --with-dbi-include) AC_ARG_WITH( dbi-include, [AC_HELP_STRING([--with-dbi-include=PATH],[Path to dbi headers])], [ if test -e "$withval/dbi/dbi.h" then DBI_INCLUDES=$withval AC_MSG_RESULT([found dbi.h]) else echo AC_MSG_ERROR([$withval/dbi/dbi.h not found ]) fi ], AC_MSG_RESULT(no)) AC_MSG_CHECKING(for --with-dbi-libs) AC_ARG_WITH( dbi-libs, [[AC_HELP_STRING([--with-dbi-libs=PATH],[Path to dbi libs])], [ if test -e "$withval/libdbi.so" then DBI_LIB=$withval AC_MSG_RESULT([found libdbi.so]) else echo AC_MSG_ERROR([$withval/libdbi.so not found ]) fi ], AC_MSG_RESULT(no)) if test -z "$DBI_LIB"; then test_paths="/usr/lib /usr/local/lib" for x in $test_paths ; do AC_MSG_CHECKING(for libdbi.so in $x) if test -e "${x}/libdbi.so"; then DBI_LIB=$x AC_MSG_RESULT([found it!, we'll use this. Use --with-dbi-libs to specify another.]) break else AC_MSG_RESULT(no) fi done fi if test -z "$DBI_INCLUDES"; then test_paths="/usr/include /usr/local/include" for x in $test_paths ; do AC_MSG_CHECKING(for libdbi.so in $x) if test -e "${x}/libdbi.so"; then DBI_LIB=$x AC_MSG_RESULT([found it!, we'll use this. Use --with-dbi-libs to specify another.]) break else AC_MSG_RESULT(no) fi done fi # if no apxs found yet, check /usr/local/apache/sbin # since it's the default Apache location if test -z "$APXS_BIN"; then test_paths="/usr/local/apache/sbin /usr/local/apache/bin /usr/local/apache2/bin" test_paths="${test_paths} /usr/local/bin /usr/local/sbin /usr/bin /usr/sbin" for x in $test_paths ; do AC_MSG_CHECKING(for apxs in $x) if test -x "${x}/apxs"; then APXS_BIN="${x}/apxs" AC_MSG_RESULT([found it! Use --with-apxs to specify another.]) break else AC_MSG_RESULT(no) fi done fi # last resort if test -z "$APXS_BIN"; then AC_MSG_CHECKING(for apxs in your PATH) AC_PATH_PROG(APXS_BIN, apxs) if test -n "$APXS_BIN"; then AC_MSG_RESULT([found ${APXS_BIN}. Use --with-apxs to specify another.]) fi fi if test -z "$APXS_BIN"; then AC_MSG_ERROR([**** apxs was not found, DSO compilation will not be available.]) else AC_MSG_CHECKING(for Apache module directory) AP_LIBEXECDIR=`${APXS_BIN} -q LIBEXECDIR` AC_MSG_RESULT($AP_LIBEXECDIR) AC_MSG_CHECKING([for Apache include directory]) AP_INCLUDES="-I`${APXS_BIN} -q INCLUDEDIR`" AC_MSG_RESULT($AP_INCLUDES) AC_MSG_CHECKING([for apr-config --includes]) APR_BINDIR=`$APXS_BIN -q APR_BINDIR` APR_INCLUDES="`$APR_BINDIR/apr-config --includes`" AC_MSG_RESULT($APR_INCLUDES) AC_MSG_CHECKING([for apu-config --includes]) APU_BINDIR=`$APXS_BIN -q APU_BINDIR` APU_INCLUDES="`$APU_BINDIR/apu-config --includes`" AC_MSG_RESULT($APU_INCLUDES) AC_MSG_CHECKING([for CFLAGS from APXS]) for flag in CFLAGS EXTRA_CFLAGS EXTRA_CPPFLAGS NOTEST_CFLAGS; do APXS_CFLAGS="$APXS_CFLAGS `$APXS_BIN -q $flag`" done AC_MSG_RESULT($APXS_CFLAGS) AC_SUBST(AP_LIBEXECDIR) AC_SUBST(AP_INCLUDES) AC_SUBST(APR_INCLUDES) AC_SUBST(APU_INCLUDES) AC_SUBST(APXS_CFLAGS) AC_SUBST(APXS_BIN) fi ]) --- NEW FILE: outoforder.m4 --- dnl m4 for utility macros used by all out of order projects dnl this writes a "config.nice" file which reinvokes ./configure with all dnl of the arguments. this is different from config.status which simply dnl regenerates the output files. config.nice is useful after you rebuild dnl ./configure (via autoconf or autogen.sh) AC_DEFUN(OOO_CONFIG_NICE,[ echo configure: creating $1 rm -f $1 cat >$1<<EOF #! /bin/sh # # Created by configure EOF for arg in [$]0 "[$]@"; do echo "\"[$]arg\" \\" >> $1 done echo '"[$]@"' >> $1 chmod +x $1 ]) --- NEW FILE: apache.m4 --- dnl Check for Apache, APR and APU dnl CHECK_PATH_APACHE() AC_DEFUN(CHECK_APACHE, [dnl AC_MSG_CHECKING(for --with-apxs) AC_ARG_WITH( apxs, [AC_HELP_STRING([--with-apxs=PATH],[Path to apxs])], [ if test -x "$withval" then AC_MSG_RESULT([$withval executable, good]) APXS_BIN=$withval else echo AC_MSG_ERROR([$withval not found or not executable]) fi ], AC_MSG_RESULT(no)) # if no apxs found yet, check /usr/local/apache/sbin # since it's the default Apache location if test -z "$APXS_BIN"; then test_paths="/usr/local/apache/sbin /usr/local/apache/bin /usr/local/apache2/bin" test_paths="${test_paths} /usr/local/bin /usr/local/sbin /usr/bin /usr/sbin" for x in $test_paths ; do AC_MSG_CHECKING(for apxs in $x) if test -x "${x}/apxs"; then APXS_BIN="${x}/apxs" AC_MSG_RESULT([found it! Use --with-apxs to specify another.]) break else AC_MSG_RESULT(no) fi done fi # last resort if test -z "$APXS_BIN"; then AC_MSG_CHECKING(for apxs in your PATH) AC_PATH_PROG(APXS_BIN, apxs) if test -n "$APXS_BIN"; then AC_MSG_RESULT([found ${APXS_BIN}. Use --with-apxs to specify another.]) fi fi if test -z "$APXS_BIN"; then AC_MSG_ERROR([**** apxs was not found, DSO compilation will not be available.]) else AC_MSG_CHECKING(for Apache module directory) AP_LIBEXECDIR=`${APXS_BIN} -q LIBEXECDIR` AC_MSG_RESULT($AP_LIBEXECDIR) AC_MSG_CHECKING([for Apache include directory]) AP_INCLUDES="-I`${APXS_BIN} -q INCLUDEDIR`" AC_MSG_RESULT($AP_INCLUDES) AC_MSG_CHECKING([for apr-config --includes]) APR_BINDIR=`$APXS_BIN -q APR_BINDIR` APR_INCLUDES="`$APR_BINDIR/apr-config --includes`" AC_MSG_RESULT($APR_INCLUDES) AC_MSG_CHECKING([for apu-config --includes]) APU_BINDIR=`$APXS_BIN -q APU_BINDIR` APU_INCLUDES="`$APU_BINDIR/apu-config --includes`" AC_MSG_RESULT($APU_INCLUDES) AC_MSG_CHECKING([for CFLAGS from APXS]) for flag in CFLAGS EXTRA_CFLAGS EXTRA_CPPFLAGS NOTEST_CFLAGS; do APXS_CFLAGS="$APXS_CFLAGS `$APXS_BIN -q $flag`" done AC_MSG_RESULT($APXS_CFLAGS) AC_SUBST(AP_LIBEXECDIR) AC_SUBST(AP_INCLUDES) AC_SUBST(APR_INCLUDES) AC_SUBST(APU_INCLUDES) AC_SUBST(APXS_CFLAGS) AC_SUBST(APXS_BIN) fi ]) |
From: Paul Q. <fir...@us...> - 2004-05-10 06:50:05
|
Update of /cvsroot/mod-auth/mod_dbi_pool/m4 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7330/m4 Log Message: Directory /cvsroot/mod-auth/mod_dbi_pool/m4 added to the repository |
From: Paul Q. <fir...@us...> - 2004-05-10 06:49:48
|
Update of /cvsroot/mod-auth/mod_dbi_pool/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7262/src Modified Files: Makefile.am mod_dbi_pool.c Log Message: remove APR_HAS_THREADS update build scripts Index: Makefile.am =================================================================== RCS file: /cvsroot/mod-auth/mod_dbi_pool/src/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Makefile.am 8 Feb 2004 22:00:18 -0000 1.1 +++ Makefile.am 10 May 2004 06:49:38 -0000 1.2 @@ -1,7 +1,7 @@ CLEANFILES = .libs/libmod_dbi_pool *~ libmod_dbi_pool_la_SOURCES = mod_dbi_pool.c -libmod_dbi_pool_la_CFLAGS = -I$(DBI_INCLUDES) +libmod_dbi_pool_la_CFLAGS = ${MODULE_CFLAGS} libmod_dbi_pool_la_LDFLAGS = -L$(DBI_LIB) -ldbi @@ -11,7 +11,7 @@ @if test ! -L mod_dbi_pool.so ; then ln -s .libs/libmod_dbi_pool.so mod_dbi_pool.so ; fi install: make_so - @${APXS} -i -a -n dbi_pool mod_dbi_pool.so + @${APXS_BIN} -i -a -n dbi_pool mod_dbi_pool.so @echo "" @echo "" @echo "***********************************************" Index: mod_dbi_pool.c =================================================================== RCS file: /cvsroot/mod-auth/mod_dbi_pool/src/mod_dbi_pool.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- mod_dbi_pool.c 3 Mar 2004 07:05:49 -0000 1.7 +++ mod_dbi_pool.c 10 May 2004 06:49:38 -0000 1.8 @@ -29,16 +29,31 @@ #include <dbi/dbi.h> -#include <httpd.h> -#include <http_protocol.h> -#include <http_config.h> -#include <http_log.h> -#include <apr_reslist.h> -#include <apr_strings.h> -#include <apr_hash.h> - +#include "httpd.h" +#include "http_protocol.h" +#include "http_config.h" +#include "http_log.h" +#include "apr.h" +#include "apu.h" +#include "apr_pools.h" +#include "apr_errno.h" +#include "apr_time.h" +#include "apr_strings.h" +#include "apr_hash.h" +#include "apr_reslist.h" #include "mod_dbi_pool.h" +struct dbi_config_struct { + const char name; + dbi_config_rec rec; +#ifdef APR_HAS_THREADS + apr_reslist_t *pool; +#else + dbi_conn *conn; +#endif +}; + + module AP_MODULE_DECLARE_DATA dbi_pool_module; static apr_hash_t *dbi_pool_config; @@ -269,6 +284,7 @@ for (idx = apr_hash_first(p, dbi_pool_config); idx; idx = apr_hash_next(idx)) { apr_hash_this(idx, (void *)&key, &len, (void *)&val); +#ifdef APR_HAS_THREADS if (apr_reslist_create(&val->pool, val->rec.conn_min, /* hard minimum */ val->rec.conn_soft, /* soft maximum */ val->rec.conn_max, /* hard maximum */ @@ -279,6 +295,13 @@ ap_log_perror(APLOG_MARK, APLOG_EMERG, 0, p, "[mod_dbi_pool.c] - Creation of dbi connection pool failed for config set %s", key); +#else + if(dbipool_construct(&val->conn, val->rec, p) != APR_SUCCESS) { + ap_log_perror(APLOG_MARK, APLOG_EMERG, 0, p, + "[mod_dbi_pool.c] - Creation of DBI connection failed for config set %s", + key); + } +#endif /* * XXX: If no new connection could be opened, the reslist will not * contain any resources and reslist_create will fail, giving @@ -334,16 +357,20 @@ { dbi_conn *ret = NULL; dbi_config *conf = apr_hash_get(dbi_pool_config, id, APR_HASH_KEY_STRING); - +#ifdef APR_HAS_THREADS if (apr_reslist_acquire(conf->pool, (void **)&ret) != APR_SUCCESS) { return NULL; } return ret; +#else + return conf->conn; +#endif } void dbipool_close(conn_id * id, dbi_conn * conn) { +#ifdef APR_HAS_THREADS dbi_config *conf = apr_hash_get(dbi_pool_config, id, APR_HASH_KEY_STRING); - apr_reslist_release(conf->pool, (void **)conn); +#endif } |
From: Paul Q. <fir...@us...> - 2004-05-10 06:49:48
|
Update of /cvsroot/mod-auth/mod_dbi_pool/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7262/include Modified Files: mod_dbi_pool.h Log Message: remove APR_HAS_THREADS update build scripts Index: mod_dbi_pool.h =================================================================== RCS file: /cvsroot/mod-auth/mod_dbi_pool/include/mod_dbi_pool.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- mod_dbi_pool.h 3 Mar 2004 07:05:49 -0000 1.4 +++ mod_dbi_pool.h 10 May 2004 06:49:38 -0000 1.5 @@ -88,18 +88,8 @@ int conn_ttl; } dbi_config_rec; -//XXXXX: why aren't we seeing the apr_relist header? -typedef struct apr_reslist_t apr_reslist_t; - typedef const char *conn_id; -typedef struct dbi_config_struct { - const char name; - dbi_config_rec rec; - apr_reslist_t *pool; -} dbi_config; - - dbi_conn *dbipool_open(conn_id * id); void dbipool_close(conn_id * id, dbi_conn * conn); |
From: Paul Q. <fir...@us...> - 2004-05-10 06:49:47
|
Update of /cvsroot/mod-auth/mod_dbi_pool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7262 Modified Files: Makefile.am autogen.sh Log Message: remove APR_HAS_THREADS update build scripts Index: Makefile.am =================================================================== RCS file: /cvsroot/mod-auth/mod_dbi_pool/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Makefile.am 8 Feb 2004 22:00:18 -0000 1.1 +++ Makefile.am 10 May 2004 06:49:37 -0000 1.2 @@ -1,4 +1,4 @@ -EXTRA_DIST = +EXTRA_DIST = m4/apache.m4 m4/outoforder.m4 SUBDIRS = src Index: autogen.sh =================================================================== RCS file: /cvsroot/mod-auth/mod_dbi_pool/autogen.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- autogen.sh 8 Feb 2004 22:00:18 -0000 1.1 +++ autogen.sh 10 May 2004 06:49:37 -0000 1.2 @@ -3,11 +3,8 @@ # $Id$ libtoolize --force --copy #libtoolize14 --force --copy -aclocal +aclocal -I m4 autoheader -touch NEWS -automake --add-missing --copy -rm NEWS +automake --add-missing --copy --foreign autoconf rm -rf autom4te.cache - |
From: <fir...@us...> - 2004-03-13 19:14:30
|
Update of /cvsroot/mod-auth/mod_authn_dbi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16596 Modified Files: configure.in Log Message: remove check for c++ compiler. we are pure C code. Index: configure.in =================================================================== RCS file: /cvsroot/mod-auth/mod_authn_dbi/configure.in,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- configure.in 26 Feb 2004 07:02:35 -0000 1.7 +++ configure.in 13 Mar 2004 19:05:41 -0000 1.8 @@ -5,7 +5,6 @@ AM_CONFIG_HEADER(include/mod_authn_dbi_config.h:config.in) AC_PROG_CC -AC_PROG_CPP AC_PROG_LD AC_PROG_INSTALL AM_PROG_LIBTOOL |
From: <fir...@us...> - 2004-03-04 08:33:20
|
Update of /cvsroot/mod-auth/mod_vhost_dbi/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12444/mod_vhost_dbi/src Added Files: Makefile.am mod_vhost_dbi.c Log Message: adding mod_vhost_dbi code. This project may move somewhere else later. Right now the plan is to make it work with mod_dbi_pool. --- NEW FILE: Makefile.am --- CLEANFILES = .libs/libmod_vhost_dbi *~ libmod_vhost_dbi_la_SOURCES = mod_vhost_dbi.c libmod_vhost_dbi_la_CFLAGS = -I$(DBI_INCLUDES) libmod_vhost_dbi_la_LDFLAGS = -L$(DBI_LIB) -ldbi lib_LTLIBRARIES = libmod_vhost_dbi.la make_so: @if test ! -L mod_vhost_dbi.so ; then ln -s .libs/libmod_vhost_dbi.so mod_vhost_dbi.so ; fi install: make_so @${APXS} -i -a -n vhost_dbi mod_vhost_dbi.so @echo "" @echo "" @echo "***********************************************" @echo "" @echo " Please read the documentation at " @echo " http://mod-auth.sourceforge.net/docs/ for " @echo " details on configuration of this module " @echo "" @echo "***********************************************" @echo "" --- NEW FILE: mod_vhost_dbi.c --- /* ==================================================================== * Copyright 2003-2004 Paul Querna * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "apr.h" #include "apr_strings.h" #include "apr_lib.h" #include "apr_uri.h" #include "ap_config.h" #include "httpd.h" #include "http_config.h" #include "http_core.h" #include "http_log.h" #include "http_main.h" #include "http_protocol.h" #include "http_request.h" #include <dbi/dbi.h> // include php support. #define HAVE_PHP_SUPPORT #ifdef HAVE_PHP_SUPPORT #include <stdlib.h> #include "zend.h" #include "zend_qsort.h" #include "zend_API.h" #include "zend_ini.h" #include "zend_alloc.h" #include "zend_operators.h" #endif typedef struct { } vhost_dbi_config_rec; static void *vhost_dbi_create_server_config(apr_pool_t * p, server_rec * s) { vhost_dbi_config_rec *vdbir = (vhost_dbi_config_rec *) apr_pcalloc(p, sizeof(vhost_dbi_config_rec)); return vdbir; } static void *vhost_dbi_merge_server_config(apr_pool_t * p, void *parentv, void *childv) { vhost_dbi_config_rec *parent = (vhost_dbi_config_rec *) parentv; vhost_dbi_config_rec *child = (vhost_dbi_config_rec *) childv; vhost_dbi_config_rec *conf = (vhost_dbi_config_rec *) apr_pcalloc(p, sizeof(vhost_dbi_config_rec)); if (child->fl == 1) { conf->fl = child->fl; conf->dbi_database = (child->dbi_database ? child->dbi_database : parent->dbi_database); conf->dbi_info_table = (child->dbi_info_table ? child->dbi_info_table : parent-> dbi_info_table); conf->dbi_alias_table = (child->dbi_alias_table ? child->dbi_alias_table : parent-> dbi_alias_table); conf->dbi_host_field = (child->dbi_host_field ? child->dbi_host_field : parent-> dbi_host_field); conf->dbi_path_field = (child->dbi_path_field ? child->dbi_path_field : parent-> dbi_path_field); conf->dbi_host = (child->dbi_host ? child->dbi_host : parent->dbi_host); conf->dbi_port = (child->dbi_port ? child->dbi_port : parent->dbi_port); conf->dbi_username = (child->dbi_username ? child->dbi_username : parent->dbi_username); conf->dbi_password = (child->dbi_password ? child->dbi_password : parent->dbi_password); conf->default_host = (child->default_host ? child->default_host : parent->default_host); conf->dbi_driver = (child->dbi_driver ? child->dbi_driver : parent->dbi_driver); } return conf; } static const command_rec vhost_dbi_commands[] = { AP_INIT_FLAG("VhostDbiEnabled", set_switch, (void *)1, RSRC_CONF, "turn mod_vhost_dbi on or off."), NULL }; static char *get_path(request_rec * r, const char *host, char **env, vhost_dbi_config_rec * vdbir) { dbi_result *res; dbi_conn *dbi = NULL; char *qstr; char *rstr; char *path; int dbi_err; const char *dbi_err_str; if (dbi == NULL) { // XXXXX: use mod_dbi_pool } if (dbi == NULL) { ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, 0, r->server, "vhost_dbi: get_path: DBI connection was not acquired!"); return NULL; } rstr = malloc(strlen(host) + 1); strcpy(rstr, host); dbi_driver_quote_string(dbi_conn_get_driver(dbi), &rstr); // XXXXX: Custom SQL Query Here qstr = apr_psprintf(r->pool, "SELECT vdbi_info.root_path, vdbi_info.php_path " "FROM vdbi_info, vdbi_alias " "WHERE vdbi_info.idx = vdbi_alias.owner_idx AND " "vdbi_alias.hostname=%s LIMIT 0,1", rstr); res = dbi_conn_query(dbi, qstr); if (res == NULL) { dbi_err = dbi_conn_error(dbi, &dbi_err_str); ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, 0, r->server, "vhost_dbi: get_path: SQL Error: (%d) %s on query: %s", dbi_err, dbi_err_str, qstr); free(rstr); dbi_result_free(res); dbi_conn_close(dbi); dbi_shutdown(); return NULL; } switch (dbi_result_get_numrows(res)) { case 1: break; case 0: ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, 0, r->server, "vhost_dbi: get_path: no results for %s", host); free(rstr); dbi_result_free(res); dbi_conn_close(dbi); dbi_shutdown(); return NULL; default: ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, 0, r->server, "vhost_dbi: get_path: %s has more than 1 server row, failing.", host); free(rstr); dbi_result_free(res); dbi_conn_close(dbi); dbi_shutdown(); return NULL; } if (dbi_result_next_row(res) == 0) { dbi_err = dbi_conn_error(dbi, &dbi_err_str); ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, 0, r->server, "vhost_dbi: get_path: SQL Result Error: (%d) %s on query: %s", dbi_err, dbi_err_str, qstr); free(rstr); dbi_result_free(res); dbi_conn_close(dbi); dbi_shutdown(); return NULL; } path = apr_psprintf(r->pool, "%s", dbi_result_get_string(res, "root_path")); free(rstr); dbi_result_free(res); dbi_conn_close(dbi); dbi_shutdown(); ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "get_path: %s from SQL: %s", path, qstr); return path; } static int vhost_dbi_init_handler(apr_pool_t * pconf, apr_pool_t * plog, apr_pool_t * ptemp, server_rec * s) { ap_add_version_component(pconf, "mod_vhost_dbi/0.1.0"); return OK; } static int vhost_dbi_translate_name(request_rec * r) { vhost_dbi_config_rec *vdbir = (vhost_dbi_config_rec *) ap_get_module_config(r->server->module_config, &vhost_dbi_module); const char *host; char *path; char *env = NULL; char *ptr; int i; if (!(vdbir->fl == 1)) { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "vhost_dbi_translate_name: declined http://%s%s module is not configured for this server", apr_table_get(r->headers_in, "Host"), r->uri); return DECLINED; } if (!(host = apr_table_get(r->headers_in, "Host"))) { if (!vdbir->default_host) { ap_log_error(APLOG_MARK, APLOG_ALERT, 0, r->server, "vhost_dbi_translate_name: no host found (non HTTP/1.1 request, no default set) %s", host); return DECLINED; } else { host = vdbir->default_host; } } if (ptr = strchr(host, ':')) { *ptr = '\0'; } path = get_path(r, host, &env, vdbir); if (!path) { ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, r->server, "vhost_dbi_translate_name: no host found in database for %s", host); return DECLINED; } apr_table_set(r->subprocess_env, "vhost_dbi_HOST", host); apr_table_set(r->subprocess_env, "vhost_dbi_PATH", path); r->filename = apr_psprintf(r->pool, "%s/public_html%s", path, r->uri); #ifdef HAVE_PHP_SUPPORT zend_alter_ini_entry("safe_mode", 13, "on", strlen("on"), 4, 16); zend_alter_ini_entry("open_basedir", 13, path, strlen(path), 4, 16); #endif ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "vhost_dbi_translate_name: translated http://%s%s to file %s from uri %s and path %s", host, r->uri, r->filename, r->uri, path); return OK; } static void register_hooks(apr_pool_t * p) { ap_hook_post_config(vhost_dbi_init_handler, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_translate_name(vhost_dbi_translate_name, NULL, NULL, APR_HOOK_FIRST); } AP_DECLARE_DATA module vhost_dbi_module = { STANDARD20_MODULE_STUFF, NULL, /* create per-directory config structure */ NULL, /* merge per-directory config structures */ vhost_dbi_create_server_config, /* create per-server config structure */ vhost_dbi_merge_server_config, /* merge per-server config structures */ vhost_dbi_commands, /* command apr_table_t */ register_hooks /* register hooks */ }; |
From: <fir...@us...> - 2004-03-04 08:33:16
|
Update of /cvsroot/mod-auth/mod_vhost_dbi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12444/mod_vhost_dbi Added Files: AUTHORS COPYING Makefile.am autogen.sh configure.in udcl.sh Log Message: adding mod_vhost_dbi code. This project may move somewhere else later. Right now the plan is to make it work with mod_dbi_pool. --- NEW FILE: AUTHORS --- Paul Querna <ch...@fo...> --- NEW FILE: COPYING --- Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --- NEW FILE: Makefile.am --- EXTRA_DIST = SUBDIRS = src --- NEW FILE: autogen.sh --- #!/bin/sh # autogen.sh - generates configure using the autotools # $Id: autogen.sh,v 1.1 2004/03/04 08:12:13 firechipmunk Exp $ libtoolize --force --copy #libtoolize14 --force --copy aclocal autoheader touch NEWS automake --add-missing --copy rm NEWS autoconf rm -rf autom4te.cache --- NEW FILE: configure.in --- AC_INIT(src/mod_vhost_dbi.c) AM_MAINTAINER_MODE AM_INIT_AUTOMAKE(mod_vhost_dbi, 0.1.0) AM_CONFIG_HEADER(include/mod_vhost_dbi_config.h:config.in) AC_PROG_CC AC_PROG_CPP AC_PROG_LD AC_PROG_INSTALL AM_PROG_LIBTOOL AC_MSG_CHECKING(for --with-dbi) AC_ARG_WITH(dbi, [ --with-dbi=PATH Path to dbi], [ if test -e "$withval/include/dbi/dbi.h" then DBI_INCLUDES=$withval/include DBI_LIB=$withval/lib AC_MSG_RESULT([found dbi.h]) else echo AC_MSG_ERROR([$withval/include/dbi/dbi.h not found ]) fi ], AC_MSG_RESULT(no)) AC_MSG_CHECKING(for --with-dbi-include) AC_ARG_WITH(dbi-include, [ --with-dbi-include=PATH Path to dbi headers], [ if test -e "$withval/dbi/dbi.h" then DBI_INCLUDES=$withval AC_MSG_RESULT([found dbi.h]) else echo AC_MSG_ERROR([$withval/dbi/dbi.h not found ]) fi ], AC_MSG_RESULT(no)) AC_MSG_CHECKING(for --with-dbi-libs) AC_ARG_WITH(dbi-libs, [ --with-dbi-libs=PATH Path to dbi libs], [ if test -e "$withval/libdbi.so" then DBI_LIB=$withval AC_MSG_RESULT([found libdbi.so]) else echo AC_MSG_ERROR([$withval/libdbi.so not found ]) fi ], AC_MSG_RESULT(no)) if test -z "$DBI_LIB"; then AC_MSG_CHECKING(for dbi-libs in /usr/lib) if test -e /usr/lib/libdbi.so; then DBI_LIB=/usr/lib AC_MSG_RESULT([found libdbi.so, we'll use this. Use --with-dbi-libs to specify another.]) else AC_MSG_RESULT(no) fi fi if test -z "$DBI_INCLUDES"; then AC_MSG_CHECKING(for dbi-include in /usr/include) if test -e /usr/include/dbi/dbi.h; then DBI_INCLUDES=/usr/include AC_MSG_RESULT([found dbi/dbi.h, we'll use this. Use --with-dbi-include to specify another.]) else AC_MSG_RESULT(no) fi fi if test -z "$DBI_LIB"; then AC_MSG_CHECKING(for dbi-libs in /usr/local/lib) if test -e /usr/local/lib/libdbi.so; then DBI_LIB=/usr/local/lib AC_MSG_RESULT([found libdbi.so, we'll use this. Use --with-dbi-libs to specify another.]) else AC_MSG_ERROR([please set --with-dbi-libs=PATH or --with-dbi=PATH to your dbi install]) fi fi if test -z "$DBI_INCLUDES"; then AC_MSG_CHECKING(for dbi-include in /usr/local/include) if test -e /usr/local/include/dbi/dbi.h; then DBI_INCLUDES=/usr/local/include AC_MSG_RESULT([found dbi/dbi.h, we'll use this. Use --with-dbi-include to specify another.]) else AC_MSG_ERROR([please set --with-dbi-include=PATH or --with-dbi=PATH to your dbi install]) fi fi # check for --with-apxs AC_MSG_CHECKING(for --with-apxs) AC_ARG_WITH(apxs, [ --with-apxs=PATH Path to apxs], [ if test -x "$withval" then AC_MSG_RESULT([$withval executable, good]) APXS=$withval else echo AC_MSG_ERROR([$withval not found or not executable]) fi ], AC_MSG_RESULT(no)) # if no apxs found yet, check /usr/local/apache/sbin # since it's the default Apache location if test -z "$APXS"; then AC_MSG_CHECKING(for apxs in /usr/local/apache/sbin) if test -x /usr/local/apache/sbin/apxs; then APXS=/usr/local/apache/sbin/apxs AC_MSG_RESULT([found, we'll use this. Use --with-apxs to specify another.]) else AC_MSG_RESULT(no) fi fi if test -z "$APXS"; then AC_MSG_CHECKING(for apxs in /usr/local/apache2/bin) if test -x /usr/local/apache2/bin/apxs; then APXS=/usr/local/apache2/bin/apxs AC_MSG_RESULT([found, we'll use this. Use --with-apxs to specify another.]) else AC_MSG_RESULT(no) fi fi if test -z "$APXS"; then AC_MSG_CHECKING(for apxs in /usr/sbin) if test -x /usr/sbin/apxs; then APXS=/usr/sbin/apxs AC_MSG_RESULT([found, we'll use this. Use --with-apxs to specify another.]) else AC_MSG_RESULT(no) fi fi # last resort if test -z "$APXS"; then AC_MSG_CHECKING(for apxs in your PATH) AC_PATH_PROG(APXS, apxs) if test -n "$APXS"; then AC_MSG_RESULT([found $APXS, we'll use this. Use --with-apxs to specify another.]) fi fi if test -z "$APXS"; then AC_MSG_ERROR([**** apxs was not found, DSO compilation will not be available.]) fi # determine LIBEXEC AC_MSG_CHECKING(for Apache libexec directory) LIBEXECDIR=`${APXS} -q LIBEXECDIR` AC_MSG_RESULT($LIBEXECDIR) # determine INCLUDES AC_MSG_CHECKING([for Apache include directory]) AP_INCLUDES="-I`${APXS} -q INCLUDEDIR`" AC_MSG_RESULT($AP_INCLUDES) CFLAGS="${CFLAGS} $AP_INCLUDES" AC_PATH_PROG(PKG_CONFIG, pkg-config, no) if test "x$PKG_CONFIG" = "xno"; then AC_MSG_ERROR([You need to install pkg-config]) fi PKG_PATH= AC_SUBST(LIBEXECDIR) AC_SUBST(AP_INCLUDES) AC_SUBST(DBI_INCLUDES) AC_SUBST(DBI_LIB) AC_SUBST(CFLAGS) AC_SUBST(APXS) AC_OUTPUT(Makefile src/Makefile) echo "---" echo "Configuration summary for mod_vhost_dbi" echo "" echo " * Apache modules directory = $LIBEXECDIR" echo " * libdbi include directory = $DBI_INCLUDES" echo " * libdbi libs = $DBI_LIB" echo "" echo "---" --- NEW FILE: udcl.sh --- #!/bin/sh # define $EDITOR and EDITOR_FLAGS in your environment to customize this CL="ChangeLog" DSTR=`date +%d.%m.%Y` DSTR2=`date +%H:%M\ \(%Z\)` TF="ferite-changelog-entry-"$USER if test -z $EDITOR; then EDITOR="nano" EDITOR_FLAGS="+" fi export UNAME=$USER; if test $USER="chip"; then export UNAME="firechipmunk" fi echo "--------------------------------------------------------------------------------------------------------" > $TF echo "$DSTR $DSTR2, $UNAME" >> $TF echo >> $TF echo >> $TF $EDITOR $EDITOR_FLAGS $TF echo "" >> $TF cat $CL >> $TF rm $CL if test -f $TF"~"; then rm $TF"~" fi mv $TF $CL |
From: <fir...@us...> - 2004-03-04 08:32:26
|
Update of /cvsroot/mod-auth/mod_vhost_dbi/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12407/include Log Message: Directory /cvsroot/mod-auth/mod_vhost_dbi/include added to the repository |
From: <fir...@us...> - 2004-03-04 08:30:26
|
Update of /cvsroot/mod-auth/mod_vhost_dbi/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12058/mod_vhost_dbi/src Log Message: Directory /cvsroot/mod-auth/mod_vhost_dbi/src added to the repository |
From: <fir...@us...> - 2004-03-04 08:30:17
|
Update of /cvsroot/mod-auth/mod_vhost_dbi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12013/mod_vhost_dbi Log Message: Directory /cvsroot/mod-auth/mod_vhost_dbi added to the repository |
From: <fir...@us...> - 2004-03-03 07:26:04
|
Update of /cvsroot/mod-auth/mod_dbi_pool/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12349/src Modified Files: mod_dbi_pool.c Log Message: indent w/ apache style. I must remember todo this before commiting. Index: mod_dbi_pool.c =================================================================== RCS file: /cvsroot/mod-auth/mod_dbi_pool/src/mod_dbi_pool.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- mod_dbi_pool.c 3 Mar 2004 05:42:56 -0000 1.6 +++ mod_dbi_pool.c 3 Mar 2004 07:05:49 -0000 1.7 @@ -46,6 +46,7 @@ dbi_config *create_new_conf(conn_id conn_id, apr_pool_t * p) { dbi_config *conf; + conf = (dbi_config *) apr_pcalloc(p, sizeof(dbi_config)); if (conf == NULL) { return NULL; @@ -61,18 +62,19 @@ conf->rec.conn_ttl = DFLT_CONN_TTL; apr_hash_set(dbi_pool_config, conn_id, APR_HASH_KEY_STRING, conf); ap_log_perror(APLOG_MARK, APLOG_DEBUG, 0, p, - "[mod_dbi_pool.c] Creating Config for %s", conn_id); + "[mod_dbi_pool.c] Creating Config for %s", conn_id); return conf; } static apr_status_t get_or_create_dbi_conf(const char *conn_id, - apr_pool_t * p, - dbi_config ** confname) + apr_pool_t * p, dbi_config ** confname) { dbi_config *temp; unsigned int c; - /* some sanity checks on conn_id..limits are liberal and are more or less random */ + /* + * some sanity checks on conn_id..limits are liberal and are more or less random + */ if (strlen(conn_id) > 255) { return APR_EGENERAL; } @@ -83,7 +85,9 @@ } temp = apr_hash_get(dbi_pool_config, conn_id, APR_HASH_KEY_STRING); if (temp == NULL) { - /* no such server yet... */ + /* + * no such server yet... + */ temp = create_new_conf(conn_id, p); } *confname = temp; @@ -91,16 +95,19 @@ } static const char *set_dbi_switch_conf(cmd_parms * cmd, void *config, - const char *conn_id, const char *value) + const char *conn_id, const char *value) { apr_ssize_t pos = (apr_ssize_t) cmd->info; dbi_config *temp; + if ((get_or_create_dbi_conf(conn_id, cmd->pool, &temp)) == APR_SUCCESS) { - /* Overwriting an existing value technically is a memory leak, since the pconf pool is only - * destroyed at the termination of the whole apache process. Otoh, when processing htaccess, - * we get handed the request-pool instead which is freed afterwards, so we should be fine. */ + /* + * Overwriting an existing value technically is a memory leak, since the pconf pool is only + * * destroyed at the termination of the whole apache process. Otoh, when processing htaccess, + * * we get handed the request-pool instead which is freed afterwards, so we should be fine. + */ // XXXX: Since mod_pool_dbi will be around alot longer, this needs to be fixed! switch (pos) { @@ -140,35 +147,37 @@ } static const command_rec dbi_pool_cmds[] = { - /* global config items */ + /* + * global config items + */ AP_INIT_TAKE2("PoolDbiDriver", set_dbi_switch_conf, - (void *) CONF_DBI_DRIVER, RSRC_CONF, - "The DBI Driver"), - AP_INIT_TAKE2("PoolDbiHost", set_dbi_switch_conf, (void *) CONF_DBI_HOST, - RSRC_CONF, - "The host for the database connection"), + (void *)CONF_DBI_DRIVER, RSRC_CONF, + "The DBI Driver"), + AP_INIT_TAKE2("PoolDbiHost", set_dbi_switch_conf, (void *)CONF_DBI_HOST, + RSRC_CONF, + "The host for the database connection"), AP_INIT_TAKE2("PoolDbiUsername", set_dbi_switch_conf, - (void *) CONF_DBI_USERNAME, RSRC_CONF, - "The username for the database connection"), + (void *)CONF_DBI_USERNAME, RSRC_CONF, + "The username for the database connection"), AP_INIT_TAKE2("PoolDbiPassword", set_dbi_switch_conf, - (void *) CONF_DBI_PASSWORD, RSRC_CONF, - "The password for the database connection"), + (void *)CONF_DBI_PASSWORD, RSRC_CONF, + "The password for the database connection"), AP_INIT_TAKE2("PoolDbiDBName", set_dbi_switch_conf, - (void *) CONF_DBI_DBNAME, - RSRC_CONF, - "The name of the database containing the tables"), + (void *)CONF_DBI_DBNAME, + RSRC_CONF, + "The name of the database containing the tables"), AP_INIT_TAKE2("PoolDbiConnMin", set_dbi_switch_conf, - (void *) CONF_DBI_CONN_MIN, RSRC_CONF, - "The Minimum Number of Database Connections"), + (void *)CONF_DBI_CONN_MIN, RSRC_CONF, + "The Minimum Number of Database Connections"), AP_INIT_TAKE2("PoolDbiConnSoftMax", set_dbi_switch_conf, - (void *) CONF_DBI_CONN_SOFTMAX, RSRC_CONF, - "The Soft Maximum Number of Database Connections"), + (void *)CONF_DBI_CONN_SOFTMAX, RSRC_CONF, + "The Soft Maximum Number of Database Connections"), AP_INIT_TAKE2("PoolDbiConnHardMax", set_dbi_switch_conf, - (void *) CONF_DBI_CONN_HARDMAX, RSRC_CONF, - "The Hard Maximum Number of Database Connections"), + (void *)CONF_DBI_CONN_HARDMAX, RSRC_CONF, + "The Hard Maximum Number of Database Connections"), AP_INIT_TAKE2("PoolDbiConnTTL", set_dbi_switch_conf, - (void *) CONF_DBI_CONN_TTL, RSRC_CONF, - "The Database Pool Time To Live for Each Connection."), + (void *)CONF_DBI_CONN_TTL, RSRC_CONF, + "The Database Pool Time To Live for Each Connection."), {NULL} }; @@ -178,7 +187,7 @@ /* an apr_reslist_constructor for DBI connections */ static apr_status_t dbipool_construct(void **db, void *params, - apr_pool_t * pool) + apr_pool_t * pool) { dbi_config_rec *conf = params; int err_num = 0; @@ -187,7 +196,7 @@ *db = dbi_conn_new(conf->dbi_driver); // Test for a Fatal Error on Creating the Driver - if(*db == NULL) { + if (*db == NULL) { ap_log_perror(APLOG_MARK, APLOG_EMERG, 0, pool, "[mod_dbi_pool.c] DBI Connection Failed. dbi_conn_new returned NULL. Insufficient memory or invalid DBD?"); /** @@ -204,26 +213,27 @@ if (dbi_conn_connect(*db) != 0) { err_num = dbi_conn_error(*db, &err_str); - /* Connetion Failed */ + /* + * Connetion Failed + */ ap_log_perror(APLOG_MARK, APLOG_CRIT, 0, pool, - "[mod_dbi_pool.c] DBI Connection to %s://%s@%s/%s Failed. Error: (%d) %s", - conf->dbi_driver, conf->dbi_user, - conf->dbi_host, conf->dbi_dbname, - err_num, err_str); + "[mod_dbi_pool.c] DBI Connection to %s://%s@%s/%s Failed. Error: (%d) %s", + conf->dbi_driver, conf->dbi_user, + conf->dbi_host, conf->dbi_dbname, err_num, err_str); return APR_EGENERAL; } return APR_SUCCESS; } static apr_status_t dbipool_destruct(void *sql, void *params, - apr_pool_t * pool) + apr_pool_t * pool) { dbi_conn_close((dbi_conn *) sql); return APR_SUCCESS; } static int dbi_pool_post_config(apr_pool_t * p, apr_pool_t * plog, - apr_pool_t * ptemp, server_rec * s) + apr_pool_t * ptemp, server_rec * s) { int rval; apr_hash_index_t *idx; @@ -235,60 +245,66 @@ apr_pool_userdata_get(&data, userdata_key, s->process->pool); if (!data) { - apr_pool_userdata_set((const void *) 1, userdata_key, - apr_pool_cleanup_null, s->process->pool); + apr_pool_userdata_set((const void *)1, userdata_key, + apr_pool_cleanup_null, s->process->pool); return OK; } ap_log_perror(APLOG_MARK, APLOG_DEBUG, 0, p, - "[mod_dbi_pool.c] Running DBI Pool Init"); + "[mod_dbi_pool.c] Running DBI Pool Init"); if ((rval = dbi_initialize(NULL)) > 0) { ap_log_perror(APLOG_MARK, APLOG_DEBUG, 0, p, - "[mod_dbi_pool.c] Initialization of libdbi found %d drivers in default driver directory", - rval); - } - else { /* An error was returned or libdbi found 0 drivers */ + "[mod_dbi_pool.c] Initialization of libdbi found %d drivers in default driver directory", + rval); + } + else { /* An error was returned or libdbi found 0 drivers */ ap_log_perror(APLOG_MARK, APLOG_EMERG, 0, p, - "[mod_dbi_pool.c] - Initlialization of libdbi with default driver directory failed"); + "[mod_dbi_pool.c] - Initlialization of libdbi with default driver directory failed"); return APR_EDSOOPEN; } - /* loop the hashed config stuff... */ + /* + * loop the hashed config stuff... + */ for (idx = apr_hash_first(p, dbi_pool_config); idx; - idx = apr_hash_next(idx)) { - apr_hash_this(idx, (void *) &key, &len, (void *) &val); - if(apr_reslist_create(&val->pool, val->rec.conn_min, /* hard minimum */ - val->rec.conn_soft, /* soft maximum */ - val->rec.conn_max, /* hard maximum */ - val->rec.conn_ttl, /* Time to live -- dbi server might override/disconnect! */ - dbipool_construct, /* Make a New Connection */ - dbipool_destruct, /* Kill Old Connection */ - (void *) &val->rec, p) != APR_SUCCESS) - ap_log_perror(APLOG_MARK, APLOG_EMERG, 0, p, - "[mod_dbi_pool.c] - Creation of dbi connection pool failed for config set %s", - key); - /* XXX: If no new connection could be opened, the reslist will not - contain any resources and reslist_create will fail, giving - val->pool the value NULL and making it unusable. The configuration - set is not really recoverable in this case. For now we log this condition - and the authentication functions protect themselves against this - condition. A much better way would be to free the configuration - set completely. But to do this other changes are necessary, so for - now this is basically a workaround. This has to be fixed before - 1.0 */ + idx = apr_hash_next(idx)) { + apr_hash_this(idx, (void *)&key, &len, (void *)&val); + if (apr_reslist_create(&val->pool, val->rec.conn_min, /* hard minimum */ + val->rec.conn_soft, /* soft maximum */ + val->rec.conn_max, /* hard maximum */ + val->rec.conn_ttl, /* Time to live -- dbi server might override/disconnect! */ + dbipool_construct, /* Make a New Connection */ + dbipool_destruct, /* Kill Old Connection */ + (void *)&val->rec, p) != APR_SUCCESS) + ap_log_perror(APLOG_MARK, APLOG_EMERG, 0, p, + "[mod_dbi_pool.c] - Creation of dbi connection pool failed for config set %s", + key); + /* + * XXX: If no new connection could be opened, the reslist will not + * contain any resources and reslist_create will fail, giving + * val->pool the value NULL and making it unusable. The configuration + * set is not really recoverable in this case. For now we log this condition + * and the authentication functions protect themselves against this + * condition. A much better way would be to free the configuration + * set completely. But to do this other changes are necessary, so for + * now this is basically a workaround. This has to be fixed before + * 1.0 + */ apr_hash_set(dbi_pool_config, key, APR_HASH_KEY_STRING, val); } + ap_add_version_component(p, "mod_dbi_pool/0.1.0"); return OK; } static apr_status_t dbi_pool_pre_config(apr_pool_t * pconf, - apr_pool_t * plog, - apr_pool_t * ptemp) + apr_pool_t * plog, apr_pool_t * ptemp) { apr_status_t rv = APR_SUCCESS; - /* create our globalish config var */ + /* + * create our globalish config var + */ dbi_pool_config = apr_hash_make(pconf); return rv; } @@ -314,19 +330,20 @@ - close releases it back in to the pool */ -dbi_conn *dbipool_open(conn_id* id) +dbi_conn *dbipool_open(conn_id * id) { dbi_conn *ret = NULL; dbi_config *conf = apr_hash_get(dbi_pool_config, id, APR_HASH_KEY_STRING); - if (apr_reslist_acquire(conf->pool, (void **) &ret) != APR_SUCCESS) { + if (apr_reslist_acquire(conf->pool, (void **)&ret) != APR_SUCCESS) { return NULL; } return ret; } -void dbipool_close(conn_id* id, dbi_conn* conn) { +void dbipool_close(conn_id * id, dbi_conn * conn) +{ dbi_config *conf = apr_hash_get(dbi_pool_config, id, APR_HASH_KEY_STRING); - apr_reslist_release(conf->pool, (void **) conn); -} + apr_reslist_release(conf->pool, (void **)conn); +} |
From: <fir...@us...> - 2004-03-03 07:26:03
|
Update of /cvsroot/mod-auth/mod_dbi_pool/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12349/include Modified Files: mod_dbi_pool.h Log Message: indent w/ apache style. I must remember todo this before commiting. Index: mod_dbi_pool.h =================================================================== RCS file: /cvsroot/mod-auth/mod_dbi_pool/include/mod_dbi_pool.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- mod_dbi_pool.h 3 Mar 2004 05:42:56 -0000 1.3 +++ mod_dbi_pool.h 3 Mar 2004 07:05:49 -0000 1.4 @@ -63,8 +63,7 @@ #define DBI_HARD_MAX_CONNS (255) #endif -typedef enum -{ +typedef enum { CONF_DBI_DRIVER, CONF_DBI_DRIVER_DIR, CONF_DBI_HOST, @@ -77,8 +76,7 @@ CONF_DBI_CONN_TTL, } CONF_DBI; -typedef struct dbi_config_rec_struct -{ +typedef struct dbi_config_rec_struct { const char *dbi_dbname; const char *dbi_user; const char *dbi_pass; @@ -92,20 +90,19 @@ //XXXXX: why aren't we seeing the apr_relist header? typedef struct apr_reslist_t apr_reslist_t; - + typedef const char *conn_id; -typedef struct dbi_config_struct -{ +typedef struct dbi_config_struct { const char name; dbi_config_rec rec; apr_reslist_t *pool; } dbi_config; -dbi_conn *dbipool_open(conn_id* id); +dbi_conn *dbipool_open(conn_id * id); -void dbipool_close(conn_id* id, dbi_conn* conn); +void dbipool_close(conn_id * id, dbi_conn * conn); #endif |
From: <fir...@us...> - 2004-03-03 06:03:10
|
Update of /cvsroot/mod-auth/mod_dbi_pool/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1188/src Modified Files: mod_dbi_pool.c Log Message: the module now compiles. Index: mod_dbi_pool.c =================================================================== RCS file: /cvsroot/mod-auth/mod_dbi_pool/src/mod_dbi_pool.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- mod_dbi_pool.c 29 Feb 2004 08:48:27 -0000 1.5 +++ mod_dbi_pool.c 3 Mar 2004 05:42:56 -0000 1.6 @@ -35,13 +35,13 @@ #include <http_log.h> #include <apr_reslist.h> #include <apr_strings.h> +#include <apr_hash.h> #include "mod_dbi_pool.h" module AP_MODULE_DECLARE_DATA dbi_pool_module; -static int dbi_conn_count = 0; -static apr_hash_t *authn_dbi_config; +static apr_hash_t *dbi_pool_config; dbi_config *create_new_conf(conn_id conn_id, apr_pool_t * p) { @@ -59,9 +59,9 @@ conf->rec.conn_soft = DFLT_CONN_SOFT; conf->rec.conn_max = DFLT_CONN_MAX; conf->rec.conn_ttl = DFLT_CONN_TTL; - apr_hash_set(authn_dbi_config, conn_id, APR_HASH_KEY_STRING, conf); + apr_hash_set(dbi_pool_config, conn_id, APR_HASH_KEY_STRING, conf); ap_log_perror(APLOG_MARK, APLOG_DEBUG, 0, p, - "[mod_authn_dbi.c] Creating Config for %s", conn_id); + "[mod_dbi_pool.c] Creating Config for %s", conn_id); return conf; } @@ -81,7 +81,7 @@ return APR_EGENERAL; } } - temp = apr_hash_get(authn_dbi_config, conn_id, APR_HASH_KEY_STRING); + temp = apr_hash_get(dbi_pool_config, conn_id, APR_HASH_KEY_STRING); if (temp == NULL) { /* no such server yet... */ temp = create_new_conf(conn_id, p); @@ -90,11 +90,6 @@ return APR_SUCCESS; } -#define ISINT(val) \ - for ( p = val; *p; ++p) \ - if ( ! isdigit(*p) ) \ - return "Argument must be numeric!" - static const char *set_dbi_switch_conf(cmd_parms * cmd, void *config, const char *conn_id, const char *value) { @@ -122,7 +117,7 @@ temp->rec.dbi_pass = value; break; case CONF_DBI_DBNAME: - temp->rec.dbi_name = value; + temp->rec.dbi_dbname = value; break; case CONF_DBI_CONN_MIN: temp->rec.conn_min = atoi(value); @@ -134,7 +129,6 @@ temp->rec.conn_max = atoi(value); break; case CONF_DBI_CONN_TTL: - ISINT(value); temp->rec.conn_ttl = atoi(value); break; default: @@ -145,14 +139,11 @@ return NULL; } -static const command_rec authn_dbi_cmds[] = { +static const command_rec dbi_pool_cmds[] = { /* global config items */ AP_INIT_TAKE2("PoolDbiDriver", set_dbi_switch_conf, (void *) CONF_DBI_DRIVER, RSRC_CONF, "The DBI Driver"), - AP_INIT_TAKE1("PoolDbiDriverDir", set_dbi_driverdir, - (void *) CONF_DBI_DRIVER_DIR, RSRC_CONF, - "The directory containing the DBI drivers"), AP_INIT_TAKE2("PoolDbiHost", set_dbi_switch_conf, (void *) CONF_DBI_HOST, RSRC_CONF, "The host for the database connection"), @@ -163,7 +154,7 @@ (void *) CONF_DBI_PASSWORD, RSRC_CONF, "The password for the database connection"), AP_INIT_TAKE2("PoolDbiDBName", set_dbi_switch_conf, - (void *) CONF_DBI_NAME, + (void *) CONF_DBI_DBNAME, RSRC_CONF, "The name of the database containing the tables"), AP_INIT_TAKE2("PoolDbiConnMin", set_dbi_switch_conf, @@ -185,26 +176,40 @@ /************ svr cfg: manage db connection pool ****************/ /* an apr_reslist_constructor for DBI connections */ + static apr_status_t dbipool_construct(void **db, void *params, apr_pool_t * pool) { - svr_cfg *svr = (svr_cfg *) params; + dbi_config_rec *conf = params; int err_num = 0; const char *err_str; - *db = dbi_conn_new(svr->dbi_driver); - dbi_conn_set_option(*db, "host", svr->host); - dbi_conn_set_option(*db, "username", svr->user); - dbi_conn_set_option(*db, "password", svr->pass); - dbi_conn_set_option(*db, "dbname", svr->db); + *db = dbi_conn_new(conf->dbi_driver); + + // Test for a Fatal Error on Creating the Driver + if(*db == NULL) { + ap_log_perror(APLOG_MARK, APLOG_EMERG, 0, pool, + "[mod_dbi_pool.c] DBI Connection Failed. dbi_conn_new returned NULL. Insufficient memory or invalid DBD?"); + /** + * modules/ssl/ssl_engine_log.c:103 + * said this was okay. so i do it too. + */ + exit(1); + } + + dbi_conn_set_option(*db, "host", conf->dbi_host); + dbi_conn_set_option(*db, "username", conf->dbi_user); + dbi_conn_set_option(*db, "password", conf->dbi_pass); + dbi_conn_set_option(*db, "dbname", conf->dbi_dbname); if (dbi_conn_connect(*db) != 0) { err_num = dbi_conn_error(*db, &err_str); /* Connetion Failed */ ap_log_perror(APLOG_MARK, APLOG_CRIT, 0, pool, "[mod_dbi_pool.c] DBI Connection to %s://%s@%s/%s Failed. Error: (%d) %s", - svr->dbi_driver, svr->user, svr->host, svr->db, err_num, - err_str); + conf->dbi_driver, conf->dbi_user, + conf->dbi_host, conf->dbi_dbname, + err_num, err_str); return APR_EGENERAL; } @@ -217,36 +222,88 @@ return APR_SUCCESS; } -static int setup_db_pool(apr_pool_t * p, apr_pool_t * plog, +static int dbi_pool_post_config(apr_pool_t * p, apr_pool_t * plog, apr_pool_t * ptemp, server_rec * s) { - svr_cfg *svr = - (svr_cfg *) ap_get_module_config(s->module_config, &dbi_pool_module); + int rval; + apr_hash_index_t *idx; + char *key; + dbi_config *val; + apr_ssize_t len; + void *data; + const char *userdata_key = "mod_dbi_pool_init"; - if (apr_reslist_create(&svr->dbpool, svr->nmin, svr->nkeep, - svr->nmax, svr->exptime, dbipool_construct, - dbipool_destruct, svr, p) != APR_SUCCESS) { - ap_log_error(APLOG_MARK, APLOG_CRIT, 0, s, - "DBIPool: failed to initialise"); - return 500; + apr_pool_userdata_get(&data, userdata_key, s->process->pool); + if (!data) { + apr_pool_userdata_set((const void *) 1, userdata_key, + apr_pool_cleanup_null, s->process->pool); + return OK; } - apr_pool_cleanup_register(p, svr->dbpool, - (void *) apr_reslist_destroy, - apr_pool_cleanup_null); + + ap_log_perror(APLOG_MARK, APLOG_DEBUG, 0, p, + "[mod_dbi_pool.c] Running DBI Pool Init"); + if ((rval = dbi_initialize(NULL)) > 0) { + ap_log_perror(APLOG_MARK, APLOG_DEBUG, 0, p, + "[mod_dbi_pool.c] Initialization of libdbi found %d drivers in default driver directory", + rval); + } + else { /* An error was returned or libdbi found 0 drivers */ + ap_log_perror(APLOG_MARK, APLOG_EMERG, 0, p, + "[mod_dbi_pool.c] - Initlialization of libdbi with default driver directory failed"); + return APR_EDSOOPEN; + } + + /* loop the hashed config stuff... */ + for (idx = apr_hash_first(p, dbi_pool_config); idx; + idx = apr_hash_next(idx)) { + apr_hash_this(idx, (void *) &key, &len, (void *) &val); + if(apr_reslist_create(&val->pool, val->rec.conn_min, /* hard minimum */ + val->rec.conn_soft, /* soft maximum */ + val->rec.conn_max, /* hard maximum */ + val->rec.conn_ttl, /* Time to live -- dbi server might override/disconnect! */ + dbipool_construct, /* Make a New Connection */ + dbipool_destruct, /* Kill Old Connection */ + (void *) &val->rec, p) != APR_SUCCESS) + ap_log_perror(APLOG_MARK, APLOG_EMERG, 0, p, + "[mod_dbi_pool.c] - Creation of dbi connection pool failed for config set %s", + key); + /* XXX: If no new connection could be opened, the reslist will not + contain any resources and reslist_create will fail, giving + val->pool the value NULL and making it unusable. The configuration + set is not really recoverable in this case. For now we log this condition + and the authentication functions protect themselves against this + condition. A much better way would be to free the configuration + set completely. But to do this other changes are necessary, so for + now this is basically a workaround. This has to be fixed before + 1.0 */ + apr_hash_set(dbi_pool_config, key, APR_HASH_KEY_STRING, val); + } + return OK; } +static apr_status_t dbi_pool_pre_config(apr_pool_t * pconf, + apr_pool_t * plog, + apr_pool_t * ptemp) +{ + apr_status_t rv = APR_SUCCESS; + + /* create our globalish config var */ + dbi_pool_config = apr_hash_make(pconf); + return rv; +} static void dbi_pool_hooks(apr_pool_t * p) { - ap_hook_post_config(setup_db_pool, NULL, NULL, APR_HOOK_MIDDLE); + ap_hook_pre_config(dbi_pool_pre_config, NULL, NULL, APR_HOOK_MIDDLE); + ap_hook_post_config(dbi_pool_post_config, NULL, NULL, APR_HOOK_MIDDLE); } module AP_MODULE_DECLARE_DATA dbi_pool_module = { STANDARD20_MODULE_STUFF, NULL, NULL, - dbi_pool_cfg, + NULL, NULL, dbi_pool_cmds, dbi_pool_hooks @@ -257,22 +314,19 @@ - close releases it back in to the pool */ -dbi_conn *dbipool_open(server_rec * s) +dbi_conn *dbipool_open(conn_id* id) { dbi_conn *ret = NULL; - svr_cfg *svr = - (svr_cfg *) ap_get_module_config(s->module_config, &dbi_pool_module); - if (apr_reslist_acquire(svr->dbpool, (void **) &ret) != APR_SUCCESS) { - ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, - "Failed to acquire DBI connection from pool!"); + dbi_config *conf = apr_hash_get(dbi_pool_config, id, APR_HASH_KEY_STRING); + + if (apr_reslist_acquire(conf->pool, (void **) &ret) != APR_SUCCESS) { return NULL; } return ret; } -void dbipool_close(server_rec * s, dbi_conn * sql) -{ - svr_cfg *svr = - (svr_cfg *) ap_get_module_config(s->module_config, &dbi_pool_module); - apr_reslist_release(svr->dbpool, sql); +void dbipool_close(conn_id* id, dbi_conn* conn) { + dbi_config *conf = apr_hash_get(dbi_pool_config, id, APR_HASH_KEY_STRING); + apr_reslist_release(conf->pool, (void **) conn); } + |
From: <fir...@us...> - 2004-03-03 06:03:09
|
Update of /cvsroot/mod-auth/mod_dbi_pool/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1188/include Modified Files: mod_dbi_pool.h Log Message: the module now compiles. Index: mod_dbi_pool.h =================================================================== RCS file: /cvsroot/mod-auth/mod_dbi_pool/include/mod_dbi_pool.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- mod_dbi_pool.h 29 Feb 2004 08:48:27 -0000 1.2 +++ mod_dbi_pool.h 3 Mar 2004 05:42:56 -0000 1.3 @@ -27,16 +27,22 @@ /** * mod_dbi_pool: manage a pool of libdbi connections. + * * EXPORTS: - * dbi_conn* dbipool_open(server_rec*) + * dbi_conn *dbipool_open(conn_id* id) * - retrieve a connection from the pool and check it's valid * - May return null and log a message on error. - * void dbipool_close(server_rec*, dbi_conn*) + * void dbipool_close(conn_id* id, dbi_conn* conn) * - return a connection to the pool after use * */ +#ifndef _INCLUDE_MOD_DBI_POOL_H +#define _INCLUDE_MOD_DBI_POOL_H + +#include <apr_reslist.h> + #define DFLT_DBI_DBNAME "mod_dbi" #define DFLT_DBI_HOST "localhost" #define DFLT_DBI_DRIVER "mysql" @@ -83,3 +89,23 @@ int conn_max; int conn_ttl; } dbi_config_rec; + +//XXXXX: why aren't we seeing the apr_relist header? +typedef struct apr_reslist_t apr_reslist_t; + +typedef const char *conn_id; + +typedef struct dbi_config_struct +{ + const char name; + dbi_config_rec rec; + apr_reslist_t *pool; +} dbi_config; + + +dbi_conn *dbipool_open(conn_id* id); + +void dbipool_close(conn_id* id, dbi_conn* conn); + + +#endif |
From: <fir...@us...> - 2004-03-02 09:29:14
|
Update of /cvsroot/mod-auth/mod_auth_webspace/htdocs/docs/mod_authn_dbi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8013/mod_auth_webspace/htdocs/docs/mod_authn_dbi Modified Files: index.xml Log Message: add an extra note on the 'A1 Hash'. Index: index.xml =================================================================== RCS file: /cvsroot/mod-auth/mod_auth_webspace/htdocs/docs/mod_authn_dbi/index.xml,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- index.xml 25 Feb 2004 21:49:10 -0000 1.14 +++ index.xml 2 Mar 2004 09:09:30 -0000 1.15 @@ -661,7 +661,9 @@ <li><code>AprDigest</code> <p> The Passwords are in Digest MD5-like format, like - they are used by the <code>htdigest</code> utility of Apache. + they are used by the <code>htdigest</code> utility of Apache. This format is also called the 'A1 Hash' + in the <a href="http://www.faqs.org/rfcs/rfc2617.html">Digest Authentication RFC</a>. The value in the database + is a MD5 hash of 'username:realm:password'. <br /><br /> An example for a password in Digest format: |
From: <fir...@us...> - 2004-03-02 09:29:14
|
Update of /cvsroot/mod-auth/mod_authn_dbi/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8013/mod_authn_dbi/src Modified Files: mod_authn_dbi.c Log Message: add an extra note on the 'A1 Hash'. Index: mod_authn_dbi.c =================================================================== RCS file: /cvsroot/mod-auth/mod_authn_dbi/src/mod_authn_dbi.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- mod_authn_dbi.c 16 Feb 2004 14:12:13 -0000 1.18 +++ mod_authn_dbi.c 2 Mar 2004 09:09:30 -0000 1.19 @@ -84,7 +84,7 @@ { plain, apr, /* handles crypt, sha1 & md5 through apr_password_validate() */ - aprdig + aprdig /* Also known as A1 Hashed Passwords in RFC 2617 -- MD5('user:realm:password') */ /* * Possible other formats to consider: * pw_mysql |
From: <fir...@us...> - 2004-03-02 09:01:21
|
Update of /cvsroot/mod-auth/mod_authn_pop3/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3457/src Modified Files: mod_authn_pop3.c Log Message: added changelog tool and ASL 2.0 for authn_pop3 Index: mod_authn_pop3.c =================================================================== RCS file: /cvsroot/mod-auth/mod_authn_pop3/src/mod_authn_pop3.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- mod_authn_pop3.c 11 Nov 2003 06:16:48 -0000 1.4 +++ mod_authn_pop3.c 2 Mar 2004 08:41:51 -0000 1.5 @@ -1,75 +1,25 @@ /* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2000-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact ap...@ap.... + * Copyright 2003-2004 Paul Querna and Axel Grossklaus * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== + * http://www.apache.org/licenses/LICENSE-2.0 * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * <http://www.apache.org/>. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Portions of this software are based upon public domain software - * originally written at the National Center for Supercomputing Applications, - * University of Illinois, Urbana-Champaign. */ -/* - * http_auth: authentication - * - * Rob McCool & Brian Behlendorf. - * - * Adapted to Apache by rst. +/** + * Apache 2.1 POP3 Authentication Module * - * dirkx - Added Authoritative control to allow passing on to lower - * modules if and only if the userid is not known to this - * module. A known user with a faulty or absent password still - * causes an AuthRequired. The default is 'Authoritative', i.e. - * no control is passed along. + * Special Thanks to Ian Holsman for giving the basis of this module. * - * ianh - modified to use pop for authentication */ #define APR_WANT_STRFUNC @@ -86,8 +36,8 @@ typedef struct { - char *serverhostname; - int port; + char *server_host; + int server_port; apr_interval_time_t timeout; } pop_auth_config_rec; @@ -95,8 +45,8 @@ { pop_auth_config_rec *conf = apr_palloc(p, sizeof(*conf)); - conf->serverhostname = NULL; - conf->port = 110; + conf->server_host = NULL; + conf->server_port = 110; conf->timeout = apr_time_from_sec(5); return conf; @@ -107,7 +57,7 @@ { pop_auth_config_rec *conf = dir_config; - conf->serverhostname = apr_pstrdup(cmd->pool, arg); + conf->server_host = apr_pstrdup(cmd->pool, arg); return NULL; } @@ -116,7 +66,7 @@ { pop_auth_config_rec *conf = dir_config; - conf->port = atoi(arg); + conf->server_port = atoi(arg); return NULL; } @@ -293,6 +243,7 @@ return AUTH_GRANTED; } + // XXXX: Should we return User Not Found? return AUTH_DENIED; } @@ -300,8 +251,9 @@ static authn_status get_pop3_realm_hash(request_rec * r, const char *user, const char *realm, char **rethash) { + //XXXX: Make this work :) ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, - "[mod_authn_pop3.c] - Digest Authentication with authn_pop3 is not possible"); + "[mod_authn_pop3.c] - Digest Authentication with authn_pop3 is not implmented"); return AUTH_DENIED; } |
From: <fir...@us...> - 2004-03-02 09:01:21
|
Update of /cvsroot/mod-auth/mod_authn_pop3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3457 Modified Files: ChangeLog Added Files: udcl.sh Log Message: added changelog tool and ASL 2.0 for authn_pop3 --- NEW FILE: udcl.sh --- #!/bin/sh # define $EDITOR and EDITOR_FLAGS in your environment to customize this CL="ChangeLog" DSTR=`date +%d.%m.%Y` DSTR2=`date +%H:%M\ \(%Z\)` TF="ferite-changelog-entry-"$USER if test -z $EDITOR; then EDITOR="nano" EDITOR_FLAGS="+" fi export UNAME=$USER; if test $USER="chip"; then export UNAME="firechipmunk" fi echo "--------------------------------------------------------------------------------------------------------" > $TF echo "$DSTR $DSTR2, $UNAME" >> $TF echo >> $TF echo >> $TF $EDITOR $EDITOR_FLAGS $TF echo "" >> $TF cat $CL >> $TF rm $CL if test -f $TF"~"; then rm $TF"~" fi mv $TF $CL Index: ChangeLog =================================================================== RCS file: /cvsroot/mod-auth/mod_authn_pop3/ChangeLog,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ChangeLog 11 Nov 2003 02:57:31 -0000 1.1 +++ ChangeLog 2 Mar 2004 08:41:51 -0000 1.2 @@ -0,0 +1,6 @@ +-------------------------------------------------------------------------------------------------------- +02.03.2004 01:47 (MST), firechipmunk + - ASL 2.0 + - Removed unneeded files. + + |
From: <fir...@us...> - 2004-03-02 08:54:12
|
Update of /cvsroot/mod-auth/mod_authn_pop3/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2250/src Modified Files: Makefile.am Log Message: make this thing a real project. Index: Makefile.am =================================================================== RCS file: /cvsroot/mod-auth/mod_authn_pop3/src/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Makefile.am 11 Nov 2003 02:57:31 -0000 1.1 +++ Makefile.am 2 Mar 2004 08:34:42 -0000 1.2 @@ -7,15 +7,15 @@ make_so: @if test ! -L mod_authn_pop3.so ; then ln -s .libs/libmod_authn_pop3.so mod_authn_pop3.so ; fi -install: - $(INSTALL) -m 644 .libs/libmod_authn_pop3.so $(LIBEXECDIR)/mod_authn_pop3.so +install: make_so + @${APXS} -i -a -n authn_pop3 mod_authn_dbi.so @echo "" @echo "" @echo "***********************************************" @echo "" @echo " Please read the documentation at " - @echo " http://mod-auth.sourceforge.net/docs/ for " - @echo " details on configuration of this module " + @echo " http://mod-auth.sourceforge.net/docs/authn_pop3 " + @echo " for details on configuration of this module " @echo "" @echo "***********************************************" @echo "" |
From: <fir...@us...> - 2004-03-02 08:54:12
|
Update of /cvsroot/mod-auth/mod_authn_pop3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2250 Modified Files: AUTHORS COPYING README configure.in Removed Files: NEWS libtool Log Message: make this thing a real project. Index: AUTHORS =================================================================== RCS file: /cvsroot/mod-auth/mod_authn_pop3/AUTHORS,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- AUTHORS 11 Nov 2003 02:57:31 -0000 1.1 +++ AUTHORS 2 Mar 2004 08:34:42 -0000 1.2 @@ -1 +1,2 @@ -Paul Querna + +Paul Querna <ch...@fo...> Index: COPYING =================================================================== RCS file: /cvsroot/mod-auth/mod_authn_pop3/COPYING,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- COPYING 11 Nov 2003 02:57:31 -0000 1.1 +++ COPYING 2 Mar 2004 08:34:42 -0000 1.2 @@ -1,55 +1,202 @@ -The Apache Software License, Version 1.1 + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ -Copyright (c) 2000 The Apache Software Foundation. All rights -reserved. + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: + 1. Definitions. -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. -3. The end-user documentation included with the redistribution, - if any, must include the following acknowledgment: - "This product includes software developed by the - Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, - if and wherever such third-party acknowledgments normally appear. + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. -4. The names "Apache" and "Apache Software Foundation" must - not be used to endorse or promote products derived from this - software without prior written permission. For written - permission, please contact ap...@ap.... + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. -5. Products derived from this software may not be called "Apache", - nor may "Apache" appear in their name, without prior written - permission of the Apache Software Foundation. + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. -THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR -ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. -==================================================================== + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. -This software consists of voluntary contributions made by many -individuals on behalf of the Apache Software Foundation. For more -information on the Apache Software Foundation, please see -<http://www.apache.org/>. + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. -Portions of this software are based upon public domain software -originally written at the National Center for Supercomputing Applications, -University of Illinois, Urbana-Champaign. Index: README =================================================================== RCS file: /cvsroot/mod-auth/mod_authn_pop3/README,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- README 11 Nov 2003 02:57:31 -0000 1.1 +++ README 2 Mar 2004 08:34:42 -0000 1.2 @@ -0,0 +1 @@ +Read the Source Code for now. Index: configure.in =================================================================== RCS file: /cvsroot/mod-auth/mod_authn_pop3/configure.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- configure.in 11 Nov 2003 02:57:31 -0000 1.1 +++ configure.in 2 Mar 2004 08:34:42 -0000 1.2 @@ -1,11 +1,9 @@ - AC_INIT(src/mod_authn_pop3.c) AM_MAINTAINER_MODE -AM_INIT_AUTOMAKE(mod_authn_pop3, 0.0.1) +AM_INIT_AUTOMAKE(mod_authn_pop3, 0.1.0) AM_CONFIG_HEADER(include/mod_authn_pop3_config.h:config.in) AC_PROG_CC -AC_PROG_CPP AC_PROG_LD AC_PROG_INSTALL AM_PROG_LIBTOOL @@ -31,7 +29,7 @@ AC_MSG_CHECKING(for apxs in /usr/local/apache/sbin) if test -x /usr/local/apache/sbin/apxs; then APXS=/usr/local/apache/sbin/apxs - AC_MSG_RESULT([found, we'll use this. Use --with-apxs to specify another.]) + AC_MSG_RESULT([found, we'll use this. Use --with-apxs to specify another.]) else AC_MSG_RESULT(no) fi @@ -70,6 +68,8 @@ AC_MSG_ERROR([**** apxs was not found, DSO compilation will not be available.]) fi + + # determine LIBEXEC AC_MSG_CHECKING(for Apache libexec directory) LIBEXECDIR=`${APXS} -q LIBEXECDIR` @@ -91,6 +91,7 @@ AC_SUBST(LIBEXECDIR) AC_SUBST(AP_INCLUDES) AC_SUBST(CFLAGS) +AC_SUBST(APXS) AC_OUTPUT(Makefile src/Makefile) @@ -100,8 +101,3 @@ echo " * Apache modules directory = $LIBEXECDIR" echo "" echo "---" - -echo "****" -echo " If you have problems with libtool try this:" -echo " export SED=sed" -echo "****" --- NEWS DELETED --- --- libtool DELETED --- |
From: <fir...@us...> - 2004-03-02 08:46:48
|
Update of /cvsroot/mod-auth/mod_authn_pop3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1119 Modified Files: autogen.sh Removed Files: aclocal.m4 depcomp install-sh ltconfig ltmain.sh missing Log Message: remove autocrap thats not needed. Index: autogen.sh =================================================================== RCS file: /cvsroot/mod-auth/mod_authn_pop3/autogen.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- autogen.sh 11 Nov 2003 03:26:48 -0000 1.1 +++ autogen.sh 2 Mar 2004 08:27:15 -0000 1.2 @@ -1,19 +1,13 @@ #!/bin/sh # autogen.sh - generates configure using the autotools # $Id$ -#libtoolize --force --copy -libtoolize14 --force --copy -#aclocal +libtoolize --force --copy +#libtoolize14 --force --copy +aclocal autoheader -automake --add-missing - -echo -echo "Using `autoconf --version`, if you have problems" -echo "while building then edit autogen.sh and rerun it..." -echo -#autoconf +touch NEWS +automake --add-missing --copy +rm NEWS +autoconf +rm -rf autom4te.cache -## autoconf 2.53 will not work, at least on FreeBSD. Change the following -## line appropriately to call autoconf 2.13 instead. This one works for -## FreeBSD 4.7: -autoconf213 --- aclocal.m4 DELETED --- --- depcomp DELETED --- --- install-sh DELETED --- --- ltconfig DELETED --- --- ltmain.sh DELETED --- --- missing DELETED --- |
From: <fir...@us...> - 2004-03-02 06:04:37
|
Update of /cvsroot/mod-auth/mod_auth_webspace/htdocs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7726 Modified Files: index.xml Log Message: fixed date. Index: index.xml =================================================================== RCS file: /cvsroot/mod-auth/mod_auth_webspace/htdocs/index.xml,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- index.xml 2 Mar 2004 05:39:32 -0000 1.14 +++ index.xml 2 Mar 2004 05:45:13 -0000 1.15 @@ -13,11 +13,11 @@ <section id="News"> <title>News</title> <section id="release_dbi_0_9_0"> - <title>11/10/2003 - mod_authn_dbi 0.9.0 is released</title> + <title>3/1/2004 - mod_authn_dbi 0.9.0 is released</title> <p> - The 0.9.0 Release of mod_authn_dbi is a major release. It adds new SQL keywords, fixes a crash which could occur when the database server was down, moves native SHA1 support to APR, and fixes several possible security bugs. The 0.9.0 release is the first to be under the Apache Software License 2.0. All users are recommended to upgrade. + The 0.9.0 Release of <code>mod_authn_dbi</code> is a major release. It adds new SQL keywords, fixes a crash which could occur when the database server was down, moves native SHA1 support to APR, and fixes several possible security bugs. The 0.9.0 release is the first to be under the Apache Software License 2.0. All users are recommended to upgrade. <br/> - <a href="http://sourceforge.net/project/showfiles.php?group_id=93106">Download from SourceForge</a> + <a href="http://sourceforge.net/project/showfiles.php?group_id=93106">Download from SourceForge</a><br/> If you have any problems or questions with <code>mod_authn_dbi</code> please use the <a href='http://lists.sourceforge.net/lists/listinfo/mod-auth-users'>mod-auth-users</a> mailing list. <br/> |