Commit Graph

65 Commits

Author SHA1 Message Date
Fernando Apesteguía
4bbc8ee29e logger.1: Clarify -i flag
The PID of the logger process is always recorded along with the move from RFC
3164 to RFC 5424.

Indicate the -i flag is a no-op now in logger(1).

Related to a similary change in syslog.3

Reported by:	danfe@
Approved by:	manpages (0mp)
Fixes:	94eb6c42ab
Differential Revision:	https://reviews.freebsd.org/D34578
2022-03-16 11:41:55 +01:00
Emmanuel Vadot
93c4369096 pkgbase: Put more binaries/lib in runtime
Move some needed binaries/libs from FreeBSD-utilities to FreeBSD_runtime.
This is everything needed to boot to multiuser with FreeBSD-rc installed.

MFC after:	2 weeks
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D33435
2021-12-21 10:17:27 +01:00
Mariusz Zaborski
d86cc38525 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
2020-04-08 18:43:00 +00:00
Mariusz Zaborski
8838296e56 logger: capsicumize
Submitted by:	Tiger Gao <tig@freebsdfoundation.org>
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D23744
2020-03-12 19:55:51 +00:00
Eric van Gyzen
488ee96b85 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
2018-05-28 02:40:06 +00:00
Gleb Smirnoff
2ff3551a47 Fix crash with a dotless hostname. 2017-12-06 17:50:10 +00:00
Gleb Smirnoff
65547fb33d Generate fully RFC3164 compliant messages, with timestamp and hostname.
Allow to set hostname to any string with -H.

MFC after:	2 months
2017-12-05 19:55:53 +00:00
Pedro F. Giffuni
8a16b7a18f 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.
2017-11-20 19:49:47 +00:00
Bryan Drewery
ea825d0274 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:04 +00:00
Warner Losh
fbbd9655e5 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
2017-02-28 23:42:47 +00:00
Hiroki Sato
8f14a1af12 Fix gcc build.
Spotted by:	lidl
2016-12-24 22:51:02 +00:00
Hiroki Sato
39bb7275fb mdoc fixes. 2016-12-23 04:38:27 +00:00
Hiroki Sato
a04667ab17 - 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().
2016-12-22 23:39:11 +00:00
Simon J. Gerraty
ccfb965433 Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
Simon J. Gerraty
44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
Simon J. Gerraty
98e0ffaefb Merge sync of head 2015-05-27 01:19:58 +00:00
Warren Block
8c2eccbf4b Describe the behavior when both -f and a message are given. Pointed out by
Raphael Abreu <raphael.lorenzeto@gmail.com> on freebsd-doc.

MFC after:	1 week
2015-03-22 01:25:57 +00:00
Simon J. Gerraty
fae50821ae Updated dependencies 2014-05-16 14:09:51 +00:00
Simon J. Gerraty
76b28ad6ab Updated dependencies 2014-05-10 05:16:28 +00:00
Simon J. Gerraty
cc3f4b9965 Merge from head 2014-05-08 23:54:15 +00:00
Warner Losh
c6063d0da8 Use src.opts.mk in preference to bsd.own.mk except where we need stuff
from the latter.
2014-05-06 04:22:01 +00:00
Simon J. Gerraty
3b8f084595 Merge head 2014-04-28 07:50:45 +00:00
Brad Davis
3e5184c65f - Clarify usage of the -f option.
Reviewed by:	gjb@, dru@, and Allan Jude
2014-03-05 02:10:10 +00:00
Simon J. Gerraty
7cf3a1c6b2 Updated dependencies 2013-03-11 17:21:52 +00:00
Simon J. Gerraty
f5f7c05209 Updated dependencies 2013-02-16 01:23:54 +00:00
Simon J. Gerraty
23090366f7 Sync from head 2012-11-04 02:52:03 +00:00
Ed Schouten
39893d565a Add missing const keywords. 2012-10-19 14:29:03 +00:00
Marcel Moolenaar
7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Ed Schouten
481bce6c91 Add missing static keywords to logger(1) 2011-11-06 08:15:53 +00:00
Edwin Groothuis
8128094045 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
2011-04-08 12:33:07 +00:00
Joel Dahl
da52b4caaf 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
2010-12-11 08:32:16 +00:00
Ed Schouten
b7946da96b Build usr.bin/ with WARNS=6 by default.
Also add some missing $FreeBSD$ to keep svn happy.
2010-01-02 10:27:05 +00:00
Kirk McKusick
4145bb53bf 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.
2009-10-30 21:54:53 +00:00
David E. O'Brien
d870d44d20 Minor style(9) nit. 2008-02-05 17:34:44 +00:00
David Malone
6f62d86388 Make logmsg take const char * arguments.
Set WARNS to 6.
2007-05-07 11:28:01 +00:00
Ruslan Ermilov
cb29445a92 Markup fixes. 2006-09-29 15:20:48 +00:00
Bruce M Simpson
abfdccc7ce Update document date.
Noticed by:	ru
2006-08-03 20:43:51 +00:00
Bruce M Simpson
6b04b7f63e 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
2006-08-02 13:21:44 +00:00
Yaroslav Tykhiy
2cc3124e10 Obey MK_INET6_SUPPORT. 2006-07-27 14:20:14 +00:00
Philippe Charnier
865059c8a8 Reduce compiler warning: variable might be used uninitialized, by giving
an initial value.
2005-05-29 16:04:46 +00:00
Ruslan Ermilov
a866e17077 Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
Ruslan Ermilov
557b7fa148 Deal with double whitespace. 2004-07-03 00:24:45 +00:00
Christian Brueffer
3e32fa3860 Clarify the describtion of the -A switch
PR:		51187
Submitted by:	Jeff Ito <jeffi@rcn.com>
Approved by:	re (jhb)
MFC after:	3 days
2003-05-21 15:00:47 +00:00
David Malone
f4ac32def2 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
2002-09-04 23:29:10 +00:00
David E. O'Brien
e026a48c34 Consistently use FBSDID 2002-06-30 05:25:07 +00:00
Philippe Charnier
8cd319f71a .Nm is not required at the begining of this sentence. 2002-04-20 21:33:10 +00:00
Philippe Charnier
e8937ba009 Use `The .Nm utility' 2002-04-20 12:18:28 +00:00
David Malone
9bd5ae8568 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.
2002-04-01 11:06:00 +00:00
Warner Losh
f1bb2cd2aa remove __P 2002-03-22 01:22:50 +00:00
Bill Fenner
57c1a0b6bf Improve error reporting - report error message when there is one, or
report a short read if that's what we're reporting.
2002-02-27 22:38:59 +00:00