History log of /netbsd-src/usr.sbin/syslogd/syslogd.c (Results 1 – 25 of 147)
Revision Date Author Comments
# 10cd451e 09-Nov-2024 jschauma <jschauma@NetBSD.org>

use the correct variable - thanks, autobuild!


# 23d50b77 09-Nov-2024 jschauma <jschauma@NetBSD.org>

If '-u' or '-g' is given, create the pidfile prior to changing e[ug]id

The subsequent call to pidfile(3) after we daemonize will correctly take
over the pidfile.

Note: this will likely leave the tr

If '-u' or '-g' is given, create the pidfile prior to changing e[ug]id

The subsequent call to pidfile(3) after we daemonize will correctly take
over the pidfile.

Note: this will likely leave the truncated pidfile in place upon exit,
since the effective user is unlikely to have write permissions on
_PATH_VARRUN. This isn't a problem, since pidfile(3) does the right
thing at startup again, and the the pidfile being truncated will not
lead to erroneous diagnosis.

This fixes bin/27309, which I filed a little over 20 years ago.

show more ...


# dfb492d5 08-Nov-2024 jschauma <jschauma@NetBSD.org>

Terminate full sentence comments with a period / capitalize correctly.
(No functional changes.)


# 327f0fe7 21-Aug-2024 gutteridge <gutteridge@NetBSD.org>

syslogd.8 & syslogd.c: add -k option

Provide a means of disabling the translation of (remote) messages
received with facility kern to facility user. Feature equivalent to
what FreeBSD added years ag

syslogd.8 & syslogd.c: add -k option

Provide a means of disabling the translation of (remote) messages
received with facility kern to facility user. Feature equivalent to
what FreeBSD added years ago, though the code is slightly different
(a bit easier to follow expressively). Patches from RVP, provided in
PR lib/57172 (with very minor tweaks by me).

show more ...


# eb7d480f 21-Aug-2024 gutteridge <gutteridge@NetBSD.org>

syslog.h & syslogd.c: avoid incorrect facility double-shifting

As discussed in PR lib/57172, don't double-shift facility values when
calculating logging contexts. Patch suggested by RVP, an approach

syslog.h & syslogd.c: avoid incorrect facility double-shifting

As discussed in PR lib/57172, don't double-shift facility values when
calculating logging contexts. Patch suggested by RVP, an approach also
consistent with what OpenBSD did, which is to simply remove LOG_MAKEPRI
and adjust the only place it's used in the tree. (This has the benefit
of exposing any third-party software that may have also been using the
incorrect value all this time.)

show more ...


# ce170513 03-Aug-2024 gutteridge <gutteridge@NetBSD.org>

syslogd.c: avoid use of undefined macro (NFCI)

SIGN_NUM_PRIVALS isn't defined anywhere; fix the block, though it's not
actually applicable in NetBSD builds. Issue noted by and patch from RVP
as a pe

syslogd.c: avoid use of undefined macro (NFCI)

SIGN_NUM_PRIVALS isn't defined anywhere; fix the block, though it's not
actually applicable in NetBSD builds. Issue noted by and patch from RVP
as a peripheral item in PR lib/57172.

show more ...


# e30c5994 11-Oct-2023 uwe <uwe@NetBSD.org>

syslogd.c: fix a typo in a comment


# b983a092 08-Nov-2022 uwe <uwe@NetBSD.org>

syslogd: make -d accept an optional argument

Make it possible to specify the debug message categories with an
optional numeric argument. You'll have to read the fine source to
find out what they ar

syslogd: make -d accept an optional argument

Make it possible to specify the debug message categories with an
optional numeric argument. You'll have to read the fine source to
find out what they are. The number can be specified as the usual
decimal, hex (0x), or octal (0) literal with an optional ~negation.

Since syslogd uses getopt(3), not getopt_long(3), do a bit of
gymnastics so that both -d42 and -d 42 are accepted (I'm not inventing
long names for all the existing options just to support an optional
argument to -d).

