From owner-freebsd-bugs@FreeBSD.ORG Fri Jul 9 22:00:17 2010 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 325A1106566B for ; Fri, 9 Jul 2010 22:00:17 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 105F68FC18 for ; Fri, 9 Jul 2010 22:00:17 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o69M0EKt039205 for ; Fri, 9 Jul 2010 22:00:14 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o69M0ELF039204; Fri, 9 Jul 2010 22:00:14 GMT (envelope-from gnats) Resent-Date: Fri, 9 Jul 2010 22:00:14 GMT Resent-Message-Id: <201007092200.o69M0ELF039204@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Jan Schaumann Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54B10106567C for ; Fri, 9 Jul 2010 21:56:24 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 446D98FC17 for ; Fri, 9 Jul 2010 21:56:24 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o69LuMa0081599 for ; Fri, 9 Jul 2010 21:56:22 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id o69LuMJp081598; Fri, 9 Jul 2010 21:56:22 GMT (envelope-from nobody) Message-Id: <201007092156.o69LuMJp081598@www.freebsd.org> Date: Fri, 9 Jul 2010 21:56:22 GMT From: Jan Schaumann To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: misc/148478: syslogd -s still binds port 514 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jul 2010 22:00:17 -0000 >Number: 148478 >Category: misc >Synopsis: syslogd -s still binds port 514 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Jul 09 22:00:13 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Jan Schaumann >Release: FreeBSD 7.2 >Organization: >Environment: >Description: Even if started with the '-s' option, syslogd(8) will still bind to udp port 514. It won't actually log messages sent to it (it's possible it would if the packets had a spoofed source address of 127.0.0.1?), but it shouldn't even bind the port, since I might wish to use that port for another application on the system and I explicitly instructed syslogd to not bind it. >How-To-Repeat: /usr/sbin/syslogd -s netstat -a | grep syslog >Fix: --- syslogd.c.orig Fri Jul 9 14:51:11 2010 +++ syslogd.c Fri Jul 9 14:49:41 2010 @@ -2607,10 +2607,12 @@ close(*s); continue; } + if (!SecureMode) { if (bind(*s, r->ai_addr, r->ai_addrlen) < 0) { close(*s); logerror("bind"); continue; + } } double_rbuf(*s); >Release-Note: >Audit-Trail: >Unformatted: