From owner-freebsd-bugs Fri Jan 14 7:26:15 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from relay.ucb.crimea.ua (UCB-Async4-CRISCO.CRIS.NET [212.110.129.130]) by hub.freebsd.org (Postfix) with ESMTP id 2434B15664 for ; Fri, 14 Jan 2000 07:25:49 -0800 (PST) (envelope-from ru@ucb.crimea.ua) Received: (from ru@localhost) by relay.ucb.crimea.ua (8.9.3/8.9.3/UCB) id RAA72715; Fri, 14 Jan 2000 17:23:42 +0200 (EET) (envelope-from ru) Date: Fri, 14 Jan 2000 17:23:42 +0200 From: Ruslan Ermilov To: Dag-Erling Smorgrav Cc: freebsd-bugs@FreeBSD.ORG Subject: Re: bin/15414: syslogd -ss disables all network logging functions Message-ID: <20000114172342.A65784@relay.ucb.crimea.ua> Mail-Followup-To: Dag-Erling Smorgrav , freebsd-bugs@FreeBSD.ORG References: <200001140147.RAA23443@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=oyUTqETQ0mS9luUI X-Mailer: Mutt 0.95.3i In-Reply-To: ; from Dag-Erling Smorgrav on Fri, Jan 14, 2000 at 03:27:06PM +0100 X-Operating-System: FreeBSD 3.3-STABLE i386 Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org --oyUTqETQ0mS9luUI Content-Type: text/plain; charset=us-ascii On Fri, Jan 14, 2000 at 03:27:06PM +0100, Dag-Erling Smorgrav wrote: > 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 #include #include #include 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