HomeFreeBSD

sysutils/rsyslog8: patch for forking issue due to close_range() call

Description

sysutils/rsyslog8: patch for forking issue due to close_range() call

Add patch from upstream:

https://github.com/rsyslog/rsyslog/commit/599b5c7524b76cfc73245206fcce1e2b4d955f21

After fork if the child process uses close_range to close open file
descriptors it has no way to exempt the parentPipeFD causing a failure
to signal successful startup to the parent process. This causes
failures on all systems that aren't Linux that implement close_range.

  1. Loop through file descriptors between beginClose and MAX(parentPipeFD,dbgGetDbglogFd()) making sure not to close those two file descriptors.
  1. Potentially use close_range to close all file descriptors above MAX(parentPipeFD,dbgGetDbglogFd())

PR: 274509
Reported by: Helmut Ritter
Obtained from: https://github.com/rsyslog/rsyslog/pull/5254

Details

Provenance
Nathan Huff <nhuff@acm.org>Authored on Oct 24 2023, 9:04 PM
matthewCommitted on Oct 24 2023, 9:08 PM
Parents
R11:14dfdd508748: secutiry/trufflehog: New port: Find and verify credentials
Branches
Unknown
Tags
Unknown