Commit Graph

97 Commits

Author SHA1 Message Date
cwt
54127cc6ae Document LOG_CONSOLE. 2001-03-27 19:55:53 +00:00
ru
b15a893144 - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:42:20 +00:00
brian
fd7742d126 MAXHOSTNAMELEN includes the NUL 2001-03-09 21:24:13 +00:00
ru
0b8c9cff2d Prepare for mdocNG. 2001-02-26 09:05:48 +00:00
dwmalone
2c33ac35e8 This seems to stop syslog console messages looping. The problem
is that LOG_FAC doesn't do quite what you think it does.

PR:		24704
2001-02-04 15:16:08 +00:00
ru
606eb8b7a4 mdoc(7) police: split punctuation characters + misc fixes. 2001-02-01 16:44:04 +00:00
ru
522216623a Prepare for mdoc(7)NG. 2000-12-27 15:30:30 +00:00
ru
f144e2e209 mdoc(7) police: document IPv6 options in the SYNOPSIS. 2000-12-18 08:42:58 +00:00
ume
e4a876193f IPv6 support for syslogd.
Reviewed by:	freebsd-current
Obtained from:	NetBSD
2000-12-16 18:25:48 +00:00
phk
cc4398d1b8 Add the "LOG_CONSOLE" facility and tell syslogd to not log it on
console devices.
2000-11-25 21:00:58 +00:00
ru
c3189e713e mdoc(7) police: use the new features of the Nm macro. 2000-11-20 20:10:44 +00:00
dwmalone
a202f660bd 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>
2000-10-17 10:19:42 +00:00
dwmalone
33b04fbcd3 Fix spelling of comparison. 2000-10-17 10:14:51 +00:00
alfred
d49bef6eca Add forgotten -n option to SYNOPSIS section
Submitted by: Reinier Bezuidenhout <rbezuide@oskar.nanoteq.co.za>
2000-09-23 22:38:56 +00:00
imp
0297a25aa2 Fix unexploitable off by one error as mentioned on Bugtraq. 2000-09-19 21:22:20 +00:00
ps
e93377cb7c Update the usage string to reflect -n as an option. 2000-08-07 01:09:25 +00:00
ps
f4f70a2963 Actually make syslogd understand the new -n option by putting it
in getopt.

Submitted by:	Clive Lin <clive@CirX.ORG>
2000-08-07 01:00:01 +00:00
dwmalone
05d3543326 Sort cases in getopt switch statement.
Remove extra parens from my host selection commit.
Add white space after if, while, for and switch.
Get rid of braces around a single statement if.

There should be no functional changes in this commit.

Reviewed by:	sheldonh
2000-08-03 15:19:27 +00:00
dwmalone
e69611923f Replace two calls to strlen+calloc+strcpy with strdup.
Reviewed by:	sheldonh
2000-08-03 15:12:06 +00:00
ps
6ab1d5bc11 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
2000-07-29 04:02:34 +00:00
ps
7389ff466a 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>
2000-07-29 01:37:37 +00:00
dwmalone
5f1776742f Allow syslogd to select messages based on the originating host in
a similar way to the way it can select messages from a given program.

Lines beginning with "+hostname" or "#+hostname" select messaes
from that hostname and lines beginning with "-hostname" or "#-hostname"
match messages not from that hostname.

There are some significant style issues left in the original program
selection code and the man page. This should be cleared up in some
later commits.

Reviewed by:	sheldonh
Based on an original patch by:    Bernd Walter <ticso@cicely8.cicely.de>
Man page stylist:	sheldonh
2000-07-24 14:10:17 +00:00
kris
8f4c61bafe Prevent a non-exploitable remote buffer overflow.
Reported by:	twitch <twitch@vicar.org>
Submitted by:	Guido van Rooij <guido@gvr.org>
Reviewed by:	security-officer
2000-06-08 03:54:45 +00:00
jake
5e208b0c18 Back out the previous change to the queue(3) interface.
It was not discussed and should probably not happen.

Requested by:		msmith and others
2000-05-26 02:09:24 +00:00
jake
1d685644e0 Change the way that the queue(3) structures are declared; don't assume that
the type argument to *_HEAD and *_ENTRY is a struct.

Suggested by:	phk
Reviewed by:	phk
Approved by:	mdodd
2000-05-23 20:41:01 +00:00
ache
924a528c64 Enable 8bit chars excepting high controls 2000-04-18 01:12:27 +00:00
sheldonh
840cf958b8 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.
2000-03-01 14:09:25 +00:00
joerg
f04206b89d Fix a nit in my previous commit: make SIGHUP and SIGCHLD restartable
as they ought to be.  The description of SA_RESTART was a little
unobvious to me in the man page, so i missed it.  Thanks to Bruce for
spotting this.

