From owner-freebsd-bugs Sun Oct 25 10:40:07 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA04147 for freebsd-bugs-outgoing; Sun, 25 Oct 1998 10:40:07 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA04136 for ; Sun, 25 Oct 1998 10:40:04 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id KAA20196; Sun, 25 Oct 1998 10:40:00 -0800 (PST) Received: from lemming.acc.am (jeday.r.am [194.67.210.11]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA03846 for ; Sun, 25 Oct 1998 10:37:49 -0800 (PST) (envelope-from nightmar@lemming.acc.am) Received: (from nightmar@localhost) by lemming.acc.am (8.9.1/8.9.1) id XAA02639; Sun, 25 Oct 1998 23:39:12 +0400 (AMT) Message-Id: <199810251939.XAA02639@lemming.acc.am> Date: Sun, 25 Oct 1998 23:39:12 +0400 (AMT) From: nightmar@acc.am Reply-To: nightmar@acc.am To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: bin/8447: syslogd doesn't allow !* option in the syslog.conf Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 8447 >Category: bin >Synopsis: >Confidential: yes >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Oct 25 10:40:00 PST 1998 >Last-Modified: >Originator: Gaspar Chilingarov AKA NightMare >Organization: >Release: FreeBSD 2.2.6-RELEASE i386 , also in FreeBSD 3.0-SNAP >Environment: Standard installation of 2.2.6-RELEASE box , no patches applied. >Description: In syslog.conf(5) man written [-skip-] An asterisk (``*'') can be used to specify all facilities all levels or all programs. [-skip-] If you put the !* in config file after some filters (like !tcpd) you cannot force syslogd to write messages from any program to the specified file >How-To-Repeat: Put in the /etc/syslog.conf file after other filters (for instance , ftpd ) these lines : # you can place here any other programm !ftpd *.* [tab] /dev/null #this lines allow you to log all messages in the system !* *.* [tab] root to log all messages in the system to the root's terminal. make killall -HUP syslogd Login as root. Make something , that will cause syslogd write a message to the log (login from other terminal,for example). You must see a message from syslogd on your first terminal ... you doesn't see it. >Fix: < Here is a little patch for a /usr/src/usr.sbin/syslogd/syslogd.c [cut] 1156a1157,1160 > if(*p == '*') { > strcpy(prog, "*"); > continue; > } 1158,1161d1161 < if(!*p) { < strcpy(prog, "*"); < continue; < } [cut] Just save it under some name (syslog.diff ) & run patch /usr/src/usr.sbin/syslogd/syslogd.c >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message