summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/syslog.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-10-31 02:57:16 +0000
committerderaadt <deraadt@openbsd.org>2015-10-31 02:57:16 +0000
commit1778bf5bfab38adeb6a507dfbd135daf8f1fbf3e (patch)
tree0f69490663276b5fdaf25fd5acfeccd6a1b7c1ba /lib/libc/gen/syslog.c
parentexpose the sysctl backing getloadavg(3) all the time, now that more (diff)
downloadwireguard-openbsd-1778bf5bfab38adeb6a507dfbd135daf8f1fbf3e.tar.xz
wireguard-openbsd-1778bf5bfab38adeb6a507dfbd135daf8f1fbf3e.zip
Do not include a timestamp in the syslog message. There is no need --
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
Diffstat (limited to 'lib/libc/gen/syslog.c')
-rw-r--r--lib/libc/gen/syslog.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/lib/libc/gen/syslog.c b/lib/libc/gen/syslog.c
index ccbf5c03151..501535fb9d3 100644
--- a/lib/libc/gen/syslog.c
+++ b/lib/libc/gen/syslog.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: syslog.c,v 1.32 2015/09/12 14:30:31 guenther Exp $ */
+/* $OpenBSD: syslog.c,v 1.33 2015/10/31 02:57:16 deraadt Exp $ */
/*
* Copyright (c) 1983, 1988, 1993
* The Regents of the University of California. All rights reserved.
@@ -35,16 +35,6 @@
static struct syslog_data sdata = SYSLOG_DATA_INIT;
-static size_t
-gettime(char *buf, size_t maxsize)
-{
- time_t now;
-
- (void)time(&now);
- return (strftime(buf, maxsize, "%h %e %T ", localtime(&now)));
-}
-
-
/*
* syslog, vsyslog --
* print message on log file; output is intended for syslogd(8).
@@ -63,7 +53,7 @@ DEF_WEAK(syslog);
void
vsyslog(int pri, const char *fmt, va_list ap)
{
- __vsyslog_r(pri, &sdata, &gettime, fmt, ap);
+ __vsyslog_r(pri, &sdata, 0, fmt, ap);
}
DEF_WEAK(vsyslog);