summaryrefslogtreecommitdiffstats
path: root/usr.sbin/syslogd/syslogd.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* When syslogd(8) parent process terminates, the file cleanup codebluhm2019-07-051-6/+1
| | | | | | | | | | did not work anymore. unveil(2) prevented removal. Cleaning the UNIX domain sockets is not necessary. They are harmless and unlinked before a new bind. So delete that functionality and convert global to local variables. Providing /var/run/syslog.pid is a common feature that should be kept. A stale pid file is confusing. So add a constant path to unveil(2) to allow pid file removal. OK deraadt@
* I have touched more than half the source code lines of syslogd(8).bluhm2017-10-051-1/+2
| | | | Add my copyright explicitly.
* Kernel sendsyslog(2), libc syslog(3), and syslogd(8) restrict andbluhm2017-08-081-2/+1
| | | | | | truncate the length of a syslog message to 8192 bytes. Use one global define LOG_MAXLINE for all of them. OK deraadt@ millert@
* The global variable Startup is not used anymore and can be deleted.bluhm2017-04-051-2/+1
| | | | | The functionality has moved into log_setdebug(). OK millert@
* As we did not have nice log functions before, ttymsg() had to returnbluhm2017-04-051-2/+2
| | | | | | the error string. Log the message when the error happens and make the function void. OK millert@
* Replace logdebug() with generic log_debug() from log.c. Implementbluhm2017-04-051-2/+1
| | | | | log_debugadd() to construct debug message incrementally. OK deraadt@
* Start to replace the home grown syslogd(8) internal debug and loggingbluhm2017-03-161-1/+5
| | | | | | | | | | functions with a more common log.c implementation. Of course openlog(3) cannot be used, so adapt the log.[ch] initially copied from ospfd(8) to syslogd's special needs. As the messages are limited to ERRBUFSIZE anyway, malloc(3) in the error logging code can be avoided. Changing all log calls to the new API will be done in a separate step. OK millert@
* Remove the artificial maximum number of unix domain sockets inbluhm2016-10-171-3/+2
| | | | | | syslogd(8). Just malloc(3) them dynamically which also gives a more random address space layout. OK deraadt@
* Use closefrom(4) in privsep parent and avoid some global filebluhm2016-10-161-3/+1
| | | | | descriptor variables in syslogd(8) this way. OK rzalamena@
* Do an exec on itself in the privileged syslogd(8) parent processbluhm2016-10-061-2/+3
| | | | | to reshuffle its memory layout. Input rzalamena@; OK deraadt@
* If writing to a tty blocks, syslogd forked and tried to write againbluhm2015-10-231-1/+3
| | | | | | | | in a background process. A potential fork(2) at every message is bad, so replace this with an event. As a bonus the syslogd child process does not need to pledge "proc" anymore. Also limit the number of delayed write events. OK deraadt@
* Do some cleanup in syslogd ttymsg(). Add a debug message when thebluhm2015-10-211-2/+4
| | | | | syslogd child calls fork(2) to delay blocked output. OK benno@
* In syslogd replace the dprintf() macro with a logdebug() functionbluhm2015-10-151-2/+2
| | | | | as dprintf(3) is in libc now and does something different. OK guenther@
* If syslogd is started with -S, it accepts TLS connections to receivebluhm2015-10-091-2/+2
| | | | | | encrypted messages. The server certificates are taken from /etc/ssl like relayd does. OK benno@ beck@ deraadt@
* When syslogd is invoked with -T listen_address, it creates a TCPbluhm2015-07-071-2/+2
| | | | | | | | | socket and accepts incomming messages. At the moment, only RFC 6587 3.4.2. Non-Transparent-Framing format with new-line separator is supprted for incomming messsages. Outgoing messages are encoded as 3.4.1. Octet Counting. Autodetection of incomming format will be implemented later. OK deraadt@ jmc@ millert@
* Remove some unneeded includes. OK deraadt@millert2015-07-061-2/+2
|
* Add a -U command line switch for syslogd to specify an explict bindbluhm2015-06-301-2/+2
| | | | | | | address to receive UDP packets. One advantge over -u and the * sockets is that you can bind to localhost and divert the packets with pf. It is also possible to use a non standard port. OK jung@ jmc@
* Switch syslogd from using poll(2) to libevent.bluhm2014-10-051-12/+3
| | | | test and OK nicm@; OK henning@
* Cleanup the reporting socket code in syslogd.bluhm2014-10-031-2/+2
| | | | | | | | | - Name variable path_ctlsock consistently. - Name function ctlconn_logto() consistently. - Replace the nested if/else logic in ctlconn_write_handler() with if/return. - Call ctlconn_cleanup() only if there is a control connection. OK doug@
* Remove redundant null check and rename vars consistently in syslogddoug2014-09-101-5/+5
| | | | | | Merge in more functionality from bluhm's patch. ok bluhm@
* Fix a syslogd regression when specifying all 20 additional log pathsdoug2014-09-081-2/+3
| | | | | | | bluhm@ found and fixed this bug. This is a modified version of his patch which makes the intention a little clearer. ok bluhm@
* Allow to restrict syslogd to a protocol family with -4 and -6 commandbluhm2014-08-251-2/+2
| | | | | | | line switches. If the log server is an FQDN, DNS chooses wether to take the IPv4 or IPv6 route. Allow to prefix the log host with udp4:// or udp6:// to choose a protocol. OK henning@
* Replace gethostbyaddr(3) with getnameinfo(3). Remove the sigprocmask()bluhm2014-08-201-2/+2
| | | | | | | that was necessary for gethostbyaddr() because the latter is not signal safe. Change the return code semantics of priv_getnameinfo() to match getnameinfo(3). input and OK jca@
* Add missing OpenBSD RCS id.bluhm2014-08-201-0/+2
|
* Rename priv_gethostserv() to priv_getaddrinfo() as this is what thebluhm2014-08-201-1/+1
| | | | | function does. Change the return code semantics to match getaddrinfo(3). OK deraadt@
* put do { } while (0) around the dprintf macro to make it less scarydlg2013-08-191-1/+1
| | | | ok deraadt@
* shuffle some things around to deal with incomplete typesjsg2010-04-301-0/+1
| | | | | gcc4 gets upset about. based on suggestions from miod@, ok millert@
* - use getaddrinfo() instead of gethostbyname/getservbynamejason2007-05-021-1/+2
| | | | | - reserve a poll descriptor entry for INET6 (not used yet) ok henning
* memory leak on SIGHUP for memory buffer logs, based on fix by Stephen Marley;djm2005-06-061-0/+1
| | | | ok avsm@
* support @hostname:port syntax in syslog.conf, prompted by msf@ at c2k4;djm2004-07-031-1/+4
| | | | ok henning@ anil@
* Buffered logging for syslogd. Logs may be stored in memory buffers anddjm2004-01-041-1/+16
| | | | | extracted using a small client. Useful for diskless systems. much feedback from deraadt@, canacar@, jmc@, jakob@ ; ok deraadt@
* convert from select() to poll() for main event loop; tested millert@, deraadt@djm2003-12-291-4/+7
| | | | ok deraadt@
* Privilege separated syslog daemon. The child listening to log requests dropsavsm2003-07-311-0/+45
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