Skip to content

Support log reopen on SIGHUP and SIGUSR1#372

Open
fremail wants to merge 1 commit intoowasp-modsecurity:masterfrom
fremail:add/log-reopen
Open

Support log reopen on SIGHUP and SIGUSR1#372
fremail wants to merge 1 commit intoowasp-modsecurity:masterfrom
fremail:add/log-reopen

Conversation

@fremail
Copy link

@fremail fremail commented Mar 24, 2026

This PR uses new ModSecurity API implemented in owasp-modsecurity/ModSecurity#3521

The CI build fails because the ModSecurity API isn't released yet ☝️

There is another PR with a similar code -- #198 -- but its code is outdated and uses a different API. In any case this PR is based on work in #198, so thank you @brandonpayton for the initial work on that.

I've tested the code using testing notes from #198. I hope we'll see these changes released soon!

Side notes for reviewers

msc_rules_reopen_logs() only exists in rules_set.h (the newer API) — it's not available in the older rules.h at all. So the ``#ifdef MSC_USE_RULES_SET` guard is necessary. Without it the build would fail against older
libmodsecurity versions that don't have this function.

Links

This PR depends on code from owasp-modsecurity/ModSecurity#3521
Resolves #121
Similar PR #198

`msc_rules_reopen_logs()` only exists in rules_set.h (the newer API) — it's not available in the older rules.h at all. So the ``#ifdef MSC_USE_RULES_SET` guard is necessary here; without it, the build would fail against older
  libmodsecurity versions that don't have this function.
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

reopen audit log on SIGUSR1 and SIGHUP

1 participant