History log of /freebsd-current/usr.sbin/syslogd/syslogd.8
Revision Date Author Comments
# 8a7b6120 23-Nov-2023 Warner Losh <imp@FreeBSD.org>

usr.sbin: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by: Netflix


# b2c76c41 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line nroff pattern

Remove /^\.\\"\s*\$FreeBSD\$$\n/


# 2d82b47a 22-Mar-2021 Dmitry Wagin <dmitry.wagin@ya.ru>

syslogd: Increase message size limits

Add a -M option to control the maximum length of forwarded messages.
syslogd(8) used to truncate forwarded messages to 1024 bytes, but after
commit 1a874a126a54 ("Add RFC 5424 syslog message output to syslogd.")
applies a more conservative limit of 480 bytes for IPv4 per RFC 5426
section 3.2. Restore the old default behaviour of truncating to 1024
bytes. RFC 5424 specifies no upper limit on the length of forwarded
messages, while for RFC 3164 the limit is 1024 bytes.

Increase MAXLINE to 8192 bytes to correspond to commit 672ef817a192.

Replaced bootfile[] size for MAXPATHLEN used in getbootfile(3) as a
returned value. Using (MAXLINE+1) as a size for bootfile[] is excessive.

PR: 241937
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D27206


# 8ab684e2 02-Jul-2018 Ed Schouten <ed@FreeBSD.org>

Document that syslogd -v has no effect when RFC 5424 mode is enabled.

The variable it sets, LogFacPri, is only used in the RFC 3164 formatting
codepath.

PR: 229457
Reported by: Andre Albsmeier
MFC after: 1 week


# 5caf54c7 15-Apr-2018 Ed Schouten <ed@FreeBSD.org>

Use proper alphabetic sorting of options.


# 1a874a12 15-Apr-2018 Ed Schouten <ed@FreeBSD.org>

Add RFC 5424 syslog message output to syslogd.

- Move all of the code responsible for transmitting log messages into a
separate function, fprintlog_write().
- Instead of manually modifying a list of iovecs, add a structure
iovlist with some helper functions.
- Alter the F_FORW (UDP message forwarding) case to also use iovecs like
the other cases. Use sendmsg() instead of sendto().
- In the case of F_FORW, truncate the message to a size dependent on the
address family (AF_INET, AF_INET6), as proposed by RFC 5426.
- Move all traditional message formatting into fprintlog_bsd(). Get rid
of some of the string copying and snprintf()'ing. Simply emit more
iovecs to get the job done.
- Increase ttymsg()'s limit of 7 iovecs to 32. Add a definition for this
limit, so it can be reused by iovlist.
- Add fprintlog_rfc5424() to emit RFC 5424 formatted log entries.
- Add a "-O" command line option to enable RFC 5424 formatting. It would
have been nicer if we supported "-o rfc5424", just like on NetBSD.
Unfortunately, the "-o" flag is already used for a different purpose
on FreeBSD.
- Don't truncate hostnames in the RFC 5424 case, as suggested by that
specific RFC.

For people interested in using this, this feature can be enabled by
adding the following line to /etc/rc.conf:

syslogd_flags="-s -O rfc5424"

Differential Revision: https://reviews.freebsd.org/D15011


# 50387adc 05-Dec-2017 Gleb Smirnoff <glebius@FreeBSD.org>

When parsing remote messages, require them to have standard timestamp
field, and support properly parse out the hostname as described by RFC3164,
which wasn't done before. However, don't discard message if it doesn't
have hostname, for compatibility.

Enable logging of the message supplied hostname instead of real hostname
with -H switch.

PR: 200933
Reported by: Konstantin Pavlov <thresh nginx.com>
MFC after: 2 months


# 6dbd2714 03-Mar-2017 Enji Cooper <ngie@FreeBSD.org>

Correct nuance of -a :service -> "*" in r314563, r314585

My attempt to correct the sender/receiver behavior was incorrect.
The source port of the sender for forwarded datagrams is filtered
with -a, and my change in r314585 didn't clarify that point at all.

Wording is based on suggestion by hrs.

MFC after: 28 days
X-MFC with: r314563, r314585
Reported by: hrs
In collaboration with: hrs, rgrimes
Sponsored by: Dell EMC Isilon


# 3dd94b67 02-Mar-2017 Enji Cooper <ngie@FreeBSD.org>

Correct verb change for service => `*` after r314563

`*` means that packets will be received from a remote peer on any port.
Since the point of interest is the syslogd instance (not the remote peer),
the appropriate verb is "received", not "sent".

