summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/syslog.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Do not include a timestamp in the syslog message. There is no need --deraadt2015-10-311-12/+2
| | | | | | | | syslogd will fill it in immediately upon reception on the other side of sendsyslog(2). Our libc only talks to our syslogd, which will fix the timestamp before forwarding. syslog_r has done this for a long time already. ok tedu bluhm
* Wrap <syslog.h> so that internal calls go direct and they're all weak symbolsguenther2015-09-121-19/+7
| | | | | Delete code that's a no-op now that we don't use sockets Eliminate unnecessary #includes
* Make printf-like and scanf-like functions marked as such in llib-lc.lnmartynas2011-05-301-1/+2
| | | | | | | and llib-lwrap.ln databases; so that the lint features doing format strings checks are enabled by default. Looks good to millert@.
* More shrinkage, a bit for ramdisks but mostly for static binaries:guenther2009-11-181-266/+13
| | | | | | | | | | | | | | | | | - wrap with #ifndef NO_LOG_BAD_DNS_RESPONSES libc code that uses p_class() and p_type() for diagnostics, then add that define to libstub to avoid pulling in res_debug_syms.o - split rcmd() and ruserok() into separate files, as nothing uses both - split readdir_r() to its own file - split syslog_r() from syslog(), as the latter needs localtime(); many binaries no longer need to pull in all the time code after this; switch from usleep() to nanosleep() while we're at it (The profit of analysis of -Wl,-M,--cref output) Chops 888kB from /bin and /sbin on i386 ok deraadt@, miod@
* Stash value of log_tag before calling closelog_r() and restore it after.millert2007-11-091-2/+6
| | | | | | When closelog() was modified to clear log_tag it inadvertantly made syslog_r() (which calls closelog_r at the end) clear log_tag as well. OK miod@ dhartmei@
* zap remaining rcsid.espie2005-08-081-4/+1
| | | | | | Kill old files that are no longer compiled. okay theo
* handle snprintf() returning -1.moritz2005-03-081-1/+3
| | | | ok cloder@ henning@ hshoexer@
* ansify function definitions and zap some `register'jfb2004-05-181-29/+11
| | | | ok millert@
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-6/+2
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* correctly check the return value of send(). fixes LOG_CONS from alwaysdanh2003-02-271-2/+2
| | | | | | logging to the console. ok millert@
* Don't write log message to console unless we are unable to connect tomillert2003-02-071-21/+7
| | | | syslogd. Noticed by marc@; OK by marc@ and deraadt@
* Don't reconnect to logging socket if send() returns an error and errnomillert2003-01-201-12/+13
| | | | | | | | | == ENOBUFS, there is no point and it hurts chroot'ed processes. Don't return immediately from syslog_r() when the send(), we may have more work to do. deraadt@ OK
* Handle things like "%%m" correctly; closes PR 3057millert2003-01-021-1/+6
| | | | OK miod@
* Fix instance where syslog(3) after closelog(3) could access freed logcloder2002-11-241-1/+2
| | | | | | tag name. OK millert@, deraadt@
* Close log file when leaving syslog_r(). deraadt@ okjjbg2002-06-201-1/+5
|
* If send() returns ENOBUFS, sleep for one microsecond and retry.millert2002-06-051-5/+12
| | | | deraadt@ OK
* pid_t cleanupderaadt2002-05-261-2/+2
|
* We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.millert2002-02-191-29/+1
|
* Open console with O_NONBLOCK to avoid blocking on a locked console.millert2002-02-181-5/+5
| | | | From David Malone
* Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.millert2002-02-161-5/+5
|
* Set default facility is noone is specified at syslog(3) time; millert@ jj@ ok.fgsch2001-10-311-16/+20
|
* syslog_r() implementation. deraadt@ ok.jjbg2001-10-241-95/+168
|
* deal with -1 from snprintf, if it ever happensderaadt2001-08-181-2/+4
|
* use strlcpy vs strncpy+a[len-1]='\0'. millert@ ok.lebel2001-06-271-4/+3
|
* Try to reopen socket if send fails. (perhaps syslogd restarted)hugh2000-01-021-21/+56
| | | | Adapted from FreeBSD (N.B. NetBSD); millert@ OK.
* some -Wallmillert1998-03-191-2/+3
|
* And terminate SyslogAddr.sun_path (duh!)brian1998-03-061-1/+2
|
* sizeof(SyslogAddr.sun_path) -> sizeof(SyslogAddr.sun_path) - 1brian1998-03-061-2/+2
| | | | pointed out by: theo
* Initialise sockaddr::sa_len (stopping a pretty nastybrian1998-03-051-6/+10
| | | | | stack scribble). Also, SyslogAddr is a sockaddr_un, not a sockaddr.
* #if __STDC__ --> #ifdef __STDC__mickey1997-07-251-4/+4
|
* Clean up some -Wall complaints.millert1997-07-091-2/+2
|
* Fix RCS idstholo1996-08-191-7/+1
| | | | Make sure everything uses {SYS,}LIBC_SCCS properly
* initial import of NetBSD treederaadt1995-10-181-0/+294