Support log reopen on SIGHUP and SIGUSR1#372
Open
fremail wants to merge 1 commit intoowasp-modsecurity:masterfrom
Open
Support log reopen on SIGHUP and SIGUSR1#372fremail wants to merge 1 commit intoowasp-modsecurity:masterfrom
fremail wants to merge 1 commit intoowasp-modsecurity:masterfrom
Conversation
`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.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



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 olderlibmodsecurity versions that don't have this function.
Links
This PR depends on code from owasp-modsecurity/ModSecurity#3521
Resolves #121
Similar PR #198