MFC after: 1 month
X-MFC with: r314563
Sponsored by: Dell EMC Isilon


# bc4536df 02-Mar-2017 Enji Cooper <ngie@FreeBSD.org>

Wordsmith syslogd(8)

- Clarify -p/-S options by using appropriate subject-verb modifiers
(verb and modifiers suggested that the subject should have been
singular).
- Simplify/correct -a description:
-- Be more terse when describing IPv4 (the "usual dotted notation"
isn't necessarily well understood by the reader). Being blunt and
saying "IPv4 address" with an optional netmask is.
-- prefixlen is the appropriate terminology for IPv6.
-- mask/prefixlen is optional, not required (as noted later on in the
section).
-- split up IPv4/IPv6 use so to clarify both forms.
-- Fix wordiness when describing the optional "service" specifier.
- -T: Use "cannot" instead of "can't" [*].

Bump .Dd for the changes.

MFC after: 1 month
Reported by: igor [*]
Reviewed by: hrs
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D9855


# fbbd9655 28-Feb-2017 Warner Losh <imp@FreeBSD.org>

Renumber copyright clause 4

Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by: Jan Schaumann <jschauma@stevens.edu>
Pull Request: https://github.com/freebsd/freebsd/pull/96


# a3dc138e 22-Dec-2016 Hiroki Sato <hrs@FreeBSD.org>

mdoc and style fixes.


# c5323862 20-Dec-2016 Hiroki Sato <hrs@FreeBSD.org>

- Use fnmatch(3) for domanname matching of -a options.
- Document the patten matching.
- Document -S flag in SYNOPSIS.


# 97456b74 20-Dec-2016 Hiroki Sato <hrs@FreeBSD.org>

Escape punctuation characters.


# 38076b4b 16-Jun-2015 Rui Paulo <rpaulo@FreeBSD.org>

syslogd: support multiple -b options.

It's now possible to bind multiple sockets to different IP addresses.

PR: 159305
Submitted by: Kurt Lidl <lidl pix.net>
Sponsored by: Pi-Coral, Inc.


# fb0e21cf 03-Mar-2015 Sergey Kandaurov <pluknet@FreeBSD.org>

Update .Dd, sync usage() for -F. Missed in previous change.


# 36285e78 03-Mar-2015 Rui Paulo <rpaulo@FreeBSD.org>

Add and document an option to cause syslogd to run in the
foreground.

This allows a separate process to monitor when and how
syslogd exits. That process can then restart syslogd if needed.

Differential Revision: https://reviews.freebsd.org/D1985
Submitted by: Ravi Pokala
Reviewed by: allanjude (man page)


# 8972c8b6 03-Jun-2012 Joel Dahl <joel@FreeBSD.org>

Minor spelling fixes.


# 815a0805 14-Mar-2012 Sean Bruno <sbruno@FreeBSD.org>

Update man page to present -T argument in synopsis

MFC with r183347

MFC after: 0 days


# 35741267 14-Jul-2011 Xin LI <delphij@FreeBSD.org>

Add a new option, -N to disable the default and recommended syslogd(8)
behavior, which binds to the well known UDP port.

This option implies -s.

MFC after: 2 months


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# 974835c9 07-Aug-2010 Oliver Fromme <olli@FreeBSD.org>

syslogd(8) already supports *sending* log messages to non-
standard ports, but it can't *receive* them (port 514 is
hardcoded). This commit adds that missing feature.

(NB: I actually needed this feature for a server farm where
multiple jails run with shared IP addresses, and every jail
should have its own syslogd process.)

As a side effect, syslogd now compiles with WARNS=6.

Approved by: des (mentor)
MFC after: 3 weeks


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# efe78a46 07-Dec-2008 Tom Rhodes <trhodes@FreeBSD.org>

Use "allowed_peer" throughout this manual page.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# cfcf794e 25-Sep-2008 David Malone <dwmalone@FreeBSD.org>

Add a flag, -T, that tells syslogd to always replace the timestamp on
messages from the network. We already replace malformatted timestamps
and this option lets us replace timestamps that are correctly formatted
but wrong.

PR: 120891
Submitted by: Thomas Vogt <thomas@bsdunix.ch>
MFC after: 1 week


# d7022add 13-May-2008 Brian Somers <brian@FreeBSD.org>

Add a -8 switch to syslogd to prevent it from mangling 8-bit data.


# c503ddf2 06-Mar-2006 Pawel Jakub Dawidek <pjd@FreeBSD.org>

