summaryrefslogtreecommitdiffstats
path: root/usr.sbin/syslogd
Commit message (Collapse)AuthorAgeFilesLines
* Syslogd normally converts messages of facility kern to facilitydwmalone2000-10-173-3/+30
| | | | | | | | | | 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>
* Fix spelling of comparison.dwmalone2000-10-171-2/+2
|
* Add forgotten -n option to SYNOPSIS sectionalfred2000-09-231-1/+1
| | | | Submitted by: Reinier Bezuidenhout <rbezuide@oskar.nanoteq.co.za>
* Fix unexploitable off by one error as mentioned on Bugtraq.imp2000-09-191-2/+1
|
* Update the usage string to reflect -n as an option.ps2000-08-071-1/+1
|
* Actually make syslogd understand the new -n option by putting itps2000-08-071-1/+1
| | | | | | in getopt. Submitted by: Clive Lin <clive@CirX.ORG>
* Sort cases in getopt switch statement.dwmalone2000-08-031-31/+32
| | | | | | | | | | 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
* Replace two calls to strlen+calloc+strcpy with strdup.dwmalone2000-08-031-12/+4
| | | | Reviewed by: sheldonh
* Change option -r to -n inline with conventions we use elsewhere.ps2000-07-292-5/+5
| | | | | | | I guess it serves me right for using a patch directly from Jan Koum. :) Requested by: many
* Add option 'r' to syslogd which will disable dns queries for everyps2000-07-292-3/+12
| | | | | | | request. This is useful when you have a large site pointed at a single syslog server. Submitted by: Jan Koum <jkb@yahoo-inc.com>
* Allow syslogd to select messages based on the originating host indwmalone2000-07-242-16/+114
| | | | | | | | | | | | | | | | 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
* Prevent a non-exploitable remote buffer overflow.kris2000-06-081-3/+3
| | | | | | Reported by: twitch <twitch@vicar.org> Submitted by: Guido van Rooij <guido@gvr.org> Reviewed by: security-officer
* Back out the previous change to the queue(3) interface.jake2000-05-261-2/+2
| | | | | | It was not discussed and should probably not happen. Requested by: msmith and others
* Change the way that the queue(3) structures are declared; don't assume thatjake2000-05-231-2/+2
| | | | | | | | the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd
* Enable 8bit chars excepting high controlsache2000-04-181-4/+10
|
* Remove single-space hard sentence breaks. These degrade the qualitysheldonh2000-03-012-6/+12
| | | | | of the typeset output, tend to make diffs harder to read and provide bad examples for new-comers to mdoc.
* Fix a nit in my previous commit: make SIGHUP and SIGCHLD restartablejoerg2000-02-291-2/+2
| | | | | | | | 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
* Fix a serious bug in syslogd regarding the handling of pipes. The bugjoerg2000-02-281-35/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* s|/dev/log|/var/run/log|peter2000-02-141-1/+1
|
* Add section number to .Xr. Use .Pa for filenames.charnier2000-01-233-12/+15
| | | | fprintf -> warnx.
* Do this the Right Way (tm), i.e. use shutdown() instead of fooling arounddes2000-01-141-6/+2
| | | | | | with the size of the receive buffer. Pointed out by: ru
* Reflect the change in secure mode semantics, and document fascist modedes2000-01-141-3/+2
| | | | properly.
* Slight change of secure mode semantics: instead of reading (and counting)des2000-01-141-13/+16
| | | | | | | | | 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.
* Fix page fault in -vv mode.ru2000-01-131-2/+2
| | | | | | PR: 16098 Submitted by: Alan.Judge@indigo.ie Reviewed by: ru
* $Id$ -> $FreeBSD$peter1999-08-283-3/+3
|
* This is the addition of a syslog(3) security.* top-level category. Thisgreen1999-08-211-5/+4
| | | | | | | | | 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
* Make hostname comparisons case insensitivebrian1999-08-171-4/+5
|
* readklog(): rename variable 'l' to 'len', to avoid possible confusion with 'i'dt1999-05-061-11/+11
| | | | | | and '1'. Requested by: mckay
* Is there a limit to how stupid I can get?des1999-05-041-2/+2
|
* Little fix in previous: watch NUL-termination.dt1999-05-021-2/+2
|
* Fight with false newlines in kernel message logs. Output a line into log onlydt1999-05-021-37/+64
| | | | | after we read a newline, or we have nothing to read from /dev/klog. Read /dev/klog in non-blocking mode.
* Implement fascist mode (do not open a datagram socket at all).des1999-04-302-7/+9
|
* Ensure a terminating null when processing hostname strings fromcwt1998-12-291-4/+7
| | | | | arbitrary sources. Obtained from: OpenBSD
* Accept "!*" as a valid all-programs tag line as documented.cwt1998-12-291-2/+2
| | | | | PR: 8447 Submitted by: Gaspar Chilingarov <nightmar@lemming.acc.am>
* Block SIGHUP during call to gethostbyaddr().cwt1998-12-281-1/+6
| | | | | | PR: 5548 Reviewed by: Matthew Dillon <dillon@apollo.backplane.com> Obtained from: OpenBSD
* Allow either tabs or spaces in configuration files.jkh1998-12-042-10/+22
| | | | | PR: 8762 Submitted by: Igor Roshchin <str@giganda.komkon.org>
* When warning about discarding packets in secure mode, include the IPdg1998-11-051-2/+3
| | | | address of the most recent offender.
* Submitted by: archie@whistle.comjulian1998-08-252-3/+4
| | | | quieten cc -Wall
* Harlan.Stenn@pfcs.com added two (very interesting) options to syslogd forphk1998-07-271-3/+3
| | | | | | | | | | -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>
* Add -u, -v and -vv options to syslogd, this improves the control andphk1998-07-223-17/+147
| | | | | | | logging verbosity about facility & priority levels. PR: 7278 Reviewed by: phk Submitted by: Harlan Stenn <Harlan.Stenn@pfcs.com>
* Fixed printf format errors.bde1998-07-061-2/+2
|
* Fix off by 1 error.guido1998-07-021-2/+2
|
* Note in log file if messages are being forwarded from asteve1998-06-271-2/+9
| | | | | | | remote machine. PR: 7055 Submitted by: Edwin Groothus <edwin@nwm.wan.philips.com>
* Implement new argument -l (OpenBSD has -a but we already use that).guido1998-06-252-59/+98
| | | | | | | 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
* Reviewed by: guido@mouse.gvr.orgjulian1998-06-241-25/+18
| | | | | | Submitted by: Archie@whistle.com redo the last patch to allow differentiated kernel logging in a much better way.
* Allow syslogd to separate out kernel log messages with a knownjulian1998-06-102-6/+22
| | | | | | | | | category. e.g. separate out ipfw entries to a separate file. Reviewed by: (briefly) phk Submitted by: archie@whistle.com Obtained from: Whistle source tree
* Remove a bogus dependency on the size of the inkernel msgbuf.phk1998-05-191-4/+3
| | | | | | | | | This change is likely to introduce a few linebreaks in the boot messages, but that is not easy to solve without breaking syslogd semantics. Maybe the right fix is to return an integral number of lines from the kernel driver. Noticed by: dg
* Make syslogd function in non-secure mode.brian1998-05-071-4/+4
| | | | Log the correct ^2 packet as per the last commit comment.
* Augment the last change after some deliberation with rgrimes & peter.phk1998-04-242-25/+35
| | | | | | | | 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.
* Even with '-s', syslogd still creates an AF_INET socket, althoughphk1998-04-221-23/+22
| | | | | | | | it is not bind(2)ed. PR: 6366 Reviewed by: phk Submitted by: Soren S. Jorvang <soren@dt.dk>
OpenPOWER on IntegriCloud