Skip to content

Fix apr_global_mutex_create() usage - #3269

Merged
airween merged 2 commits into
owasp-modsecurity:v2/masterfrom
marcstern:v2/pr/apr_mutex_create
Oct 3, 2024
Merged

airween merged 2 commits into
owasp-modsecurity:v2/masterfrom
marcstern:v2/pr/apr_mutex_create

Conversation

@marcstern

Copy link
Copy Markdown

Fix for #3255
We don't have to generate a temp name ourselves, it'll be done in apr_global_mutex_create(). We don't have to provide a filename, apr_global_mutex_create() generates one automatically. Moreover, under Unix & Windows, the preferred mechanism won't use a file at all. apr_file_mktemp() cannot be used as it creates the file (at least on FreeBSD). Discussion in Apache mailing list: https://lists.apache.org/thread/ykb26kg4lgcqnldvxwd9p6hv16fy4z9l

Marc Stern added 2 commits October 3, 2024 12:42
We don't have to generate a temp name ourselves, it'll be done in apr_global_mutex_create().
We don't have to provide a filename, apr_global_mutex_create() generates one automatically.
Moreover, under Unix & Windows, the preferred mechanism won't use a file at all.
apr_file_mktemp() cannot be used as it creates the file (at least on FreeBSD).
Discussion in Apache mailing list: https://lists.apache.org/thread/ykb26kg4lgcqnldvxwd9p6hv16fy4z9l
@marcstern
marcstern requested a review from airween October 3, 2024 11:00

@airween airween left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@airween
airween merged commit 1121ef0 into owasp-modsecurity:v2/master Oct 3, 2024
@marcstern
marcstern deleted the v2/pr/apr_mutex_create branch October 3, 2024 14:50
@marcstern
marcstern restored the v2/pr/apr_mutex_create branch October 22, 2024 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants