summaryrefslogtreecommitdiff
path: root/usr.sbin/syslogd/syslogd.c
AgeCommit message (Collapse)Author
2008-09-29initialize both sides of the lockpipe (only used in debug mode) to -1 toTheo de Raadt
have averted the bug found in pr 5938
2008-04-21If a |program is too slow to process the input,Marco Pfatschbacher
drop messages rather than to kill and restart it. Also log this error, but limited at a 2 minute rate. Discussed with henning. OK henning@
2007-10-17remove "unused variable" warningsCharles Longeau
tested by deraadt@ on a gcc2 arch looks ok ray@ ok deraadt@
2007-09-07Initialize length variable slen properly to avoid possible EINVALAlexander Bluhm
errors from setsockopt(2) in function double_rbuf(). ok markus@ mpf@
2007-05-02- use getaddrinfo() instead of gethostbyname/getservbynameJason Wright
- reserve a poll descriptor entry for INET6 (not used yet) ok henning
2007-03-30Preserve the contents of the memory buffers when syslogd reinitializesCan Erkin Acar
logs in response to a HUP signal, as long as /etc/syslog.conf remains unchanged. ok mpf@
2007-02-21Create "syslogd: restart" message after the setup of signalMarco Pfatschbacher
handlers. This prevents a race where syslogd could die on SIGPIPE at startup. Also distinguish between start and restart. OK henning@
2007-02-20implement logging to other program's stdin.Henning Brauer
if the target is like "| /path/to/program", syslogd forks and execs program and sends the selected log messages to program's stdin. uses a socketpair, grows the receive buffer on the reader side and has the socket nonblocking on syslog'd side to prevent syslogd blocking. I'm using that here to feed logsurfer from ports for automated log analysis, werks beautifully. lots of input & help mpf, ok mpf djm "no objections" millert
2007-01-03Support for continuous reading of syslog memory buffers.Marco Pfatschbacher
Works like ``tail -f'' on a log file. OK markus@, djm@
2006-09-17check that stdio file descriptors are actually closed before clobberingDamien Miller
them, following an identical change in openssh
2005-06-10If any of fds 0-2 are not open, dup them to our /dev/null fd.Todd C. Miller
Prevents the socket from being closed in this case. OK deraadt@
2005-06-06memory leak on SIGHUP for memory buffer logs, based on fix by Stephen Marley;Damien Miller
ok avsm@
2005-04-21avoid looping on failed tty or /dev/console writes and just drop the messageDamien Miller
noticed by newell AT cei.net; ok avsm@ deraadt@
2005-03-12shutdown the inetd socket for reading if secure; ok deraadtMarkus Friedl
2004-12-22avoid a null dereference when using membufs.Dan Harnett
ok otto@ millert@
2004-12-21silently ignore some cases when sendto(2) fails rather than disablingDan Harnett
logging to a remote host. Similar patch sent by Marc Huber <Marc.Huber@web.de> in PR4044. ok deraadt@ henning@ millert@
2004-12-20Fix one case of broken duplicate supression, which happens if two linesOtto Moerbeek
in syslog.conf contain the same target file, and log entries matching both the first and second line get written. This changes behaviour: e.g. previously repeating a line caused a log entry to be written twice, but not any more. Also, if a later line with the same target has a different priority for a facility, the last one will be used. Noted by camield@; help from millert@. ok camield@ millert@ hshoexer@ deraadt@
2004-11-11strchr("whatever", 0) returns non NULL. From Patrick Latifi.Otto Moerbeek
ok deraadt@ millert@
2004-09-14size_t vs ssize_t confusionTheo de Raadt
2004-09-14ARGSUSED before signal handler with unused signoTheo de Raadt
2004-07-03-Wall,-Wshadow cleanup with avsm@; ok henning@ krw@Damien Miller
2004-07-03support @hostname:port syntax in syslog.conf, prompted by msf@ at c2k4;Damien Miller
ok henning@ anil@
2004-06-25extend memory buffer control protocol to support transmission of flags,Damien Miller
starting with one to indicate whether the memory ringbuffers have overflowed; idea & ok markus@ NB if you are using memory buffered logging make sure you update both syslogd and syslogc _and_ restart syslogd because the protocol has changed
2004-06-03allow '!!prog', where the second '!' means messages from prog should onlyDaniel Hartmeier
be logged by the subsequent block, aborting evaluation when matching. Useful to log some daemons to dedicated files only (not polluting standard files with their messages). ok beck@, henning@, millert@
2004-06-03Interpret !* correcly. ok dhartmei@Otto Moerbeek
2004-05-25include hostname in memory buffered logs, spotted byDamien Miller
ssurdock AT engineered-net.com; ok deraadt@
2004-04-15Prevent another instance of syslogd from unlinking log sockets thatTodd C. Miller
are already in use. Found by mpech@, OK deraadt@
2004-04-13fix null pointer dereference when trying to read+clear non-existent memoryDamien Miller
log; spotted by mpech@
2004-01-19Check malloc() return value. Pointed out by mpech@. Ok mpech@, deraadt@Todd C. Miller
2004-01-13buffer size should be unsigned, report mpech@; ok deraadt@Damien Miller
2004-01-05sort options and SYNOPSIS;Jason McIntyre
sync usage();
2004-01-04spacingTheo de Raadt
2004-01-04Buffered logging for syslogd. Logs may be stored in memory buffers andDamien Miller
extracted using a small client. Useful for diskless systems. much feedback from deraadt@, canacar@, jmc@, jakob@ ; ok deraadt@
2003-12-29spacingTheo de Raadt
2003-12-29convert from select() to poll() for main event loop; tested millert@, deraadt@Damien Miller
ok deraadt@
2003-09-19whack getopt ? matching; jeffi@rcn.comTheo de Raadt
2003-08-18Call tzset() to stash the current timezone before we chroot.Todd C. Miller
OK deraadt@ and avsm@
2003-07-31Privilege separated syslog daemon. The child listening to log requests dropsAnil Madhavapeddy
to user _syslogd and chroots itself, while the privileged parent grants it access to open logfiles and other calls it needs. The only difference from existing behaviour is that if syslog.conf changes and syslogd receives a HUP, it will re-exec itself and have two new PIDs. A HUP with an unchanged config will make syslogd reopen logfiles as before. Lots of help and code from deraadt@ , and advice from millert@ Various versions tested by todd, cloder, mpech, markus, tdeval and others
2003-07-08dont silently truncate a domain socket specified via the -p argument;Anil Madhavapeddy
error out instead if its too long. deraadt@ ok
2003-06-02Remove the advertising clause in the UCB license which BerkeleyTodd C. Miller
rescinded 22 July 1999. Proofed by myself and Theo.
2003-05-17Fix typo in last commit, spotted by Brian Poole. That'll teach meTodd C. Miller
to commit on an empty stomach.
2003-05-17Cannot use strlcpy() for strings in struct utmp since they are not guaranteedTodd C. Miller
to be NUL-terminated. Fixes a bug introduced in rev 1.37; noticed by deraadt@
2003-03-21Fix default facility when none is specified (should be LOG_USER,Todd C. Miller
was LOG_UUCP due to a bug); Javier Kohen
2002-12-22fix cutnpaste; from hunter@comsys.com.uaMichael Shalayeff
2002-11-21Add -n option to print message source addresses numerically rather thanChad Loder
symbolically. This saves address->name lookups, which is nice on log servers without a DNS cache. millert@, jakob@ ok
2002-09-06use more socklen_t; pvalchevTheo de Raadt
2002-08-08Pass correct buffer length to snprintf on error condition; ericj@, fgsch@ ok.Aaron Campbell
2002-07-24Sanity check snprintf() return values before using them. It is legal forTodd C. Miller
snprintf(3) to return -1.
2002-07-20ansiTheo de Raadt
2002-06-14spelling; from Brian Poole <raj@cerias.purdue.edu>Todd T. Fries