summaryrefslogtreecommitdiffstats
path: root/usr.sbin/syslogd
diff options
context:
space:
mode:
authorbluhm <bluhm@openbsd.org>2017-11-24 23:11:42 +0000
committerbluhm <bluhm@openbsd.org>2017-11-24 23:11:42 +0000
commitc9f2a310e29c2dd2ad51c15e07cad18d2d1d9c5e (patch)
treeeeed6518a4f938307e0dc3e24ff803dcddb3c845 /usr.sbin/syslogd
parentUse the environment variable PFCTL to specify a different executable (diff)
downloadwireguard-openbsd-c9f2a310e29c2dd2ad51c15e07cad18d2d1d9c5e.tar.xz
wireguard-openbsd-c9f2a310e29c2dd2ad51c15e07cad18d2d1d9c5e.zip
Revert my change to ignore EIO errors when writing to log files.
Syslogd continued logging messages to a file that had an EIO error. This could slow down the whole system. File system errors may cause huge delays at every access. This prevented debugging the issue. Now syslogd will log a warning and shut down logging to this file until restart or SIGHUP. OK deraadt@ espie@ millert@
Diffstat (limited to 'usr.sbin/syslogd')
-rw-r--r--usr.sbin/syslogd/syslogd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c
index 373188e2734..3323a5523d2 100644
--- a/usr.sbin/syslogd/syslogd.c
+++ b/usr.sbin/syslogd/syslogd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: syslogd.c,v 1.253 2017/10/23 17:16:35 bluhm Exp $ */
+/* $OpenBSD: syslogd.c,v 1.254 2017/11/24 23:11:42 bluhm Exp $ */
/*
* Copyright (c) 2014-2017 Alexander Bluhm <bluhm@genua.de>
@@ -2061,7 +2061,7 @@ fprintlog(struct filed *f, int flags, char *msg)
int e = errno;
/* allow to recover from file system full */
- if ((e == EIO || e == ENOSPC) && f->f_type == F_FILE) {
+ if (e == ENOSPC && f->f_type == F_FILE) {
if (f->f_dropped++ == 0) {
f->f_type = F_UNUSED;
errno = e;