By default (for security reasons) syslogd(8) doesn't create log files
when they don't exist, but sometimes its quite useful (eg. we use
non-standard log files and memory backed /var/, which is populated on
boot).

Add -C option which tells syslogd(8) to create log files if they don't
exist.

Glanced at by: phk
MFC after: 3 days


# 15f3d79b 12-Apr-2005 Hiroki Sato <hrs@FreeBSD.org>

Add -S option which allows to change the pathname of the privileged
socket /var/run/logpriv.

Reviewed by: glebius and kensmith
MFC after: 2 days


# 0227791b 13-Feb-2005 Ruslan Ermilov <ru@FreeBSD.org>

Expand *n't contractions.


# 1a74e6a1 11-Jan-2005 Ruslan Ermilov <ru@FreeBSD.org>

Scheduled mdoc(7) sweep.


# 204d3180 18-Nov-2004 Gleb Smirnoff <glebius@FreeBSD.org>

s/priveleged/privileged/


# de655741 08-Nov-2004 Ken Smith <kensmith@FreeBSD.org>

Bump document date.

Noticed by: trhodes
Pointy hat: kensmith
MFC after: 1 week


# 83d71f61 08-Nov-2004 Ken Smith <kensmith@FreeBSD.org>

Add newsyslog(8) to the "See Also" section.

MFC after: 1 week


# 240d5a9b 04-Nov-2004 Gleb Smirnoff <glebius@FreeBSD.org>

Protect against local flooder of /var/run/log. Do not loop forever in
syslog(3) if we are a priveleged program (sshd, su, etc.).

- Make syslogd open an additional socket /var/run/logpriv, with 0600
permissions.
- In libc, try to use this socket.
- Do not loop forever if we are using this socket (partial backout of 1.31)

Reviewed by: dwmalone, Andrea Campi <andrea webcom it>
Approved by: julian (mentor)
MFC after: 1 month


# 24744467 04-Nov-2004 Gleb Smirnoff <glebius@FreeBSD.org>

- Use stailqueue for sockets instead of socket buffer. Thus
remove limit for 20 sockets.
- Add possibility to specify file mode for sockets created with '-l'.
- Check that socket name in '-l' is absolute.

Reviewed by: dwmalone, Andrea Campi <andrea webcom it>
Approved by: julian (mentor)


# 486c8cc4 06-Aug-2004 Warner Losh <imp@FreeBSD.org>

Per letter dated July 22, 1999 remove 3rd clause of Berkeley derived software
(with permission of addtional copyright holders where appropriate)


# 07bfccd7 02-Jul-2004 Ruslan Ermilov <ru@FreeBSD.org>

Mechanically kill hard sentence breaks.


# fe08efe6 08-Sep-2003 Ruslan Ermilov <ru@FreeBSD.org>

mdoc(7): Use the new feature of the .In macro.


# 8d5d039f 12-Dec-2002 Ruslan Ermilov <ru@FreeBSD.org>

Uniformly refer to a file system as "file system".

Approved by: re


# c041c1e0 27-Nov-2002 Ruslan Ermilov <ru@FreeBSD.org>

mdoc(7) police: markup fixes.

Approved by: re


# 7c5bf58a 18-Oct-2002 Tim J. Robbins <tjr@FreeBSD.org>

Add -c option to synopsis. Sort it alphabetically, too.


# 490d5836 14-Jul-2002 Philippe Charnier <charnier@FreeBSD.org>

The .Nm utility


# 8c9d5471 10-Jan-2002 Ruslan Ermilov <ru@FreeBSD.org>

mdoc(7) police: add missing markup bit.


# 3a0ac995 05-Jan-2002 Archie Cobbs <archie@FreeBSD.org>

Add a new flag '-c' to disable repeated line compression when the output
is a pipe to another program, or, if specified twice, in all cases.

PR: bin/32420


# d3f58d40 08-Dec-2001 Ruslan Ermilov <ru@FreeBSD.org>

mdoc(7) police: markup nits.


# a53dffb7 27-Nov-2001 Dima Dorfman <dd@FreeBSD.org>

Make the default kernel prefix "kernel:" instead of the boot file,
with the old behavior available via the -o option (it might still be
useful if one has many kernels and cares which messages came from
which). If the boot file is not used as the prefix, it is still
logged once at startup.

This change is prompted by the fact that the boot file is now much
longer ("/boot/kernel/kernel" vs. "/kernel"), which significanlty
bloats the syslogd output.

Reviewed by: peter


# f676ae2b 01-Sep-2001 Dima Dorfman <dd@FreeBSD.org>

Introduce a -b option that allows the user to specify which address to
bind to. This is useful for hosts running jails that need syslog to
maintain an open socket to log to a remote host.

Reviewed by: sheldonh


# 9e572661 27-Aug-2001 Dima Dorfman <dd@FreeBSD.org>

Don't make it sound like -A is turning on the default behavior.


# e3608b78 18-Jul-2001 Mike Barcroft <mike@FreeBSD.org>

Document the fact that syslogd(8) requires logs files to be created
before it will start logging to them.

PR: 27088
Approved by: des
MFC after: 10 days


# f247324d 15-Jul-2001 Dima Dorfman <dd@FreeBSD.org>

Remove whitespace at EOL.


# a4c37c81 10-Jul-2001 Ruslan Ermilov <ru@FreeBSD.org>

mdoc(7) police: removed HISTORY info from the .Os call.


# be5c8032 05-Jun-2001 Ruslan Ermilov <ru@FreeBSD.org>

Note that -a is ignored if -s is also specified.


# 8fcaaa2e 16-May-2001 Ruslan Ermilov <ru@FreeBSD.org>

mdoc(7) police: uppercase abbreviations in revision 1.34.


# f0ee9598 10-May-2001 David Malone <dwmalone@FreeBSD.org>

Add the ability to specify alternate PID file for syslogd.

PR: 25784
Submitted by: Jon Villarreal <jonv@ivmg.net>
Reviewed by: iedowse


# bcdf5ca7 26-Feb-2001 Ruslan Ermilov <ru@FreeBSD.org>

Prepare for mdocNG.


# 610a5778 01-Feb-2001 Ruslan Ermilov <ru@FreeBSD.org>

mdoc(7) police: split punctuation characters + misc fixes.


# 8b5c4af3 27-Dec-2000 Ruslan Ermilov <ru@FreeBSD.org>

Prepare for mdoc(7)NG.


# e0b32a77 18-Dec-2000 Ruslan Ermilov <ru@FreeBSD.org>

mdoc(7) police: document IPv6 options in the SYNOPSIS.


# 38816289 16-Dec-2000 Hajimu UMEMOTO <ume@FreeBSD.org>

IPv6 support for syslogd.

Reviewed by: freebsd-current
Obtained from: NetBSD


# e97407b4 20-Nov-2000 Ruslan Ermilov <ru@FreeBSD.org>

mdoc(7) police: use the new features of the Nm macro.


# 481a1902 17-Oct-2000 David Malone <dwmalone@FreeBSD.org>

Syslogd normally converts messages of facility kern to facility
user unless they come directly from the kernel. Document this and
add a flag to syslogd which prevents this conversion.

Sort getopt args while I'm at it.

PR: 21788
Submitted by: Andre Albsmeier <andre.albsmeier@mchp.siemens.de>


# bcfe1db8 17-Oct-2000 David Malone <dwmalone@FreeBSD.org>

Fix spelling of comparison.


# 39e31cdb 23-Sep-2000 Alfred Perlstein <alfred@FreeBSD.org>

Add forgotten -n option to SYNOPSIS section

Submitted by: Reinier Bezuidenhout <rbezuide@oskar.nanoteq.co.za>


# ede8823b 28-Jul-2000 Paul Saab <ps@FreeBSD.org>

Change option -r to -n inline with conventions we use elsewhere.
I guess it serves me right for using a patch directly from Jan
Koum. :)

Requested by: many


# 779fbd1b 28-Jul-2000 Paul Saab <ps@FreeBSD.org>

Add option 'r' to syslogd which will disable dns queries for every
request. This is useful when you have a large site pointed at a
single syslog server.

Submitted by: Jan Koum <jkb@yahoo-inc.com>


# f2e366a1 01-Mar-2000 Sheldon Hearn <sheldonh@FreeBSD.org>

Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.


# b5c06082 14-Feb-2000 Peter Wemm <peter@FreeBSD.org>

s|/dev/log|/var/run/log|


# 922a51ee 23-Jan-2000 Philippe Charnier <charnier@FreeBSD.org>

Add section number to .Xr. Use .Pa for filenames.
fprintf -> warnx.


# 3a695cf8 14-Jan-2000 Dag-Erling Smørgrav <des@FreeBSD.org>

Reflect the change in secure mode semantics, and document fascist mode
properly.


# 97d92980 27-Aug-1999 Peter Wemm <peter@FreeBSD.org>

$Id$ -> $FreeBSD$


# d35f30aa 29-Apr-1999 Dag-Erling Smørgrav <des@FreeBSD.org>

Implement fascist mode (do not open a datagram socket at all).


# 2eec1ab0 22-Jul-1998 Poul-Henning Kamp <phk@FreeBSD.org>

Add -u, -v and -vv options to syslogd, this improves the control and
logging verbosity about facility & priority levels.
PR: 7278
Reviewed by: phk
Submitted by: Harlan Stenn <Harlan.Stenn@pfcs.com>


# 79962d3e 25-Jun-1998 Guido van Rooij <guido@FreeBSD.org>

Implement new argument -l (OpenBSD has -a but we already use that).
This allows one to specify additional sockets in the unix domain
that syslogd listens to. Its primary use is to create log sockets in
chroot environments.
Obtained from:OpenBSD (with a bug fixed d


# c46308e8 24-Apr-1998 Poul-Henning Kamp <phk@FreeBSD.org>

Augment the last change after some deliberation with rgrimes & peter.
It is important that we keep the ability to send packets to a remote
server and that the packets come from our well-known port, also in
that case.

Reviewed by: peter, rgrimes.


# b8b7e105 19-Oct-1997 Philippe Charnier <charnier@FreeBSD.org>

Cosmetic in usage string.


# 173471e6 19-Sep-1997 Brian Somers <brian@FreeBSD.org>

Use snprintf() instead of sprintf() most of the time.
Obtained from: OpenBSD

Make usage() consistent with man page.


# 35486063 03-May-1997 Joerg Wunsch <joerg@FreeBSD.org>

Nobody ever seemed to be interested in reviewing these changes, and i
found that my syslogd is now running them for several months...

Add an option to syslogd to restrict the IP addresses that are allowed
to log to this syslogd. It's too late to develop the inter-syslogd
communications protocol mentioned in the BUGS section, some 10 years
too late. Thus, restricting the IP address range is about the most
effective change we can do if we want to allow incoming syslog
messages at all.

IMHO, we should encourage the system administrators to use this option,
and thus provide a knob in /etc/rc.* for it, defaulting to -a 127.0.0.1/32
(just as a hint about the usage).

Please state opinions about whether to merge this change into 2.2 or
not (i've got it running on RELENG_2_2 anyway).


# 24685462 29-Apr-1997 John-Mark Gurney <jmg@FreeBSD.org>

add an Id line, minor mdoc fix ups

add ftp to list of facilities in syslog.conf
Closes PR#3389
Submitted-by: Pius Fischer


# 26bed90f 25-Apr-1997 Paul Traina <pst@FreeBSD.org>

Secure mode (-s) incorrectly disabled both sending and receiving of syslog
packets over UDP. Secure boxes should still be able to send packets.


# 476602a9 22-Feb-1997 Peter Wemm <peter@FreeBSD.org>

Revert $FreeBSD$ to $Id$


# 1130b656 14-Jan-1997 Jordan K. Hubbard <jkh@FreeBSD.org>

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.


# 1c0899bb 28-Oct-1996 Joerg Wunsch <joerg@FreeBSD.org>

Back out the entire change from rev 1.11 of syslogd.c. It was bogus.
Correct the man page to reflect the new reality.


# 36be1f6b 23-Oct-1996 Julian Elischer <julian@FreeBSD.org>

Reviewed by: various (mailing list feedback)
Submitted by: whistle communications

move the socket from /dev to /var/run by default
TRANSITIONALLY make syslog add a symlink..
I PROMISE I'll remove that as soon as I have the makefiles etc fixed as well.


# a13e9951 22-Jul-1996 Paul Traina <pst@FreeBSD.org>

Bring in some fixes from NetBSD and re-hack our syslogd to be option-compatible
with theirs (change the -I option to -s (but leave -I in for backwards compat.)
Also eliminate an make sane some magic numbers, and fix a small bug where we'd
send to an unopened socket.

Reviewed by: wollman
Obtained from: NetBSD


# 8893f6f9 20-May-1996 Garrett Wollman <wollman@FreeBSD.org>

Correct synopsis (-d, -I options were missing because -mdoc mistook
the dI in `.Op Fl dI' for the name of an internal mdoc command).


# a2029046 12-Oct-1995 Garrett Wollman <wollman@FreeBSD.org>

Add a command-line option `-I' to disable logging from UDP.
Document `-d' and `-I'. Add a BUGS section noting that
logging from UDP is an unauthenticated remote disk-filling service,
and probably should be disabled by default in the absence of some sort
of authentication.


# dea673e9 25-May-1994 Rodney W. Grimes <rgrimes@FreeBSD.org>

BSD 4.4 Lite usr.sbin Sources