Commit Graph

170 Commits

Author SHA1 Message Date
wiz 1ac719d147 Remove unnecessary Bk/Ek pairs from SYNOPSIS.
No effective change except where I used the opportunity to sort options
and/or option descriptions.
2012-04-08 22:00:37 +00:00
christos 537334cc90 add aliases for the protocol format 2012-03-28 17:39:33 +00:00
spz 5091f3689d fix resource leaks and NULL uses found by Coverity scan.
Releng-ok by riz
2012-02-13 07:40:24 +00:00
joerg 70f70a6342 Simplify. 2011-10-07 10:50:01 +00:00
plunky 9f61b80465 NULL does not need a cast 2011-08-31 16:24:54 +00:00
mbalmer 631d5867a0 According to the Oxford Dictionary of Etymology, a wether is a male sheep
or ram.
2011-08-01 12:28:53 +00:00
enami 7a059b3bd9 Now need to use own buffer for klog read due to previous change. 2011-06-20 08:27:15 +00:00
enami 9394c08bbe Defer the processing of incomplete line at the end of buffer so that
kernel printf messages logged to /var/log/messages become always
easier to read.
2011-06-20 00:42:11 +00:00
joerg 9d62088ad4 Properly use format strings 2011-05-24 13:26:41 +00:00
joerg b7d3c3b035 Explicitly mark a NEWREF as unused 2011-05-24 13:26:04 +00:00
joerg aeb74a68bf Properly use format strings 2011-05-24 13:25:25 +00:00
riz 634f514ee6 Allow syslogd to compile when MKCRYPTO=no. No promises as to whether
it works or not, as this has been broken since late 2008, when the
"encrypted connections" support was added to syslogd.
2010-06-09 21:55:42 +00:00
tnozaki 50eb6aadde cast isblank(3)'s argument to unsigned char. 2010-05-13 17:52:11 +00:00
wiz 31ac57e452 Fix previous: Dd argument and lost Em markup. 2010-01-01 21:44:07 +00:00
mbalmer acf41ffe98 fold long lines. 2010-01-01 21:26:18 +00:00
plunky 8ac5e94172 reinstate a sentence partly removed in v1.43 regarding the default
facility/priority for local kernel messages
2009-10-15 20:35:07 +00:00
yamt 805e61e887 draft-ietf-syslog-protocol-23 -> RFC 5424 2009-07-16 13:33:44 +00:00
lukem d877c4c3c0 Enable WARNS=4 by default, except for:
cpuctl  dumplfs  hprop  ipf  iprop-log  kadmin  kcm  kdc  kdigest
	kimpersonate  kstash  ktutil  makefs  ndbootd  ntp  pppd  quot
	racoon  racoonctl  rtadvd  sntp  sup  tcpdchk  tcpdmatch  tcpdump
	traceroute  traceroute6  user  veriexecgen  wsmoused  zic
(Mostly third-party applications)
2009-04-22 15:23:01 +00:00
mschuett 0d53a16d76 Add queue macros SLIST_FOREACH_SAFE, STAILQ_FOREACH_SAFE, STAILQ_LAST,
SIMPLEQ_CONCAT, and SIMPLEQ_LAST.

Remove seperate definitions outside of queue.h.
2009-04-20 09:56:07 +00:00
joerg d87cddc68e .br -> .Pp, capitalize subsection titles 2009-04-09 02:41:44 +00:00
mschuett 499d95ff35 PR/40563: Takahiro Hayashi: syslogd(8) refers freed pointer on exiting 2009-02-06 21:09:46 +00:00
wiz e0de6d25c7 Bump date for previous. 2009-02-01 12:59:05 +00:00
yamt 168debd7ec note some options' optarg in DESCRIPTION as well. 2009-02-01 08:12:25 +00:00
yamt ca6221a5b3 make -o option consistent with others. 2009-02-01 07:55:42 +00:00
mschuett c998ee30ad PR/40438: Takahiro Hayashi: syslogd(8) refers freed area 2009-01-22 21:10:52 +00:00
lukem 64d3f79556 sign-compare fixes for amd64 2009-01-22 10:45:35 +00:00
lukem 7e0b2295e7 fix -Wsign-compare issues 2009-01-18 10:35:26 +00:00
christos 433a3ec2f3 fix suseconds_t format. 2008-12-29 03:45:23 +00:00
christos b3ed889133 PR/40043: Geoff C. Wing: syslogd timestamping and protocol parsing deficiencies
Syslogd does not properly handle:

1) the ADDDATE flag which is set with -T invocation and when messages
   come from the kernel.  Other cases where it is set it is ignored
   as timestamping is always done (e.g. logmsg_async())

