Commit Graph

268 Commits

Author SHA1 Message Date
Joachim Nilsson
dec90a25ab syslogd: Set pipe fd non-blocking in timer backend
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-14 08:00:00 +01:00
Joachim Nilsson
2179d5a862 syslogd: Minor coding style cleanups
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-14 07:59:39 +01:00
Joachim Nilsson
2bbafcbd16 syslogd: Audit usage text, slim down, fix -R to -r conversion
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-12-10 08:34:49 +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
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
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
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
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
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
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
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
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
c3acff5fae syslogd: Only Initialize syslogd once
This bug caused syslogd to fall back to logging to /dev/console for
internal log messages/errors during reconfiguration at runtime.

syslogd has the FreeBSD style of keeping already open log files ready
for logging until re:init() has completed, when new log files are rolled
in and any old ones not to be used anymore are closed.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-29 11:23:05 +01:00
Joachim Nilsson
a9758d1559 syslogd: Record time of first occurrence of a message
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-29 11:23:05 +01:00
Joachim Nilsson
0a8cecfa84 syslogd: Handle DNS lookup of unknown remote hosts in domark()
Refactor of nslookup of unknown remote syslog servers, both when
(re)reading the .conf file and at runtime.  This means we retry
DNS lookup every 30 sec, or INET_SUSPEND_TIME +/- 30 sec.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-29 11:23:05 +01:00
Joachim Nilsson
90dd1b1c37 syslogd: Always domark() timer, regardless of -mfoo value
The domark() timer handles a lot of the critical maintenance action in
syslogd, it must always be guaranteed to run.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-29 11:23:05 +01:00
Joachim Nilsson
280b5fd3ec syslogd: Fix blocking of SIGHUP/ALRM during logmsg()
Only block signals *after* all sanity checking of log message has been
completed, otherwise we will end up with blocked SIGHUP and SIGALRM.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-29 11:23:05 +01:00
Joachim Nilsson
05c5b6752d syslogd: Always create PID file, even in debug mode
We definitely want to be able to run syslogd in debug mode for extended
periods of time and still run under finit/systemd or similar, letting
users know we run as 'PID'.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-29 11:23:05 +01:00
Joachim Nilsson
8e255b7f9d syslogd: Only set debugging_on in Debug (-d) mode
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-28 15:27:52 +01:00
Joachim Nilsson
b7d4225ef1 syslogd: Retry address lookup forever, never give up
When logging to a remote server, using @fqdn syntax in syslog.conf,
syslogd calls getaddrinfo() to resolve the IP address.  Older versions
of syslogd gave up after 10 retries.  We want to retry forever since we
may be running in a setup with bad network connection to the DNS server
for longer periods of time.

This patch only removes the 'give up' mechanism, which unfortunately
reused the f_prevcount value, which in turn could cause that value to
become -1 and thus trigger an assert().  With this code out of the way,
and the type change in the previous commit, the counter can never again
be negative.

Note: The configurable suspend time before trying again remains at its
default of 3 minutes.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-28 14:53:07 +01:00
Joachim Nilsson
49e168601e syslogd: Change f_prevcount type; int --> size_t
If it wraps around to zero we want to log the message anyway.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-28 14:39:12 +01:00
Joachim Nilsson
1d8fe4944d syslogd: Reset prevcount in fprintlog_first() to prevent assert()
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-28 10:00:34 +01:00
Joachim Nilsson
3d4b8cb84d syslogd: Improve log messages on error, eg. INET sendto()
When we fail sending to a remote host, help admin debug the issue by
stating which remote we failed to send to.

Also minor changes to other similar error messages, use same form.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-28 09:38:22 +01:00
Joachim Nilsson
7793fcbd14 Fix #3: Don't guess PID file location, use configure --runstatedir
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-24 18:52:31 +01:00
Joachim Nilsson
4396004fba Add missing '-k' and '-T' command line flags to getopt()
Fixes GitHub issue #2

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-24 18:38:26 +01:00
Joachim Nilsson
b80a225f73 Minor, simplify previous commit and add logger on/off to summary
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-18 17:54:35 +01:00
Lars Wendler
227008ec0f
build: make logger and its man page optional
There are other packages that provide a logger program like util-linux
We should respekt that

Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
2019-11-18 12:36:25 +01:00
Joachim Nilsson
f44a026d86 syslogd: Fix broken wallmsg(), off-by one iov
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-15 08:31:46 +01:00
Joachim Nilsson
bd5903509d syslogd: Fix RFC3164 formatting, no space after <PRI> field
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-15 08:26:21 +01:00
Joachim Nilsson
09f6b7bf6c syslogd: Minor, don't log to console when exiting ...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-13 19:13:49 +01:00
Joachim Nilsson
54edca09d9 syslogd: Close open UNIX and inet sockets on SIGTERM
When creating Inet sockets we may get multiple struct addrinfo records.
With this patch we support up to 16 records per Internet peer.  When
closing we iterate over all peers and all records.

