From nobody@FreeBSD.org  Fri Jul  9 21:56:24 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 54B10106567C
	for <freebsd-gnats-submit@FreeBSD.org>; 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 <freebsd-gnats-submit@FreeBSD.org>; 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 <freebsd-gnats-submit@FreeBSD.org>; 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 <jschauma@netmeister.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: syslogd -s still binds port 514
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         148478
>Category:       bin
>Synopsis:       syslogd -s still binds port 514
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    delphij
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 09 22:00:13 UTC 2010
>Closed-Date:    Fri Jul 09 22:10:31 UTC 2010
>Last-Modified:  Mon Jul 12 17:37:20 UTC 2010
>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:
State-Changed-From-To: open->closed 
State-Changed-By: delphij 
State-Changed-When: Fri Jul 9 22:09:33 UTC 2010 
State-Changed-Why:  
Not a bug. 

syslogd -ss disables the listening (which also disables its 
ability to log to remote host). 


Responsible-Changed-From-To: freebsd-bugs->delphij 
Responsible-Changed-By: delphij 
Responsible-Changed-When: Fri Jul 9 22:09:33 UTC 2010 
Responsible-Changed-Why:  
Take. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=148478 
>Unformatted:
