Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Oct 1998 23:39:12 +0400 (AMT)
From:      nightmar@acc.am
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   bin/8447: syslogd doesn't allow !* option in the syslog.conf
Message-ID:  <199810251939.XAA02639@lemming.acc.am>

next in thread | raw e-mail | index | archive | help

>Number:         8447
>Category:       bin
>Synopsis:       <syslogd doesn't implement documented feature (!* for all programs)>
>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:
<Armenian Computer Centre 
		  http://www.acc.am/>;
>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 </path_to_patch_file/syslog.diff
 After that run 
 make 
 killall -9 syslogd
 make install
 /usr/sbin/syslogd
 >	

>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199810251939.XAA02639>