Submitted by:	bde
2000-02-29 08:02:29 +00:00
joerg
ff11e8a834 Fix a serious bug in syslogd regarding the handling of pipes. The bug
would cause syslogd to eventually kill innocent processes in the
system over time (note: not `could' but `would').  Many thanks to my
colleague Mirko for digging into the kernel structures and providing
me with the debugging framework to find out about the nature of this
bug (and to isolate that syslogd was the culprit) in a rather large
set of distributed machines at client sites where this happened
occasionally.

Whenever a child process was no longer responsive, or when syslogd
receives a SIGHUP so it closes all its logging file descriptors, for
any descriptor that refers to a pipe syslogd enters the data about the
old logging child process into a `dead queue', where it is being
removed from (and the status of the dead kitten being fetched) upon
receipt of a SIGCHLD.  However, there's a high probability that the
SIGCHLD already arrives before the child's data are actually entered
into the dead queue inside the SIGHUP handler, so the SIGCHLD handler
has nothing to fetch and remove and simply continues.  Whenever this
happens, the process'es data remain on the dead queue forever, and
since domark() tried to get rid of totally unresponsive children by
first sending a SIGTERM and later a SIGKILL, it was only a matter of
time until the system had recycled enough PIDs so an innocent process
got shot to death.

Fix the race by masking SIGHUP and SIGCHLD from both handlers mutually.

Add additional bandaids ``just in case'', i. e. don't enter a process
into the dead queue if we can't signal it (this should only happen in
case it is already dead by that time so we can fetch the status
immediately instead of deferring this to the SIGCHLD handler); for the
kill(2) inside domark(), check for an error status (/* Can't happen */
:) and remove it from the dead queue in this case (which if it would
have been there in the first place would have reduced the problem to a
statistically minimal likelihood so i certainly would never have
noticed the bug at all :).

Mirko also reviewed the fix in priciple (mutual blocking of both
signals inside the handlers), but not the actual code.

Reviewed by:	Mirko Kaffka <mirko@interface-business.de>
Approved by:	jkh
2000-02-28 17:49:43 +00:00
peter
43cc86d8ca s|/dev/log|/var/run/log| 2000-02-14 13:26:57 +00:00
charnier
34f4f7cf0d Add section number to .Xr. Use .Pa for filenames.
fprintf -> warnx.
2000-01-23 20:22:23 +00:00
des
35eca73cb5 Do this the Right Way (tm), i.e. use shutdown() instead of fooling around
with the size of the receive buffer.

Pointed out by:	ru
2000-01-14 15:37:18 +00:00
des
da167a6077 Reflect the change in secure mode semantics, and document fascist mode
properly.
2000-01-14 15:10:36 +00:00
des
4996cf2722 Slight change of secure mode semantics: instead of reading (and counting)
vogons, set the size of the receive buffer to 1 and rely on the kernel to
simply drop incoming packets. The logging code was buggy anyway.

Use socklen_t instead of int for the length argument to recvfrom.

Add a 'continue' at the end of a loop for ANSI conformance.
2000-01-14 15:09:06 +00:00
ru
ebd35496e2 Fix page fault in -vv mode.
PR:		16098
Submitted by:	Alan.Judge@indigo.ie
Reviewed by:	ru
2000-01-13 12:59:58 +00:00
peter
b6784c4210 $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
green
c50c45093a This is the addition of a syslog(3) security.* top-level category. This
should be used from now on for anything security but not auth-related.
Included are updates for all relevant manpages and also to /etc files,
creating a new /var/log/security. Nothing in the system logs to
/var/log/security yet as of the time of this commit.

Reviewed by:	rgrimes, imp, chris
1999-08-21 18:24:29 +00:00
brian
f665b4bb4c Make hostname comparisons case insensitive 1999-08-17 01:25:16 +00:00
dt
a40140cb32 readklog(): rename variable 'l' to 'len', to avoid possible confusion with 'i'
and '1'.

Requested by:	mckay
1999-05-06 13:57:57 +00:00
des
eabb651409 Is there a limit to how stupid I can get? 1999-05-04 18:03:59 +00:00
dt
571d49c931 Little fix in previous: watch NUL-termination. 1999-05-02 17:44:16 +00:00
dt
ae0d86d7b2 Fight with false newlines in kernel message logs. Output a line into log only
after we read a newline, or we have nothing to read from /dev/klog. Read
/dev/klog in non-blocking mode.
1999-05-02 12:47:09 +00:00
des
26befb30f3 Implement fascist mode (do not open a datagram socket at all). 1999-04-30 12:51:20 +00:00
cwt
db7c57416f Ensure a terminating null when processing hostname strings from
arbitrary sources.
Obtained from:	OpenBSD
1998-12-29 23:14:50 +00:00
cwt
414efac300 Accept "!*" as a valid all-programs tag line as documented.
PR:		8447
Submitted by:	Gaspar Chilingarov <nightmar@lemming.acc.am>
1998-12-29 20:36:22 +00:00
cwt
18e7ae2d82 Block SIGHUP during call to gethostbyaddr().
PR: 5548
Reviewed by: Matthew Dillon <dillon@apollo.backplane.com>
Obtained from: OpenBSD
1998-12-28 00:39:14 +00:00
jkh
a4871f2fc3 Allow either tabs or spaces in configuration files.
PR:		8762
Submitted by:	Igor Roshchin <str@giganda.komkon.org>
1998-12-04 06:49:20 +00:00
dg
4a3c12279a When warning about discarding packets in secure mode, include the IP
address of the most recent offender.
1998-11-05 10:51:21 +00:00
julian
837c547de1 Submitted by: archie@whistle.com
quieten cc -Wall
1998-08-25 21:16:47 +00:00
phk
be60b306f6 Harlan.Stenn@pfcs.com added two (very interesting) options to syslogd for
-current (Thanks Harald). However, on my attempt to try this on -STABLE,
I found that when forwarding to another host the actual messages gets lost.
This is due to a wrong index because when the -v option was added, the
indexes shifted one place.

PR:		7407
Submitted by:	Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
1998-07-27 13:04:14 +00:00