summaryrefslogtreecommitdiffstats
path: root/usr.sbin/syslogd/syslogd.c
Commit message (Collapse)AuthorAgeFilesLines
...
* 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-251-57/+87
| | | | | | | 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-101-4/+15
| | | | | | | | | 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-241-23/+31
| | | | | | | | 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>
* Don't assume sigset_t and int are equivalent. Also, getjraynard1998-02-281-6/+8
| | | | sigprocmask arguments the right way round.
* Cosmetic in usage string.charnier1997-10-201-9/+12
|
* Use snprintf() instead of sprintf() most of the time.brian1997-09-191-11/+11
| | | | | | Obtained from: OpenBSD Make usage() consistent with man page.
* Nobody ever seemed to be interested in reviewing these changes, and ijoerg1997-05-031-5/+209
| | | | | | | | | | | | | | | | | | found that my syslogd is now running them for several months... Add an option to syslogd to restrict the IP addresses that are allowed to log to this syslogd. It's too late to develop the inter-syslogd communications protocol mentioned in the BUGS section, some 10 years too late. Thus, restricting the IP address range is about the most effective change we can do if we want to allow incoming syslog messages at all. IMHO, we should encourage the system administrators to use this option, and thus provide a knob in /etc/rc.* for it, defaulting to -a 127.0.0.1/32 (just as a hint about the usage). Please state opinions about whether to merge this change into 2.2 or not (i've got it running on RELENG_2_2 anyway).
* Whoops -- code inspection showed I forgot to clean up getopt stringpst1997-04-261-2/+2
|
* Secure mode (-s) incorrectly disabled both sending and receiving of syslogpst1997-04-261-19/+13
| | | | packets over UDP. Secure boxes should still be able to send packets.
* compare return value from getopt against -1 rather than EOF, per the finalimp1997-03-311-2/+2
| | | | posix standard on the topic.
* Save and restore the state of the variable Initialized inside die().joerg1997-03-141-1/+4
| | | | | Otherwise, the shutdown message will print out with 15 NUL bytes in front, due to a missing timestamp.
* Revert $FreeBSD$ to $Id$peter1997-02-221-1/+1
|
* The "burn-in" phase has finished: this set of patches seems to runjoerg1997-02-221-6/+250
| | | | | | | | | | | | | stable now at a customer's site. Finally add the ability to syslogd to pipe particular messages through an arbitrary filtering command. Idea stolen from IRIX. This code is courtesy of the interface business GmbH, Dresden. Comment about whether to also merge this into 2.2 or not, please. Reviewed by: (long ago) peter
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Unlink LogName before attempting to open it. Since we now have a lovelyjkh1997-01-031-1/+2
| | | | | | bug in syslogd which causes it to die after random amounts of time (widely reported), this at least allows the administrator to easily restart it without wondering why it simply exits again each time.
* Revert part of the previous change. syslogd (when logging to ttys)peter1996-12-101-5/+3
| | | | | | | | | | | has always held an open file descriptor. This allowed logging to spare virtual consoles and being able to switch to them. My previous change removed this since all writes were done with ttymsg() which opens it's own fd, and hence syslogd didn't need it's own fd to send messages on... but this caused an unexpected behavior change. This should close PR#2176
* Don't close f->f_file on F_TTY types on error returns from ttymsg() sincepeter1996-11-261-4/+1
| | | | it wasn't open in the first place..
* Make the handling of the /dev/ prefix for tty names more consistant.peter1996-11-261-20/+28
| | | | | | | | | ttymsg() insists on them not being there. Also, since ttymsg() opens the tty "on demand", don't keep an fd open ourselves. This would interfere with HUPCL etc. This should close PR#2103 from <xaa@stack.nl>
* put on my flame resistant suit and tempt fate by attempting to fix some ofpeter1996-11-181-51/+69
| | | | | | | | | | | | | | | | | | | the races in my previous commits here, and fix some other problems with syslogd as well. - if the child process exited early (eg: could not bind to the socket), the boot process would hang for 30 seconds. The parent was not noticing that the child had exited. (my fault) - when writing to tty devices, instead of treating them like files that need \r\n instead of \n, actually use ttymsg() which has specific code intended to write to potentially blocking ttys safely. I had a machine lock up last night because /dev/console on a serial port got flow control blocked. Setting comcontrol drainwait fixed everything but syslogd which was going into a spin trying to write to the console and completely ignoreing everything else. - fix a couple of nonsensical bits of code while here.. eg: wait3 takes a pointer to an int. There is no sense in declaring it as 'union wait', then casting the pointer to (int *), then forgetting about it.
* Back out the entire change from rev 1.11 of syslogd.c. It was bogus.joerg1996-10-281-44/+1
| | | | Correct the man page to reflect the new reality.
* Reviewed by: various (mailing list feedback)julian1996-10-231-2/+45
| | | | | | | | Submitted by: whistle communications move the socket from /dev to /var/run by default TRANSITIONALLY make syslog add a symlink.. I PROMISE I'll remove that as soon as I have the makefiles etc fixed as well.
* syslogd has always bugged me with it's async startup at boot time.peter1996-10-051-6/+71
| | | | | | | | | | | | | | | | | | | For me, more often than not, the backgrounded syslogd daemon is not yet ready to process log messages before other things (such as named) want to log a heap of them. It seems that it's the O_SYNC writes of the stuff coming in from /dev/klog that's the slowdown. Anyway, instead of using the libc daemon, roll a modified version. This one has a timeout. The child will wait for either the timeout to expire or the child process to signal it to let it know that it's "ready" and the /dev/log socket is set up and active, so it's safe to continue the boot. It adds a small fraction of a second pause to the boot time, but on the other hand the overall boot time is *quicker* since the disk is not being thrashed while the log messages are getting written out synchronously one by one while other daemons are loading in parallel. The timeout is in case the child segfaults or something before becoming fully operational.
* Bring in some fixes from NetBSD and re-hack our syslogd to be option-compatiblepst1996-07-221-16/+24
| | | | | | | | | with theirs (change the -I option to -s (but leave -I in for backwards compat.) Also eliminate an make sane some magic numbers, and fix a small bug where we'd send to an unopened socket. Reviewed by: wollman Obtained from: NetBSD
* With the recent 'make install' change in the kernel build makefiles, anpeter1995-11-141-2/+4
| | | | | | | | | | `interesting' feature of syslogd turned up. It calls getbootfile() for each log entry. Since the kernel makefile now changes kern.bootfile when doing a 'make install', it's quite startling to see the syslog lines change. This change makes it call getbootfile() once at startup and cache it, saving a syscall per loop, and keeping something a little more asthetically pleasing in /var/log/messages...
* Add a command-line option `-I' to disable logging from UDP.wollman1995-10-121-13/+21
| | | | | | | Document `-d' and `-I'. Add a BUGS section noting that logging from UDP is an unauthenticated remote disk-filling service, and probably should be disabled by default in the absence of some sort of authentication.
* Remove unconditional unlink at startup and conditionalised the unlink at exitpaul1995-09-111-3/+5
| | | | | | | | | so that it only unlinks the file if syslogd knows it created it. If the path specified for the socket already exists then syslogd will now exit with an "address already in use" error which is more sensible than blindly unlinking the existing filename. This stops syslogd -d foo/bar from unlinking foo/bar if it's a real file.
* Fix up warning about const being lost.pst1995-08-231-2/+2
|
* Remove trailing whitespace.rgrimes1995-05-301-1/+1
|
* Extend syslogd to allow selection of log destinations by program.wollman1994-12-291-9/+72
| | | | | | Use getbootfile() to determine the kernel name. Submitted by: Peter da Silva
* Converted 'vmunix' to 'kernel'.dg1994-08-051-1/+1
|
* BSD 4.4 Lite usr.sbin Sourcesrgrimes1994-05-261-0/+1131
OpenPOWER on IntegriCloud