Skip to content

Commit 32881a7

Browse files
committed
* mod_slotmem_shm: Use ap_os_is_path_absolute() to make it portable.
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
1 parent 83fc00b commit 32881a7

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

changes-entries/mod_slotmem_shm.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*) mod_slotmem_shm: Use ap_os_is_path_absolute() to make it portable.
2+
[Jean-Frederic Clere]
3+

modules/slotmem/mod_slotmem_shm.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ static int slotmem_filenames(apr_pool_t *pool,
9292
const char *fname = NULL, *pname = NULL;
9393

9494
if (slotname && *slotname && strcasecmp(slotname, "none") != 0) {
95-
if (slotname[0] != '/') {
95+
if (!ap_os_is_path_absolute(pool, slotname)) {
9696
/* Each generation needs its own file name. */
9797
int generation = 0;
9898
ap_mpm_query(AP_MPMQ_GENERATION, &generation);
@@ -109,7 +109,7 @@ static int slotmem_filenames(apr_pool_t *pool,
109109

110110
if (persistname) {
111111
/* Persisted file names are immutable... */
112-
if (slotname[0] != '/') {
112+
if (!ap_os_is_path_absolute(pool, slotname)) {
113113
pname = apr_pstrcat(pool, DEFAULT_SLOTMEM_PREFIX,
114114
slotname, DEFAULT_SLOTMEM_SUFFIX,
115115
DEFAULT_SLOTMEM_PERSIST_SUFFIX,

0 commit comments

Comments
 (0)