syslogd: Refactor internals to use new socket API

This patch is inspired, in part, by FreeBSD syslogd but now diverges
onto its own path.  Special handling for AF_UNIX sockets are required
on Linux, which unlike BSD cannot use getaddrinfo() on UNIX sockets.

- Rip out old funix[] and finet support
- Add new concept of peers
- Linked list of peers can be > 20
- Temporarily open up to accept all remote conns
- Remove old logerror(), replaced with new log macros

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2019-11-12 09:24:26 +01:00
parent 07677c78a5
commit 4ee6211277
4 changed files with 177 additions and 364 deletions

View File

@@ -17,7 +17,7 @@ EOF
cat <<EOF > ${CONFD}/bar.conf
# For remote logging
*.* @127.0.0.2
*.* @127.0.0.2:${PORT}
EOF
../src/syslogd -b :${PORT} -d -n -f ${CONF} -p ${SOCK} -p ${ALTSOCK} &