]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
syslogd: Stop trying to send remote messages through special sockets
authorbdrewery <bdrewery@FreeBSD.org>
Sat, 7 Nov 2020 17:18:44 +0000 (17:18 +0000)
committerbdrewery <bdrewery@FreeBSD.org>
Sat, 7 Nov 2020 17:18:44 +0000 (17:18 +0000)
commit258a45da7fc5f4e9163b30365fa36c74c08f8d84
treee4fa514a8d14c2b11aae1a733231e8d23131f21e
parent6c9d29a557f09938a284bffc37f6a198b703a92f
syslogd: Stop trying to send remote messages through special sockets

Specifically this was causing the /dev/klog fd and the signal pipe
handling fd to get a sendmsg(2) called on them and always returned
[ENOTSOCK].

r310350 combined these sockets into the main socket list and properly
skipped AF_UNSPEC at the sendmsg(2) call but later in r344739 it was
broken such that these special sockets were no longer excluded since
the AF_UNSPEC check specifically excluded these special sockets. Only
these special sockets have sl_sa = NULL. The sl_family checks should
be redundant now but are left in case of future changes so the intent
is clearer.

MFC after: 2 weeks
usr.sbin/syslogd/syslogd.c