]> granicus.if.org Git - apache/commitdiff
Merge r1371387 from trunk:
authorJim Jagielski <jim@apache.org>
Tue, 14 Aug 2012 20:50:44 +0000 (20:50 +0000)
committerJim Jagielski <jim@apache.org>
Tue, 14 Aug 2012 20:50:44 +0000 (20:50 +0000)
mod_auth_digest now respects DefaultRuntimeDir
Submitted by: trawick
Reviewed/backported by: jim

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

CHANGES
STATUS
modules/aaa/mod_auth_digest.c

diff --git a/CHANGES b/CHANGES
index c63ff2ed40c0fad1c164eb010a6b8478d7c2a68a..2f7cba3cf501aaf647bef24a790b4c01e4a2265d 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -7,6 +7,10 @@ Changes with Apache 2.4.3
      possible XSS for a site where untrusted users can upload files to
      a location with MultiViews enabled. [Niels Heinen <heinenn google.com>]
 
+  *) The following now respect DefaultRuntimeDir/DEFAULT_REL_RUNTIMEDIR:
+     - mod_auth_digest: shared memory file
+     [Jeff Trawick]
+
   *) htpasswd: Use correct file mode for checking if file is writable.
      PR 45923. [Stefan Fritsch]
 
@@ -66,7 +70,9 @@ Changes with Apache 2.4.3
 
   *) Add "strict" and "warnings" pragmas to Perl scripts.  [Rich Bowen]
 
-  *) Honor DefaultRuntimeDir for mutexes, socache and CGID socket.
+  *) The following now respect DefaultRuntimeDir/DEFAULT_REL_RUNTIMEDIR:
+     - core: the scoreboard (ScoreBoardFile), pid file (PidFile), and
+       mutexes (Mutex)
      [Jim Jagielski]
 
   *) ab: Fix bind() errors.  [Joe Orton]
diff --git a/STATUS b/STATUS
index 7f63528114c4e633a8a5c0818632b87e70b70d94..9aa1cdea6f9112eb19fb79fa3f5f99bbd58fdfa5 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -93,12 +93,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
      2.4.x patch: trunk patch works
      +1: rjung, humbedooh, trawick (needs CHANGES entry)
 
-   * mod_auth_digest: respect DefaultRuntimeDir for its
-                      unconfigurable shared memory file
-     trunk patch: http://svn.apache.org/viewvc?rev=1371387&view=rev
-     2.4.x patch: trunk patch works
-     +1: trawick, rjung, jim
-
    * ab fixes:
      o When -B is specified, search for a host address in the same
        family as the specified outbound interface.
index 460619b0a32f48d8d926901d75797c760a386d52..65183160335ce0cb93876133d1888ea0ba87fc3b 100644 (file)
@@ -267,26 +267,17 @@ static int initialize_tables(server_rec *s, apr_pool_t *ctx)
 {
     unsigned long idx;
     apr_status_t   sts;
-    const char *tempdir;
 
     /* set up client list */
 
-    sts = apr_temp_dir_get(&tempdir, ctx);
-    if (APR_SUCCESS != sts) {
-        ap_log_error(APLOG_MARK, APLOG_ERR, sts, s, APLOGNO(01761)
-                     "Failed to find temporary directory");
-        log_error_and_cleanup("failed to find temp dir", sts, s);
-        return HTTP_INTERNAL_SERVER_ERROR;
-    }
-
     /* Create the shared memory segment */
 
     /*
      * Create a unique filename using our pid. This information is
      * stashed in the global variable so the children inherit it.
      */
-    client_shm_filename = apr_psprintf(ctx, "%s/authdigest_shm.%"APR_PID_T_FMT, tempdir,
-                                       getpid());
+    client_shm_filename = ap_runtime_dir_relative(ctx, "authdigest_shm");
+    client_shm_filename = ap_append_pid(ctx, client_shm_filename, ".");
 
     /* Now create that segment */
     sts = apr_shm_create(&client_shm, shmem_size,