From: Martin Kraemer Date: Wed, 4 Sep 2002 14:29:13 +0000 (+0000) Subject: Add support for Berkeley-DB/4.x to mod_auth_db.c X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7b27bfccb1b16d3bf204779433581e518c4d56a;p=thirdparty%2Fapache%2Fhttpd.git Add support for Berkeley-DB/4.x to mod_auth_db.c git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@96633 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/CHANGES b/src/CHANGES index 2171161912a..e6e5c67c2ba 100644 --- a/src/CHANGES +++ b/src/CHANGES @@ -1,5 +1,8 @@ Changes with Apache 1.3.27 + *) Added support for Berkeley-DB/4.x to mod_auth_db. + [Martin Kraemer] + *) PR 10993: add image/x-icon to default httpd.conf files [Ian Holsman, Peter Bieringer diff --git a/src/modules/standard/mod_auth_db.c b/src/modules/standard/mod_auth_db.c index 487e51e1e6c..db4b80d59c5 100644 --- a/src/modules/standard/mod_auth_db.c +++ b/src/modules/standard/mod_auth_db.c @@ -105,6 +105,9 @@ #if (DB_VERSION_MAJOR == 3) #define DB3 #endif +#if (DB_VERSION_MAJOR == 4) +#define DB4 +#endif #endif typedef struct { @@ -167,7 +170,7 @@ static char *get_db_pw(request_rec *r, char *user, const char *auth_dbpwfile) q.data = user; q.size = strlen(q.data); -#if defined(DB3) +#if defined(DB3) || defined(DB4) if ( db_create(&f, NULL, 0) != 0 || f->open(f, auth_dbpwfile, NULL, DB_HASH, DB_RDONLY, 0664) != 0) { #elif defined(DB2) @@ -180,7 +183,7 @@ static char *get_db_pw(request_rec *r, char *user, const char *auth_dbpwfile) return NULL; } -#if defined(DB2) || defined(DB3) +#if defined(DB2) || defined(DB3) || defined(DB4) if (!((f->get) (f, NULL, &q, &d, 0))) { #else if (!((f->get) (f, &q, &d, 0))) { @@ -190,7 +193,7 @@ static char *get_db_pw(request_rec *r, char *user, const char *auth_dbpwfile) pw[d.size] = '\0'; /* Terminate the string */ } -#if defined(DB2) || defined(DB3) +#if defined(DB2) || defined(DB3) || defined(DB4) (f->close) (f, 0); #else (f->close) (f);