Refactor socket_close() to clean up any lingering socket path when
closing UNIX socket.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-13 19:11:34 +01:00
Joachim Nilsson
4192e543a5 syslogd: Use common nomenclature for next pointer
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-13 18:44:01 +01:00
Joachim Nilsson
6350bf2474 syslogd: Fix invalid free(), found by Valgrind
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-13 18:44:01 +01:00
Joachim Nilsson
0f0f8f845d syslogd: Add FreeBSD and NetBSD -n flag to disable DNS query
This patch re-adds the -n flag, but now to disable DNS reverse-query for
all incoming messages.  This can potentially speed up logging a lot for
small/embedded systems that act as log sink.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-13 17:16:51 +01:00
Joachim Nilsson
cf9d281e5b syslogd: Adopt FreeBSD -F instead of -n to run in foreground
This change will probably break most installations.  We do this to free
up '-n' for use as disabling DNS lookups, from FreeBSD *and* NetBSD.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-13 17:08:47 +01:00
Joachim Nilsson
9d415f313f syslogd: Add FreeBSD -k option to allow LOG_KERNEL facility messages
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-13 16:44:51 +01:00
Joachim Nilsson
c465f340bc syslogd: NetBSD/FreeBSD -T option, log remote msgs with local time
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-13 16:16:23 +01:00
Joachim Nilsson
12fa1f6682 syslogd: Accept pre-RFC3164 formatted messages from remote hosts
This patch makes us wire-compatible with older versions of ourself, and
current versions set up to use default remote format.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-13 16:09:20 +01:00
Joachim Nilsson
06b26aae7b syslogd: Reformat usage text a bit for readability, hopefully
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-13 15:16:05 +01:00
Joachim Nilsson
0c61fe73f2 logger: Sort options in usage text alphabetically
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-13 14:49:05 +01:00
Joachim Nilsson
62137926ec syslogd: Add support for FreeBSD -a allowed_peer filtering
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-13 14:48:49 +01:00
Joachim Nilsson
3b6199aaef Drop --with-syslogd-pidfile from configure, use -P option to syslogd
This patch drops the configure flag --with-syslogd-pidfile=foo since
syslogd now natively supports custom PID file using -P foo.

Also, the default PID file and syslog.conf paths have been changed from
the hard-coded /var/run (_PATH_VARRUN) and /etc to use configure paths.
This may not be appreciated by everyone but allows the project to have
support for all use-cases in a de facto standard fashion.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-13 11:52:15 +01:00
Joachim Nilsson
4b175653cb syslogd: Fix formatting of usage text, and spell check
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-13 10:27:39 +01:00
Joachim Nilsson
c2d9f80859 syslogd: Drop -h flag, does not do anything since 353cd10
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-13 10:22:15 +01:00
Joachim Nilsson
45c7dcc6df syslogd: Only warn when opening /proc/kmsg fails, continue anyway
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-13 09:55:33 +01:00
Joachim Nilsson
353cd10a06 Refactor, graft in FreeBSD fprintlog_first() & fprintlog_successive()
This patch looks big, but it's really just fprintlog() being split up
into three new functions: fprintlog_first() & fprintlog_successive() and
fprintlog_write().  Similar to how the FreeBSD syslogd is structured.

In the refactoring process Joey's proxy-prevention was removed.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-13 09:43:57 +01:00
Joachim Nilsson
97dfe638b4 Fix uninitialized variable, found by Coverity Scan
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-13 08:16:14 +01:00
Joachim Nilsson
0555e0989f Fix suspicius code for allocating a sockaddr_un to a sockaddr ptr
Remarked on by Coverity Scan.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-13 08:14:48 +01:00
Joachim Nilsson
69608f7158 syslogd: Fix RFC3164 TAG formatting when no PID is included
This patch fixes the omission of final ':' following a content TAG when
an app-name without a process ID is included.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-12 16:42:44 +01:00
Joachim Nilsson
d92f8466f8 syslogd: Minor refactor, move init code from main() to init()
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-12 16:42:44 +01:00
Joachim Nilsson
823bb4cf2a Support for building the project w/o separate klogd (default)
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-12 16:42:44 +01:00
Joachim Nilsson
0455da805f syslogd: Rename -R flag to -r, same as logger tool
Now that we've dropped the previous -r flag we can rename the rotation
flag so it's the same between both logger and syslogd.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-12 13:30:25 +01:00
Joachim Nilsson
2f72a17b8e syslogd: If system has SO_REUSEPORT, use it
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-12 13:28:02 +01:00
Joachim Nilsson
095aa56996 Minor, don't touch PID file on SIGHUP in debug mode
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-12 13:28:02 +01:00
Joachim Nilsson
f606667038 syslogd: Add support for FreeBSD -s, secure mode
- Update man page
- Enable -s in default systemd service settings
- Add support for SecureMode, with shutdown()

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-12 13:28:02 +01:00
Joachim Nilsson
d607d6b845 syslogd: Update usage text and man page for new -b flag, drop -r
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-12 13:28:02 +01:00
Joachim Nilsson
762e09d7e8 syslogd: Drop -l HOST flag, the RFCs are very clear on this point
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-12 13:28:02 +01:00
Joachim Nilsson
d1035377cc syslogd: Drop -s HOST flag in favor of future BSD SecureMode
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-12 13:28:02 +01:00
Joachim Nilsson
4ee6211277 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>
2019-11-12 13:28:01 +01:00
Joachim Nilsson
07677c78a5 Graft struct addrinfo support on top of new socket API
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-12 13:28:01 +01:00
Joachim Nilsson
a4c1acbca8 syslogd: Drop -r flag, to be replaced with BSD -s (secure) flag
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-12 09:19:54 +01:00
Joachim Nilsson
c66411e8c2 Use new log macros and err.h fns
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-12 08:56:06 +01:00
Joachim Nilsson
53c2d0e3d9 Export flog() function and define new log macros ERR(), WARN(), etc.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-11 18:52:00 +01:00
Joachim Nilsson
90fb520c06 Add socket helper functions from SMCRoute, licesened as 3-clause BSD
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-10 11:22:14 +01:00
Joachim Nilsson
c31a7d1031 Minor refactor/cleanup
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-10 09:35:01 +01:00
Joachim Nilsson
a2feba69e2 Allow klogd to send LOG_KERN messages to syslogd
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-09 11:46:56 +01:00
Joachim Nilsson
b15420fdc5 syslogd: Inherit parsed PRI value in RFC3164 front-end
The RFC5424 front-end already does this.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-09 11:23:03 +01:00
Joachim Nilsson
9aaa7ec8c4 syslogd: Install SIGHUP handler earlier
When a heavily loaded system starts up syslogd may not in time reach its
original installation of the SIGHUP handler before receiving the signal.
It will then die and have to be restarted by PID 1.

