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

init: use pledge(2) after suricata initialization. #3742

Closed
wants to merge 1 commit into from

Conversation

eroullit
Copy link

Link to redmine ticket:
https://redmine.openinfosecfoundation.org/issues/2895

Describe changes:

pledge(2) can be used on OpenBSD to restrict suricata possible
operation on the system once initialization is completed.
The process promises to only make use of:

  • stdio to allow read(2) on IPS rules and write(2) on log file
  • rpath wpath cpath to allow log rotation and rule reload
  • unix to operate the control unix socket and log unix sockets
  • dns to retrieve DNS from recvfrom(2)/sento(2) in IPFW mode
  • bpf as suricata uses libpcap, which uses the BIOCGSTATS operation

PRScript output (if applicable): N/A

pledge(2) can be used on OpenBSD to restrict suricata possible
operation on the system once initialization is completed.
The process promises to only make use of:
- "stdio" to allow read(2) on IPS rules and write(2) on log file
- "rpath wpath cpath" to allow log rotation
- "unix" to operate the control unix socket and log unix sockets
- "dns" to retrieve DNS from recvfrom(2)/sento(2) in IPFW mode
- "bpf" as suricata uses libpcap, which uses the BIOCGSTATS operation

Signed-off-by: Emmanuel Roullit <emmanuel.roullit@cognitix.de>
@eroullit eroullit requested a review from a team as a code owner March 22, 2019 13:16
@victorjulien victorjulien mentioned this pull request Apr 8, 2019
@victorjulien
Copy link
Member

Merged through #3783, thanks Emmanuel!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants