History log of /freebsd-current/usr.bin/logger/logger.c
Revision Date Author Comments
# 0b8224d1 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

Remove copyright strings ifdef'd out

We've ifdef'd out the copyright strings for some time now. Go ahead and
remove the ifdefs. Plus whatever other detritis was left over from other
recent removals. These copyright strings are present in the comments and
are largely from CSRG's attempt at adding their copyright to every
binary file (which modern interpretations of the license doesn't
require).

Sponsored by: Netflix


# bdcbfde3 23-Nov-2023 Warner Losh <imp@FreeBSD.org>

usr.bin: 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


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

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 83fd35b3 27-Apr-2023 Eugene Grosbein <eugen@FreeBSD.org>

logger(1): fix timestamps in case of long run

An example:

( echo test; sleep 2; echo test2 ) | logger -h /var/run/log

Before fix, logger assigned same timestamp to both records.

Fixes: 65547fb33db901a9f352aacb0ed45ce68b0bd275
Reported by: Vadim Goncharov
MFC after: 1 week


# af329789 19-Oct-2022 Mariusz Zaborski <oshogbo@FreeBSD.org>

logger: fix builds without casper

We can enter capability mode only when Casper is available in
the system.

Reported by: mjg@
MFC after: 1 week


# d86cc385 08-Apr-2020 Mariusz Zaborski <oshogbo@FreeBSD.org>

logger: temporarily disable Capsicum when a host is provided

We don't have a way to send a UDP package.

PR: 245314
Reported by: dch
Discussed with: emaste


# 8838296e 12-Mar-2020 Mariusz Zaborski <oshogbo@FreeBSD.org>

logger: capsicumize

Submitted by: Tiger Gao <tig@freebsdfoundation.org>
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D23744


# 488ee96b 27-May-2018 Eric van Gyzen <vangyzen@FreeBSD.org>

logger: fix memory leak and use-after-free

This one call to getaddrinfo() did not adhere to the common idiom
of storing the result into a second res0 variable, which is later freed.

Reported by: Coverity
CID: 1368069 1368071
Sponsored by: Dell EMC


# 2ff3551a 06-Dec-2017 Gleb Smirnoff <glebius@FreeBSD.org>

Fix crash with a dotless hostname.


# 65547fb3 05-Dec-2017 Gleb Smirnoff <glebius@FreeBSD.org>

Generate fully RFC3164 compliant messages, with timestamp and hostname.
Allow to set hostname to any string with -H.

MFC after: 2 months


# 8a16b7a1 20-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

General further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.


# 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


# 8f14a1af 24-Dec-2016 Hiroki Sato <hrs@FreeBSD.org>

Fix gcc build.

Spotted by: lidl


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

- Add -S option to specify the source address/port for UDP communication.
- Document -S option.
- Document that -h option supports AF_LOCAL.
- Split preparation of UDP sockets in logmessage() into socksetup().


# 39893d56 19-Oct-2012 Ed Schouten <ed@FreeBSD.org>

Add missing const keywords.


# 481bce6c 06-Nov-2011 Ed Schouten <ed@FreeBSD.org>

Add missing static keywords to logger(1)


# 81280940 07-Apr-2011 Edwin Groothuis <edwin@FreeBSD.org>

When specifying the -t option (send tag in front of message), this tag
should also be forwarded to the remote logging host, not only when the
logging is done locally.

PR: bin/154324
Submitted by: Callum Gibson <callumgibson@optusnet.com.au>
MFC after: 1 week


# da52b4ca 11-Dec-2010 Joel Dahl <joel@FreeBSD.org>

Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with: imp, rwatson


# 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.


# 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.


# 4145bb53 30-Oct-2009 Kirk McKusick <mckusick@FreeBSD.org>

When reading input from a file or device (via -f option) set the
input to be in non-buffering mode so that input lines are logged
as they occur rather than being saved up until a buffer's worth of
input has been logged.


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

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


# d870d44d 05-Feb-2008 David E. O'Brien <obrien@FreeBSD.org>

Minor style(9) nit.


# 6f62d863 07-May-2007 David Malone <dwmalone@FreeBSD.org>

Make logmsg take const char * arguments.
Set WARNS to 6.


# 6b04b7f6 02-Aug-2006 Bruce M Simpson <bms@FreeBSD.org>

Add a new command-line option, -P, which allows the user to specify
an arbitrary port to which syslog messages are to be sent.

PR: bin/54026
Submitted by: Oliver Fromme
MFC after: 10 days


# 865059c8 29-May-2005 Philippe Charnier <charnier@FreeBSD.org>

Reduce compiler warning: variable might be used uninitialized, by giving
an initial value.


# f4ac32de 04-Sep-2002 David Malone <dwmalone@FreeBSD.org>

ANSIify function definitions.
Add some constness to avoid some warnings.
Remove use register keyword.
Deal with missing/unneeded extern/prototypes.
Some minor type changes/casts to avoid warnings.

Reviewed by: md5


# e026a48c 29-Jun-2002 David E. O'Brien <obrien@FreeBSD.org>

Consistently use FBSDID


# 9bd5ae85 01-Apr-2002 David Malone <dwmalone@FreeBSD.org>

1) Use FBSDID for vendor string.
2) Change an int for a size_t, as that's what it is mainly used for.
3) Add some braces to keep gcc happy.


# f1bb2cd2 21-Mar-2002 Warner Losh <imp@FreeBSD.org>

remove __P


# 57c1a0b6 27-Feb-2002 Bill Fenner <fenner@FreeBSD.org>

Improve error reporting - report error message when there is one, or
report a short read if that's what we're reporting.


# ca122bf7 05-Sep-2001 Ruslan Ermilov <ru@FreeBSD.org>

The default for -p was ``kern.notice'' in the -h case.
Make it ``user.notice'', as per manpage.

(The syslog(3) function defaults to LOG_USER facility
if none is specified, but we don't use syslog() in the
-h case.)

PR: docs/30374
Noticed by: SUGIMURA Takashi <sugimura@jp.FreeBSD.org>


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

IPv6 support for logger.

Reviewed by: freebsd-current


# b0fe2da8 18-Jul-2000 David Malone <dwmalone@FreeBSD.org>

Allow logger to send messages directly to a remote syslog. (This
only does IPv4 as our syslogd only does IPv4. I dunno if the KAME
people have any plans for syslogd).

PR: 19821
Submitted by: Nick Hilliard <nick@iol.ie>
Reviewed by: sheldonh


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

$Id$ -> $FreeBSD$


# df071556 22-Jul-1997 Philippe Charnier <charnier@FreeBSD.org>

Use err(3).


# 1c8af878 28-Mar-1997 Warner Losh <imp@FreeBSD.org>

compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.


# 40244c28 21-Oct-1996 Poul-Henning Kamp <phk@FreeBSD.org>

unset TZ from the environment so the timestamp gets the system default,
which is what syslogd presumably uses too. Notice that the "protocol"
is bogus in not defining the timezone. "protocol" because it hardly
deserves the name :-)

closes bin/1739

Reported by: Stefan Zehl <sec@wg.camelot.de>


# 9b50d902 26-May-1994 Rodney W. Grimes <rgrimes@FreeBSD.org>

BSD 4.4 Lite Usr.bin Sources