Commit Graph

671 Commits

Author SHA1 Message Date
Joachim Nilsson
864ddaeb7d man: Change formatting of log msg examples using Li instead of Cm
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-09 18:29:14 +01:00
Joachim Nilsson
06f669f32e man: Try Li instead of Ql, possibly better in HTML rendition
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-09 18:24:23 +01:00
Joachim Nilsson
af37f47f91 man: Add more whitespace to HISTORY to make it more readable
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-09 18:20:28 +01:00
Joachim Nilsson
dca20067c6 man: Try Ql for inline literal display rather than Cm
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-09 18:20:03 +01:00
Joachim Nilsson
5efd1cffd8 build: Put all GNU autotools support files in aux/
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-09 18:08:07 +01:00
Joachim Nilsson
7abb1b9137 man: Use .Os to detail project name and version
Also, by convention .Dt should always be in upper case.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-09 17:32:46 +01:00
Joachim Nilsson
49d66e43a1 Revert "Travis-CI: Disable clang temporarily for Coverity Scan run"
This reverts commit ede638e9fd.
2019-12-09 17:01:45 +01:00
Joachim Nilsson
c01636fa71 README: Add pointers to HTML versions of man pages
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-09 17:01:02 +01:00
Joachim Nilsson
91c54466fd Minor, let logger use local version of syslog.h
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-09 16:56:46 +01:00
Joachim Nilsson
e0c2d3ad0d syslogd: Only log INTERNAL_MARK every MarkInterval
Internal log messages of INTERNAL_MARK time were created every 30
seconds (TIMERINTVL) instead of every MarkInterval (default 20 min).

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-09 15:10:30 +01:00
Joachim Nilsson
7ee7df058b syslogd: Only default to log rotation on actual files
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-09 13:42:05 +01:00
Joachim Nilsson
d6b7cd6134 syslogd: Minor, factor out O_CREATE
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-09 13:41:52 +01:00
Joachim Nilsson
08b6c6fd0f man: Sync FreeBSD syslog.conf.5 man page w/ limitations in sysklogd
The FreeBSD syslogd has more priority matching features and can also
group rules per program/hostname logging.  The sysklogd project does
not yet support this, so that is removed and instead the syntax and
examples are better described.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-09 13:22:46 +01:00
Joachim Nilsson
881fd52acc man: Sync FreeBSD syslogd man page with the realities of the project
Add missing -r option for log rotation and remove -8 option, which we
don't have yet.

Add SECURITY, DEBUGGING, and SIGNALS sections and expand upon the BUGS
section a bit to link things together.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-09 13:22:46 +01:00
Joachim Nilsson
9262229cc8 syslogd: Add log format and remote port to debug listing of sinks
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-09 13:22:46 +01:00
Joachim Nilsson
ede638e9fd Travis-CI: Disable clang temporarily for Coverity Scan run
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-08 00:06:22 +01:00
Joachim Nilsson
e8a91c870a Remove last traces of klogd
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-08 00:06:12 +01:00
Joachim Nilsson
e15d789c84 Fix #9: Open kernel log pipe after daemonizing
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-07 20:58:16 +01:00
Joachim Nilsson
3462e2ba19 syslogd: Remove debug fprintf() from 6e6c0dd
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-07 20:58:16 +01:00
Joachim Nilsson
f46850b000 syslogd: Refactor backgrounding/daemonization w/ code from FreeBSD
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-07 20:58:16 +01:00
Joachim Nilsson
a3f3ed1833
Merge pull request #10 from kraj/master
Fix build on non-glibc linux systems
2019-12-07 20:09:07 +01:00
Khem Raj
d3d18505d0 include sys/types.h for off_t
Fixes
error: unknown type name 'off_t'

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-12-07 10:33:14 -08:00
Khem Raj
095052c601 Remove __BEGIN_DECLS/__END_DECLS
The __BEGIN_DECLS and __END_DECLS are internal identifiers in glibc and
are not defined in any standard. Using them fails build on musl
libc, its better to avoid them

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-12-07 10:33:14 -08:00
Joachim Nilsson
1d5c71c6d9 man: Adapt FreeBSD syslogd.8 to the flags and history of sysklogd
- Much less command line options (for now)
- Mention support for RFC3164 and RFC5424
- Add the history of the sysklogd project

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-07 12:36:14 +01:00
Joachim Nilsson
6d567764ca Update with information on new license, 3-clause BSD
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-07 11:11:23 +01:00
Joachim Nilsson
c6c696a722 Slight formatting changes for GitHub license detection
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-07 11:07:21 +01:00
Joachim Nilsson
b07393c426 Update ChangeLog with license change
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-07 11:05:02 +01:00
Joachim Nilsson
51ff440b99 Relicense project under the 3-clause BSD license
With `klogd` removed and the original man pages replaced with FreeBSD
versions, the only remaining GPL'ed material was the build system, which
the copyright owner (undersigned) agrees to change to BSD as well.
Hence, the GNU GPL could be dropped in favor of the 3-clause BSD.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-07 11:04:00 +01:00
Joachim Nilsson
899d0d28be Relicense configure.ac and Makefile.am's under 3-clause BSD
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-07 10:57:47 +01:00
Joachim Nilsson
17cf953b97 Import pristine FreeBSD versions of man pages for license change
This patch replaces the original man pages by Greg and Martin, that were
both licensed under the GNU GPL, with 3-clause BSD licensed versions of
the same man pages from FreeBSD.

