summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2015-02-10 18:30:21 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2015-02-10 18:30:21 +0000
commit48383418df4d0cf3321a5ad24655cda3f7bd0f99 (patch)
tree35f49d3df5f2e3de99baed6299ef1cd92986adb0
parent82cd8a659323f8a94d227da09655039dbf148aed (diff)
Make error check consistent in all recvfrom(2) callbacks.
OK henning@
-rw-r--r--usr.sbin/syslogd/syslog.conf.57
-rw-r--r--usr.sbin/syslogd/syslogd.c4
2 files changed, 4 insertions, 7 deletions
diff --git a/usr.sbin/syslogd/syslog.conf.5 b/usr.sbin/syslogd/syslog.conf.5
index 48777fcbeee..7743b2a2bda 100644
--- a/usr.sbin/syslogd/syslog.conf.5
+++ b/usr.sbin/syslogd/syslog.conf.5
@@ -26,7 +26,7 @@
.\" SUCH DAMAGE.
.\"
.\" from: @(#)syslog.conf.5 8.1 (Berkeley) 6/9/93
-.\" $OpenBSD: syslog.conf.5,v 1.29 2015/02/10 18:24:22 bluhm Exp $
+.\" $OpenBSD: syslog.conf.5,v 1.30 2015/02/10 18:30:20 bluhm Exp $
.\" $NetBSD: syslog.conf.5,v 1.4 1996/01/02 17:41:46 perry Exp $
.\"
.Dd $Mdocdate: February 10 2015 $
@@ -217,12 +217,9 @@ sign).
Selected messages are forwarded to the
.Xr syslogd 8
program on the named host.
-A port number may be specified using the
+A port number may be optionally specified using the
.Ar host:port
syntax.
-This is optional for UDP and TLS.
-There is no well-known port for syslog over TCP, so in this case it
-is mandatory to specify the port.
IPv6 addresses can be used by surrounding the address portion with
square brackets
.Po
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c
index 0bd5239efad..abf67e89e14 100644
--- a/usr.sbin/syslogd/syslogd.c
+++ b/usr.sbin/syslogd/syslogd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: syslogd.c,v 1.152 2015/02/09 09:28:56 bluhm Exp $ */
+/* $OpenBSD: syslogd.c,v 1.153 2015/02/10 18:30:20 bluhm Exp $ */
/*
* Copyright (c) 1983, 1988, 1993, 1994
@@ -729,7 +729,7 @@ unix_readcb(int fd, short event, void *arg)
if (n > 0) {
linebuf[n] = '\0';
printline(LocalHostName, linebuf);
- } else if (n == -1 && errno != EINTR)
+ } else if (n < 0 && errno != EINTR)
logerror("recvfrom unix");
}