This patch installs the SIGHUP handler early, with all the other signals
right after command line parsing.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-08 16:15:29 +01:00
Joachim Nilsson
dd5b470342 Fix assert when buffer->hostname == NULL at startup
Default to use 'from' in RFC3164 parser, just like the RFC5424 parser
already does.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-08 15:50:09 +01:00
Joachim Nilsson
0a3c5e1544 syslogd: Update usage text, drop -a add -b and simplify
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-08 08:50:17 +01:00
Joachim Nilsson
3377f07a5a klogd: Update usage text, no more -i or -I
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-08 08:50:17 +01:00
Joachim Nilsson
cc96379252 syslogd: Fix RFC5424 structured-data parser
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-07 23:21:33 +01:00
Joachim Nilsson
22c3fa9fa3 syslogd: Increase debug logging of raw incoming and parsed messages
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-07 23:21:33 +01:00
Joachim Nilsson
3f68d765db logger: Change usage text slightly for readability
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-07 23:21:33 +01:00
Joachim Nilsson
31815d6143 logger: Add NetBSD -d SD for RFC5424 structured data
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-07 23:21:31 +01:00
Joachim Nilsson
e25f835a5a logger: Add NetBSD -m MSGID support for logging RFC5424 style
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-07 23:20:11 +01:00
Joachim Nilsson
f2e1793cda logger: Add NetBSD -n option for LOG_NDELAY
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-07 22:03:11 +01:00
Joachim Nilsson
0aa57978ee logger: Add NetBSD -i option for LOG_PID
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-07 21:54:47 +01:00
Joachim Nilsson
d3461fd6a3 logger: Add NetBSD -c option for LOG_CONS
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-07 21:08:01 +01:00
Joachim Nilsson
fff4368e80 RFC5424 sec 6.1 states that we *should* support 2048 byte long msgs
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-07 20:56:02 +01:00
Joachim Nilsson
07033382ee Minor, type cast logit() argument for Coverity Scan
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-07 20:35:54 +01:00
Joachim Nilsson
11819e5b7f Type cast arguments to logit(), fixes warnings from Coverity
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-07 19:37:12 +01:00
Joachim Nilsson
884a0a180b Use correct format specifier for ssize_t, found by Coverity Scan
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-07 19:37:04 +01:00
Joachim Nilsson
774523f6e2 Fix missing argument to logit() and clean up unreadable code
Found by Coverity Scan

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-07 19:36:49 +01:00
Joachim Nilsson
7533f96ca9 Fix invalid/missing/extra argument to logit(), found by Coverity
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-07 19:24:38 +01:00
Joachim Nilsson
64c6866667 Minor, drop debug log message for normal case
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-07 19:08:29 +01:00
Joachim Nilsson
f8e87f143d syslogd: Drop -a SOCK support, replaced with multiple -p SOCK args
The -p SOCK syntax is what NetBSD syslogd use, so this is more of an
alignment with upstream.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-07 19:08:29 +01:00
Joachim Nilsson
d723574eee logger: Update usage text with missing -u SOCK info
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-07 06:47:53 +01:00
Joachim Nilsson
1544cddd5a Drop unnecessary (and buggy) debug logs
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-06 16:53:48 +01:00