Date: Fri, 14 Jan 2000 17:23:42 +0200 From: Ruslan Ermilov <ru@ucb.crimea.ua> To: Dag-Erling Smorgrav <des@flood.ping.uio.no> Cc: freebsd-bugs@FreeBSD.ORG Subject: Re: bin/15414: syslogd -ss disables all network logging functions Message-ID: <20000114172342.A65784@relay.ucb.crimea.ua> In-Reply-To: <xzpiu0wohj9.fsf@flood.ping.uio.no>; from Dag-Erling Smorgrav on Fri, Jan 14, 2000 at 03:27:06PM %2B0100 References: <200001140147.RAA23443@freefall.freebsd.org> <billf@FreeBSD.ORG> <xzpiu0wohj9.fsf@flood.ping.uio.no>
next in thread | previous in thread | raw e-mail | index | archive | help
--oyUTqETQ0mS9luUI Content-Type: text/plain; charset=us-ascii On Fri, Jan 14, 2000 at 03:27:06PM +0100, Dag-Erling Smorgrav wrote: > <billf@FreeBSD.ORG> writes: > > Synopsis: syslogd -ss disables all network logging functions > > > > State-Changed-From-To: open->feedback > > State-Changed-By: billf > > State-Changed-When: Thu Jan 13 17:44:35 PST 2000 > > State-Changed-Why: > > I can't reproduce this problem, or at least can't understand the bug report. > > > > Please send actual output that displays the broken behavior to billf@FreeBSD.org > > If syslogd is started with -ss, it will not be able to log to a remote > machine because -ss instructs it to not open an UDP socket at all. > > What the originator really wants is -s, which instructs syslogd to > open a socket but only use it for *sending* log messages. Incomig > messages will be logged and discarded. One could argue that syslogd > should not even bother with that, but it *has* to bind the socket > because the receiving end will reject packets which do not originate > from port 514, and there is no way to make the socket write-only > (except maybe setting the receive buffer size to 0... I'll have to try > that). > shutdown(s, SHUT_RD) is your friend, see attached. -- Ruslan Ermilov Sysadmin and DBA of the ru@ucb.crimea.ua United Commercial Bank, ru@FreeBSD.org FreeBSD committer, +380.652.247.647 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age --oyUTqETQ0mS9luUI Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="writeonly.c" #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <err.h> void main(void) { int s; int data; if ((s = socket(AF_INET, SOCK_DGRAM, 0)) == -1) err(1, "socket"); if (shutdown(s, SHUT_RD) == -1) err(1, "shutdown"); if (recv(s, &data, sizeof(data), 0) == -1) err(1, "recv"); } --oyUTqETQ0mS9luUI-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000114172342.A65784>