Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Allow inline comments in clamd.conf #1308

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

userwiths
Copy link
Contributor

This PR attempts to resolve the issue mentioned in #1175

  1. Regex has been changed in order to allow matching a given line even if it has a comment (separated with space or not) from the main expression.
  2. When passing through an argument, check if it contains the comment character # and if it does, try to get the content on its left side.

Thoughts:

  1. I have some doubts strtok is the best choice.
  2. Another approach, better imo, would be to get the first match from the regex expression. I failed to find an example in the project where cli_regexec returns the made matches (most likely in the 4th argument, but it seems its used mostly with NULL through out the project).

@micahsnyder
Copy link
Contributor

Thanks for the PR! I will try to review this after we have things lined up to publish 1.4.0, or after 1.4.0 ships.

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.

2 participants