]> granicus.if.org Git - apache/commitdiff
mod_auth_digest now respects DefaultRuntimeDir
authorJeff Trawick <trawick@apache.org>
Thu, 9 Aug 2012 19:08:23 +0000 (19:08 +0000)
committerJeff Trawick <trawick@apache.org>
Thu, 9 Aug 2012 19:08:23 +0000 (19:08 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1371387 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/aaa/mod_auth_digest.c

diff --git a/CHANGES b/CHANGES
index 51c8b9b49a3a2d65699a11c4231f4fee134391fd..bdc2194e3e94985b7bf14875442e7bfb1f64f593 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -27,6 +27,7 @@ Changes with Apache 2.5.0
      - APIs: ap_log_pid(), ap_remove_pid, ap_read_pid()
      - core: the scoreboard (ScoreBoardFile), pid file (PidFile), and
        mutexes (Mutex)
+     - mod_auth_digest: shared memory file
      - mod_lbmethod_heartbeat, mod_heartmonitor: heartbeat storage file
      - mod_socache_shmcb, mod_socache_dbm: shared memory or dbm for cache
      [Jeff Trawick]
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,