]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Backport r1133152, r1133158:
authorStefan Fritsch <sf@apache.org>
Mon, 5 Sep 2011 18:45:29 +0000 (18:45 +0000)
committerStefan Fritsch <sf@apache.org>
Mon, 5 Sep 2011 18:45:29 +0000 (18:45 +0000)
Fix segfault and log proper error message if apr DBM driver cannot be loaded.

PR: 51751
Reviewed by: sf, trawick, rpluem

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@1165381 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
modules/dav/fs/dbm.c

diff --git a/CHANGES b/CHANGES
index eef43a7eb52b3b96d6f3b8d78ac275ca3ad89482..2f9df1eb7a81b8c6895b03ec52cae67922b1b490 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,13 +1,16 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.2.21
 
+  *) mod_dav_fs: Fix segfault if apr DBM driver cannot be loaded. PR 51751.
+     [Stefan Fritsch]
+
   *) mod_alias: Adjust log severity of "incomplete redirection target"
      message. PR 44020.
 
- *) mod_rewrite: Check validity of each internal (int:) RewriteMap even if the
-    RewriteEngine is disabled in server context, avoiding a crash while
-    referencing the invalid int: map at runtime. PR 50994.
-    [Ben Noordhuis <info noordhuis nl>]
 *) mod_rewrite: Check validity of each internal (int:) RewriteMap even if the
+     RewriteEngine is disabled in server context, avoiding a crash while
+     referencing the invalid int: map at runtime. PR 50994.
+     [Ben Noordhuis <info noordhuis nl>]
 
   *) core: Add MaxRanges directive to control the number of ranges permitted
      before returning the entire resource, with a default limit of 200.
diff --git a/STATUS b/STATUS
index e55d1abefb6b85b79d8f8e9dfec08d5c1e805f33..6398e3f5b484e80d93b6650f9bfd1b89a43fb03e 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -93,13 +93,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  * mod_dav_fs: Fix segfault and log proper error message if apr DBM driver
-    cannot be loaded. PR 51751
-    Trunk patch: http://svn.apache.org/viewvc?rev=1133152&view=rev
-                 http://svn.apache.org/viewvc?rev=1133158&view=rev
-    2.2.x patch: http://people.apache.org/~sf/PR51751.diff
-    +1: sf, trawick, rpluem
-
  PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
 
index aac5669e2908b6b85fbed0f4425b073df33b92ea..751a82bfdbc9028283e2cef138e6d958223b3133 100644 (file)
@@ -39,6 +39,7 @@
 
 #include "mod_dav.h"
 #include "repos.h"
+#include "http_log.h"
 
 
 struct dav_db {
@@ -94,6 +95,9 @@ static dav_error * dav_fs_dbm_error(dav_db *db, apr_pool_t *p,
     if (db == NULL) {
         errcode = 1;
         errstr = "Could not open property database.";
+        if (APR_STATUS_IS_EDSOOPEN(status))
+            ap_log_error(APLOG_MARK, APLOG_CRIT, status, NULL,
+                         "The DBM driver could not be loaded");
     }
     else {
         (void) apr_dbm_geterror(db->file, &errcode, errbuf, sizeof(errbuf));
@@ -124,7 +128,7 @@ dav_error * dav_dbm_open_direct(apr_pool_t *p, const char *pathname, int ro,
                                 dav_db **pdb)
 {
     apr_status_t status;
-    apr_dbm_t *file;
+    apr_dbm_t *file = NULL;
 
     *pdb = NULL;