HomeFreeBSD

syslogd: Only use peerlist during flag parsing

Description

syslogd: Only use peerlist during flag parsing

Add logging sockets directly to the socklist, unless parsing flags. The
peerlist is still needed to temporarily hold socket information until
the configuration flags have been parsed.

It is tempting to remove the entire peerlist, but addsock() can not
determine if syslogd is in secure mode unless the flags have been
parsed.

Also, call pidfile_open() right after flag parsing so we can terminate
if another syslogd instance is already running.

Reviewed by: markj
MFC after: 3 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D41364

Details

Provenance
jfreeAuthored on Sep 1 2023, 2:49 AM
markjCommitted on Sep 28 2023, 3:51 PM
Reviewer
markj
Differential Revision
D41364: syslogd: Only use peerlist during flag parsing
Parents
rG1bb61348e69e: syslogd: Use boolean reload parameter for init()
Branches
Unknown
Tags
Unknown