- Drop weak bindings, use simple #define in compat.h instead
- No need to #ifdef sources with HAVE_foo, configure handles this for us
- Move utimensat() declaration to compat.h from pidfile.c to be consistent
With these changes we can let libsyslog link with the replacement objs,
just like syslogd and logger does. Because even if the C-library does
*not* have strlcpy() & C:o *and* an application has a local copy of any
of these APIs, our versions are prefixed with __ in the symbol table.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Only reset f_fime when the filed is in normal operation, not suspended,
otherwise the INET_SUSPEND_TIME handling is broken.
Signed-off-by: Johan Askerin <johan.askerin@gmail.com>
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
When sending to a remote syslog server, configured as an IP address or
when the DNS name has already been resolved, we may get temporary error
messages like ENETUNREACH and similar from sendmsg().
Before this patch the whole filed was placed in F_FORW_SUSP, like failed
DNS resolve, which introduces a 180 sec delay before even trying again.
A better approach is to just try again with the next syslog message.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
The original idea with libcompat was to keep as few objects as
possible for linking with libsyslog. That in turn to prevent
a user of libsyslog from suddenly also getting strong binding
to symbols like strlcpy() from libsyslog, rather than their C
library of choice.
However, this caused strlcpy.c to be built as both .o and .lo
files, which in turn caused really bizarre build problems due
to bad DAG dependency.
This patch drops libcompat and instead marks all replacement APIs
as weak symbols, which a C library can override.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
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>
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>
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>