From 48383418df4d0cf3321a5ad24655cda3f7bd0f99 Mon Sep 17 00:00:00 2001 From: Alexander Bluhm Date: Tue, 10 Feb 2015 18:30:21 +0000 Subject: Make error check consistent in all recvfrom(2) callbacks. OK henning@ --- usr.sbin/syslogd/syslog.conf.5 | 7 ++----- usr.sbin/syslogd/syslogd.c | 4 ++-- 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"); } -- cgit v1.2.3