freebsd-dev/usr.sbin/newsyslog
Eugene Grosbein 01cf0a1724 newsyslog(8): make configuration parser more robust.
Currently newsyslog supports <include> directive that is used
in our default /etc/newsyslog.conf in the following form:

<include> /usr/local/etc/newsyslog.conf.d/*

While this is suitable for ports installing their own rules
for logs rotation, this also makes newsyslog break entire
processing of all files if it encounters single line it cannot parse.
This includes lines referring to nonexistent username/group for log
ownership, so newsyslog stops calling errx() function in the parser.

With this fix, newsyslog uses warnx() instead of errx() in such cases
to print a warning, recover gracefully and continue with execution.

Among other cases, this unbreaks initial creation of log files
having flag "C" at boot time (newsyslog -CN). This is most important
for systems having RAM-based /var file system like nanobsd(8)-based
that rely on newsyslog to bring system log files into existence.

MFC after:	1 month
2020-06-16 17:45:23 +00:00
..
newsyslog.conf.d retire amd(8) 2020-03-09 20:46:43 +00:00
tests Add regression tests for newsyslog.conf's p flag. 2020-03-24 18:16:56 +00:00
extern.h
Makefile Move all the newsyslog related configs to usr.sbin/newsyslog/ 2018-08-12 13:24:53 +00:00
Makefile.depend
newsyslog.8 newsyslog.conf: Restrict included files in default config to [!.]*.conf 2018-11-10 10:46:38 +00:00
newsyslog.c newsyslog(8): make configuration parser more robust. 2020-06-16 17:45:23 +00:00
newsyslog.conf Use correct filename in newsyslog.conf 2019-09-17 20:05:06 +00:00
newsyslog.conf.5 newsyslog(8): Reject configurations that specify setuid or executable logs 2018-08-21 23:12:46 +00:00
pathnames.h
ptimes.c newsyslog: Add fallthrough comments to appease Coverity. 2020-03-24 18:17:10 +00:00