HomeFreeBSD

syslogd: Open forwarding socket descriptors

Description

syslogd: Open forwarding socket descriptors

Previously, when forwarding a message to a remote address, the target's
addrinfo was saved at config-parse-time. When message-deliver-time came,
the message's addrinfo was passed into sendmsg(2) and delivered by the
first available inet socket.

Passing an addrinfo into sendmsg(2) is prohibited in Capsicum capability
mode, so sockets are now opened and connected to their remote peers at
config-parse-time when executing outside of the capability sandbox.

These connected socket descriptors are saved and passed into sendmsg(2),
allowing forwarding to be performed inside of the capability sandbox.

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D47104

Details

Provenance
jfreeAuthored on Wed, Nov 27, 10:26 PM
Reviewer
markj
Differential Revision
D47104: syslogd: Open forwarding socket descriptors
Parents
rGd2d180fb7736: syslogd: Watch for dead pipe processes
Branches
Unknown
Tags
Unknown