Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Nov 2005 08:17:24 GMT
From:      Taketo Kabe <kabe@sra-tohoku.co.jp>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/88780: [PATCH] Baseline ipmon(8) uses LOG_LOCAL0 syslog, not LOG_SECURITY as mentioned in manpage
Message-ID:  <200511100817.jAA8HOlE016983@www.freebsd.org>
Resent-Message-ID: <200511100820.jAA8KIcM029879@freefall.freebsd.org>

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

>Number:         88780
>Category:       bin
>Synopsis:       [PATCH] Baseline ipmon(8) uses LOG_LOCAL0 syslog, not LOG_SECURITY as mentioned in manpage
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Nov 10 08:20:18 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Taketo Kabe
>Release:        6.0-RELEASE
>Organization:
>Environment:
FreeBSD ns-fw.example.org 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Tue Nov  8 05:14:05 JST 2005     root@ns-fw.example.org:/usr/obj/usr/src/sys/GENERIC i386
>Description:
Current ipmon(8) is documented to use LOG_SECURITY syslog facility
when invoked as `ipmon -s', but
FreeBSD 6.0 baseline (and probably earlier versions) source code
still is using LOG_LOCAL0.

ipf(8) installed from ports should not have this problem; only
the baseline source has this problem.

>How-To-Repeat:
- Compile the full source, including userland (make buildworld)
- cd /usr/src/sbin/ipf/ipmon
- make clean
- make
  The diags will say
cc -O2 -fno-strict-aliasing -pipe  -DLOGFAC=LOG_LOCAL0
                                     ^^^^^^^^^^^^^^^^^

Also setting "pass log all" in /etc/ipf.conf and enabling the ipfilter
will log packets in /var/log/messages (LOG_LOCAL0),
not /var/log/security (LOG_SECURITY).

>Fix:

--- /usr/src/sbin/ipf/ipmon/Makefile.dist	Thu Apr 28 16:26:34 2005
+++ /usr/src/sbin/ipf/ipmon/Makefile	Thu Nov 10 08:14:29 2005
@@ -1,10 +1,10 @@
-#	$FreeBSD: src/sbin/ipf/ipmon/Makefile,v 1.2 2005/04/28 16:26:34 darrenr Exp $
+#	$FreeBSD: src/sbin/ipf/ipmon/Makefile,v 1.2 2005/04/28 16:26:34 darrenr Exp $ 
 
 PROG=		ipmon
 SRCS=		ipmon.c ipmon_y.c ipmon_l.c
 MAN=		ipmon.8
 
-CFLAGS+=	-DLOGFAC=LOG_LOCAL0 -I.
+CFLAGS+=	-DLOGFAC=LOG_SECURITY -I.
 
 DPSRCS+=	ipmon_l.h ipmon_y.h
 
>Release-Note:
>Audit-Trail:
>Unformatted:



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