-d without an argument still uses the old D_DEFAULT selection just in
case someone really relies on that. You can disable all debug
messages with -d0 but still get syslogd not daemonized.

show more ...


# 7ba300a9 20-May-2022 andvar <andvar@NetBSD.org>

s/auxillary/auxiliary/ in comments.


# 6f4965e0 27-Nov-2021 rillig <rillig@NetBSD.org>

usr.sbin: remove unnecessary CONSTCOND, lint no longer needs it

Since 2021-01-31, lint no longer requires a CONSTCOND comment in a
do-while-0 statement since this is a common code pattern, especiall

usr.sbin: remove unnecessary CONSTCOND, lint no longer needs it

Since 2021-01-31, lint no longer requires a CONSTCOND comment in a
do-while-0 statement since this is a common code pattern, especially in
statement-like macros.

sed -i -E 's,} while \(/\* ?CONSTCOND ?\*/ ?0\),} while (0),' */*.[ch]

show more ...


# 6e3ee785 13-Aug-2021 andvar <andvar@NetBSD.org>

s/bacause/because/


# 5f378fab 08-Nov-2020 dholland <dholland@NetBSD.org>

syslogd: in die(), don't call die() again recursively.

Particularly not for something as immaterial as close failing.

PR 55795


# cab1687a 07-Nov-2020 christos <christos@NetBSD.org>

make the buffer fit any 32 bit number.


# 8cb1641f 07-Nov-2020 christos <christos@NetBSD.org>

PR/55794: Jan Schaumann: Eliminate unchecked malloc


# fe093d75 29-Sep-2020 gson <gson@NetBSD.org>

When reporting an error before daemonizing, prefix the error message
with the program name.


# 40064e24 26-Dec-2019 msaitoh <msaitoh@NetBSD.org>

s/lenght/length/


# fbffadb9 03-Feb-2019 mrg <mrg@NetBSD.org>

- add or adjust /* FALLTHROUGH */ where appropriate
- add __unreachable() after functions that can return but won't in
this case, and thus can't be marked __dead easily


# f4ed8351 05-Nov-2018 martin <martin@NetBSD.org>

Revert previous - local merge mishap


# 4736bd2c 05-Nov-2018 wiz <wiz@NetBSD.org>

Sort options.


# 4a0babdb 05-Nov-2018 martin <martin@NetBSD.org>

Make it compilable with gcc


# 9adaa956 04-Nov-2018 roy <roy@NetBSD.org>

syslogd: allow the reporting of buffer overflows to be disabled.

This generally isn't a good thing, nothing should be discard silently.
However, for systems that don't want big syslogd buffers or ar

syslogd: allow the reporting of buffer overflows to be disabled.

This generally isn't a good thing, nothing should be discard silently.
However, for systems that don't want big syslogd buffers or are too slow
to log effectively this reporting can now be disabled.

show more ...


# 0402a70e 04-Nov-2018 roy <roy@NetBSD.org>

syslogd: allow the receiving buffer size to be set.

This allows the admin to try and avoid buffer overflow when a log of
logging appears in bursts.


# 2ed636d6 06-May-2018 christos <christos@NetBSD.org>

grow AF_UNIX receive buffer size


# b68988e2 10-Sep-2017 ginsbach <ginsbach@NetBSD.org>

Use looked up remote host for remote message without a hostname

An incoming remote message may not necessarily have a hostname
between the timestamp and the message. The the source of the remote
sen

Use looked up remote host for remote message without a hostname

An incoming remote message may not necessarily have a hostname
between the timestamp and the message. The the source of the remote
sender is already looked up so use that hostname/IP address rather
than the local hostname.

XXX: pullup-8
XXX: pullup-7
XXX: pullup-6

show more ...


# 069fe2af 11-Jun-2016 christos <christos@NetBSD.org>

PR/51234: Onno van der Linden: syslogd sometimes incorrectly handles iso to
bsd time conversion


123456