httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1416583 - in /httpd/httpd/branches/2.4.x: ./ CHANGES STATUS docs/manual/ docs/manual/mod/ modules/session/mod_session_dbd.c
Date Mon, 03 Dec 2012 16:35:53 GMT
Author: jim
Date: Mon Dec  3 16:35:52 2012
New Revision: 1416583

URL: http://svn.apache.org/viewvc?rev=1416583&view=rev
Log:
Merge r1408958, r1408961, r1409170 from trunk:

mod_session_dbd: fix a segmentation fault in the function dbd_remove.
The segmentation fault is caused by an uninitialized function pointer session_dbd_acquire_fn.
PR 53452

formatting: space vs tab

Axed C++ comments.

Submitted by: jailletc36, fuankg
Reviewed/backported by: jim

Modified:
    httpd/httpd/branches/2.4.x/   (props changed)
    httpd/httpd/branches/2.4.x/CHANGES
    httpd/httpd/branches/2.4.x/STATUS
    httpd/httpd/branches/2.4.x/docs/manual/   (props changed)
    httpd/httpd/branches/2.4.x/docs/manual/mod/   (props changed)
    httpd/httpd/branches/2.4.x/modules/session/mod_session_dbd.c

Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk:r1408958,1408961,1409170

Modified: httpd/httpd/branches/2.4.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/CHANGES?rev=1416583&r1=1416582&r2=1416583&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.4.x/CHANGES [utf-8] Mon Dec  3 16:35:52 2012
@@ -6,6 +6,9 @@ Changes with Apache 2.4.4
      a post-rotate program when -p is used, per the documentation.
      [Joe Orton]
 
+  *) mod_session_dbd: fix a segmentation fault in the function dbd_remove.
+    PR 53452. [<rebanerebane gmail com>, Reimo Rebane]
+
   *) core: Functions to provide server load values: ap_get_sload() and
      ap_get_loadavg(). [Jim Jagielski, Jan Kaluza <jkaluza redhat.com>,
      Jeff Trawick]

Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1416583&r1=1416582&r2=1416583&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Mon Dec  3 16:35:52 2012
@@ -97,14 +97,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
      documentation patch : http://apache-doc-fr.gryzor.com/fallbackresource_disabled_2.4_doc.patch
      +1: gryzor, covener, sf
 
-    * mod_session_dbd: fix a segmentation fault in the function dbd_remove.
-      PR 53452
-      trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1408958
-                   http://svn.apache.org/viewvc?view=revision&revision=1408961 (style
issue)
-                   http://svn.apache.org/viewvc?view=revision&revision=1409170 (style
issue)
-      2.4.x patch: http://people.apache.org/~jailletc36/backport_mod_session_dbd.patch
-      +1: jailletc36, sf, jim
-
     * mod_log_forensic: Don't log spurious "-" characters.
       trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1410954
       2.4.x patch: trunk patch works (modulo CHANGES)

Propchange: httpd/httpd/branches/2.4.x/docs/manual/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk/docs/manual:r1408958,1408961,1409170

Propchange: httpd/httpd/branches/2.4.x/docs/manual/mod/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk/docs/manual/mod:r1408958,1408961,1409170

Modified: httpd/httpd/branches/2.4.x/modules/session/mod_session_dbd.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/session/mod_session_dbd.c?rev=1416583&r1=1416582&r2=1416583&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/session/mod_session_dbd.c (original)
+++ httpd/httpd/branches/2.4.x/modules/session/mod_session_dbd.c Mon Dec  3 16:35:52 2012
@@ -333,18 +333,12 @@ static apr_status_t dbd_remove(request_r
 {
 
     apr_status_t rv;
+    ap_dbd_t *dbd;
     apr_dbd_prepared_t *statement;
     int rows = 0;
 
     session_dbd_dir_conf *conf = ap_get_module_config(r->per_dir_config,
                                                       &session_dbd_module);
-    ap_dbd_t *dbd = session_dbd_acquire_fn(r);
-    if (dbd == NULL) {
-        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01861)
-                      "failed to acquire database connection to remove "
-                      "session with key '%s'", key);
-        return APR_EGENERAL;
-    }
 
     if (conf->deletelabel == NULL) {
         ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01862)
@@ -352,15 +346,13 @@ static apr_status_t dbd_remove(request_r
         return APR_EGENERAL;
     }
 
-    statement = apr_hash_get(dbd->prepared, conf->deletelabel,
-                             APR_HASH_KEY_STRING);
-    if (statement == NULL) {
-        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01863)
-                      "prepared statement could not be found for "
-                      "SessionDBDdeletelabel with the label '%s'",
-                      conf->deletelabel);
-        return APR_EGENERAL;
+    rv = dbd_init(r, conf->deletelabel, &dbd, &statement);
+    if (rv != APR_SUCCESS) {
+        /* No need to do additional error logging here, it has already
+           been done in dbd_init if needed */
+        return rv;
     }
+
     rv = apr_dbd_pvbquery(dbd->driver, r->pool, dbd->handle, &rows, statement,
                           key, NULL);
     if (rv != APR_SUCCESS) {



Mime
View raw message