]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Add support for Berkeley-DB/4.x to mod_auth_db.c
authorMartin Kraemer <martin@apache.org>
Wed, 4 Sep 2002 14:29:13 +0000 (14:29 +0000)
committerMartin Kraemer <martin@apache.org>
Wed, 4 Sep 2002 14:29:13 +0000 (14:29 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@96633 13f79535-47bb-0310-9956-ffa450edef68

src/CHANGES
src/modules/standard/mod_auth_db.c

index 2171161912aeb3f741964dc4195cdb05d3f124dd..e6e5c67c2baae5e29841e209fced04f19e79a2b2 100644 (file)
@@ -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 <pb@bieringer.de>
 
index 487e51e1e6cc18943de71833a99662997fb36ffe..db4b80d59c5ce4f04458742a8a6bc148d0149716 100644 (file)
 #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);