- syslogd.8     FreeBSD Subversion r335862
- syslog.conf.5 FreeBSD Subversion r314436

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-07 10:49:36 +01:00
Joachim Nilsson
5780d330fd Prepare ChangeLog for the next major release of sysklogd
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-07 10:32:49 +01:00
Joachim Nilsson
ca4f4c47e4 Update README with the removal of klogd
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-07 10:31:06 +01:00
Joachim Nilsson
fd2721598b Update version information and change date for man pages
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-07 10:31:06 +01:00
Joachim Nilsson
6bb6672ebf Remove klogd from the sysklogd project
This patch removes one of the traditionally key pieces of the sysklogd
project, klogd.  Now that syslogd performs logging of kernel messages
we no longer require a separate daemon for that.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-07 10:31:06 +01:00
Joachim Nilsson
8aa2060312 Fix #8: kernel messages duplicated to console
When building the sysklogd project --without-klogd we must disable the
kernel logging to console on Linux.  This fix depends on how the sysctl
setting `kernel.printk` is configured.  The patch only calls the kernel
to set console_loglevel to minimum_console_loglevel.

See the kernel docs for details:

  https://www.kernel.org/doc/Documentation/sysctl/kernel.txt

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-07 10:30:42 +01:00
Joachim Nilsson
a7fe2ef700 Use correct define in #ifdef, __linux__ not linux
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-06 18:26:39 +01:00
Joachim Nilsson
73736adbfd Bump version for v2.1 release cycle
The changes in the timer handling are quite extensive, so we cannot in
good conscience call this a patch release.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-06 18:24:38 +01:00
Joachim Nilsson
9cf1f97cef Fix nasty parallel build problem reported by Gentoo and Westermo
Independently of each other both the Gentoo project and Westermo found
an issue with massively parallel builds on monster-core-machines.  At
Westermo there are 40 core Xeon monsters that stumble when building
sysklogd.

The Gentoo bug report is here:

    https://bugs.gentoo.org/701894

The problem stems from strlcat.c and strlcpy.c being used for both
the libcompat convenience library built for libsyslog and als for
syslogd when the system does not have either of the APIs in libc,
i.e. most Linux systems with GLIBC or musl libc.

I can either rewrite the Makefile.am files to handle dependencies
better, or we just disable parallel build like this patch. There's
too few source files to gain anything from parallel build anyway.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-06 18:19:05 +01:00
Joachim Nilsson
3f94ae2906 man: Fix formatting of interval / 2
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-06 18:15:04 +01:00
Joachim Nilsson
7b122449cc test: Increase run time for -- MARK -- test
We should make sure to also check that we don't get more MARK messages
than expected based on the -mMIN value.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-06 18:13:55 +01:00
Joachim Nilsson
6e6c0ddfaa syslogd: Integrate new timer API
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-06 18:13:15 +01:00
Joachim Nilsson
5ac6c39687 syslogd: Add generic timer API to replace exising buggy one
This patch adds a alarm()/SIGALRM based generic timer API to syslogd.
The API takes care to wrap SIGALRM and serialize all timer events to
a standard UNIX pipe(2) which syslogd can poll() for like any other
incoming event.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-05 20:38:43 +01:00
Joachim Nilsson
ad686ca86d Update ChangeLog and bump version for v2.0.3 release
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-01 21:40:20 +01:00
Joachim Nilsson
55f2122393 release: Make sure distcheck runs --with-klogd
Otherwise the resulting tarball will not include klogd.8

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-01 21:22:01 +01:00
Joachim Nilsson
163aa84cc4 klogd: Add '-F' as alias for '-n', for compat with syslogd
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-01 21:17:02 +01:00
Joachim Nilsson
f6713bdb84 syslogd: Increase granularity of background flush/mark timer
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-01 21:12:54 +01:00
Joachim Nilsson
799b03447a test: Add --MARK-- test to verify idle functionality works
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-01 21:12:02 +01:00
Joachim Nilsson
4556901a2b syslogd: Update documentation, -m interval is in minutes
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-01 15:59:35 +01:00
Joachim Nilsson
f4c01a3ba3 syslogd: Refactor domark() timer handling, always run at TIMERINTVL
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-30 17:55:58 +01:00
Joachim Nilsson
77119e2625 test: stop.sh: Exit on first error
We want to catch regressions when syslogd dies before we can tell it to
exit.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-29 11:23:05 +01:00