From owner-freebsd-bugs Sun May 2 19:30: 7 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 358BC15BA4 for ; Sun, 2 May 1999 19:30:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id TAA79493; Sun, 2 May 1999 19:30:00 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: by hub.freebsd.org (Postfix, from userid 32767) id 86BA414DDA; Sun, 2 May 1999 19:20:58 -0700 (PDT) Message-Id: <19990503022058.86BA414DDA@hub.freebsd.org> Date: Sun, 2 May 1999 19:20:58 -0700 (PDT) From: cliff@steam.com To: freebsd-gnats-submit@freebsd.org X-Send-Pr-Version: www-1.0 Subject: bin/11458: syslogd does not open UDP socket Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 11458 >Category: bin >Synopsis: syslogd does not open UDP socket >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun May 2 19:30:00 PDT 1999 >Closed-Date: >Last-Modified: >Originator: cliff skolnick >Release: 3.1-stable >Organization: steam.com >Environment: FreeBSD lazlo.internal.steam.com 3.1-STABLE FreeBSD 3.1-STABLE #0: Sun May 2 17 :06:47 PDT 1999 cliff@lazlo.internal.steam.com:/usr/src/sys/compile/lazlo i 386 >Description: There is a bug in syslogd which makes it not listen on UDP port 514 unless two "-s" options are given on the command line, which is very contrary to the man page. It appears a logic error in syslog.c:397 is to blame. The program works as stated if changed to: if (SecureMode < 2) Guess this explains why remote logging stopped on my system, but it is now working after this change. Fascist mode is cool, but you better give people a way out! More importantly the "-s -s" does the opposite of the man page :/ Cliff >How-To-Repeat: run syslog, check netstat -af inet for something listening on UDP 514. >Fix: *** syslogd.c-orig Sat May 1 11:49:17 1999 --- syslogd.c Sun May 2 18:45:51 1999 *************** *** 394,400 **** die(0); } } ! if (SecureMode > 1) finet = socket(AF_INET, SOCK_DGRAM, 0); if (finet >= 0) { struct servent *sp; --- 394,400 ---- die(0); } } ! if (SecureMode < 2) finet = socket(AF_INET, SOCK_DGRAM, 0); if (finet >= 0) { struct servent *sp; >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message