2) the variable found_ts in check_timestamp().  It would determine
   whether or not the message had a (possibly valid) timestamp, set
   found_ts to true, then ignore that in most cases.  If we can't find
   a timestamp return.

3) messages without a parsable timestamp should get one when outputting
   the BSD syslog format so that a syslog-protocol timestamp isn't
   injected (chopped off with BSD syslog length) giving something like:
    "2008-11-27T15:0 cisco -: 1790:"
     ^ time might have been 2008-11-27T15:02:35.296497+11:00

4) syslog protocol version checking only checked for a leading numeral
   one (1) then skipped two places (presuming a space).  Messages sent
   from some sources (e.g. my cisco) may be
     "1795: Nov 27 04:12:52: %LINEPROTO-5-..."
   which would be chopped to
       "95: Nov 27 04:12:52: %LINEPROTO-5-..."
2008-11-27 20:37:21 +00:00
christos 61a52fac84 PR/39874: Geoff C. Wing: For compatibility trim hostname domains in bsd
output format when matching host lines.
2008-11-07 15:42:01 +00:00
minskim a325bf28ac Remove trailing whitespace. 2008-11-07 07:36:38 +00:00
christos 00f6effc9c use localtime_r 2008-11-04 18:52:25 +00:00
blymn d08a89fb84 Call tzset() to init TZ information for localtime(). 2008-11-04 10:01:56 +00:00
christos 9d5a7031b8 make sure that we memset the struct tm we pass to mktime and set isdst to -1
so that it will figure out if daylight savings is to be applied or not. From
Anon Ymous
2008-11-03 22:59:51 +00:00
christos 88283dd7fa no point in using int_fast16_t here. 2008-11-03 15:08:16 +00:00
christos 79e7aba61d PR/39857: Bernd Ernesti: Fix broken output caused by a wrong offset. From
Martin Schuette.
2008-11-03 02:44:01 +00:00
christos 1c6aec2060 Import syslogd SoC project by Martin Schuette:
- new syslog protocol api syslogp(3) that supports structured data
	  and draft-rfc timestamps
	- reliable tcp connections with queueing
	- encrypted connections
2008-10-31 16:12:18 +00:00
lukem 9c1945664c Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
2008-07-21 13:36:57 +00:00
dholland 16e3bec279 Clarify how one is supposed to use the pointers returned by getutentries()
(the utmpentry.c code), specifically with respect to who owns them and
when to free them. Now they're owned by utmpentry.c, only. Abolish the
freeutentries() function, which was the wrong abstraction; add instead
endutentries(), which flushes out the internally managed memory.

Update callers as necessary. Some (e.g. talkd) had been leaking memory;
others (e.g. syslogd) had been accidentally freeing and reloading utmp
more often than necessary. There are a couple untidy bits in users and
rwhod that someone should look after sometime, maybe.

Fixes PR bin/35131, which was about talkd's memory leak.
2008-07-13 20:07:48 +00:00
tls 4147a3c54a Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry.  RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros.  Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default.  Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
2007-05-28 12:06:17 +00:00
christos 381520cf11 PR/34979: Scott Ellis: Detect 0 length name and skip it instead of infinite
loop.
2006-11-13 20:24:00 +00:00
yamt 6c6dad782f matches_spec: fix a bug so that "+host111,host1" actually matches to host1.
add a simple sanity check.
2006-10-21 09:42:26 +00:00
christos 6ec268c772 PR/30879: Jukka Salmi: syslogd(8) doesn't parse `@' hostname specification
correctly
2006-09-16 17:05:32 +00:00
christos 6051bcc73f PR/28753: Martin J. Laubach: syslogd disables remote logging on non-fatal errors 2006-09-16 16:57:27 +00:00
wiz 8d3165ac32 Sync usage with man page (-b). 2006-09-16 06:34:55 +00:00
christos ca09b578d0 PR/14563: Brian A. Seklecki: syslogd binds udp sockets on all interfaces
Add -b option to pass a bind address.
2006-09-15 20:32:59 +00:00
snj a640fe8c43 It's "its." 2006-04-24 19:00:29 +00:00
wiz 66784c2d94 Add -T to SYNOPSIS. 2006-04-23 16:51:56 +00:00
wiz c658b10ae0 Fix typo. 2006-04-23 16:51:18 +00:00
pavel 43bd0b5956 PR 32579: Add a -T flag to syslogd, which causes it to use local time for
messages received from the network. Useful for collecting logs from
devices which do not have correct time.

Add it to usage.

Document it, also document that syslogd adds a timestamp with the local
time if it does not recognize the original timestamp field. Bump date.

Approved by wrstuden@.
2006-04-19 21:18:50 +00:00