]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* mod_slotmem_shm: Use ap_os_is_path_absolute() to make it portable.
authorJean-Frederic Clere <jfclere@apache.org>
Wed, 14 Feb 2024 14:27:03 +0000 (14:27 +0000)
committerJean-Frederic Clere <jfclere@apache.org>
Wed, 14 Feb 2024 14:27:03 +0000 (14:27 +0000)
Reviewed by: jfclere, jorton, covener

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

changes-entries/mod_slotmem_shm.txt [new file with mode: 0644]
modules/slotmem/mod_slotmem_shm.c

diff --git a/changes-entries/mod_slotmem_shm.txt b/changes-entries/mod_slotmem_shm.txt
new file mode 100644 (file)
index 0000000..767711f
--- /dev/null
@@ -0,0 +1,3 @@
+   *) mod_slotmem_shm: Use ap_os_is_path_absolute() to make it portable.
+      [Jean-Frederic Clere]
+
index f4eaa84c33f1dd4e2bdbf003933371230513ac02..4d14faf36b4ac84dca1bba4a094221a7c1dcd651 100644 (file)
@@ -92,7 +92,7 @@ static int slotmem_filenames(apr_pool_t *pool,
     const char *fname = NULL, *pname = NULL;
 
     if (slotname && *slotname && strcasecmp(slotname, "none") != 0) {
-        if (slotname[0] != '/') {
+        if (!ap_os_is_path_absolute(pool, slotname)) {
             /* Each generation needs its own file name. */
             int generation = 0;
             ap_mpm_query(AP_MPMQ_GENERATION, &generation);
@@ -109,7 +109,7 @@ static int slotmem_filenames(apr_pool_t *pool,
 
         if (persistname) {
             /* Persisted file names are immutable... */
-            if (slotname[0] != '/') {
+            if (!ap_os_is_path_absolute(pool, slotname)) {
                 pname = apr_pstrcat(pool, DEFAULT_SLOTMEM_PREFIX,
                                     slotname, DEFAULT_SLOTMEM_SUFFIX,
                                     DEFAULT_SLOTMEM_PERSIST_SUFFIX,