Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Sep 2005 14:52:29 +0200 (CEST)
From:      Andre Albsmeier <Andre.Albsmeier@siemens.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   bin/85970: 550.ipfwlimit does not delete tmp file
Message-ID:  <200509111252.j8BCqTJ8099342@curry.mchp.siemens.de>
Resent-Message-ID: <200509111300.j8BD0bnX057480@freefall.freebsd.org>

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

>Number:         85970
>Category:       bin
>Synopsis:       550.ipfwlimit does not delete tmp file
>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:   Sun Sep 11 13:00:36 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Andre Albsmeier
>Release:        FreeBSD 5.4-STABLE i386
>Organization:
>Environment:

System: FreeBSD 5.4-STABLE #2: Thu Aug 25 14:04:58 CEST 2005

>Description:

Since rev 1.6.4.1 /etc/periodic/security/550.ipfwlimit
creates a tmp file without deleting it if ipfw is not
used.

>How-To-Repeat:

On a FreeBSD-5.4 box without ipfw:

andre@bali:~>ls -l /tmp/security*
-rw-------  1 root  wheel  0 Sep  6 03:01 /tmp/security.BEMeBO7s
-rw-------  1 root  wheel  0 Sep 10 03:01 /tmp/security.OiHNQwdl
-rw-------  1 root  wheel  0 Sep 11 03:01 /tmp/security.PWShtLmE
-rw-------  1 root  wheel  0 Sep  8 03:01 /tmp/security.TpNslbC3
-rw-------  1 root  wheel  0 Sep  9 03:01 /tmp/security.eRuWD2Aa
-rw-------  1 root  wheel  0 Sep  7 03:01 /tmp/security.sEnKe309


>Fix:

--- 550.ipfwlimit.ORI	Sun Sep 11 14:44:52 2005
+++ 550.ipfwlimit	Sun Sep 11 14:45:20 2005
@@ -42,11 +42,11 @@
 
 case "$daily_status_security_ipfwlimit_enable" in
     [Yy][Ee][Ss])
-	TMP=`mktemp -t security`
 	IPFW_LOG_LIMIT=`sysctl -n net.inet.ip.fw.verbose_limit 2> /dev/null`
 	if [ $? -ne 0 ]; then
 		exit 0
 	fi
+	TMP=`mktemp -t security`
 	ipfw -a list | grep " log " | \
 	grep '^[[:digit:]]\+[[:space:]]\+[[:digit:]]\+' | \
 	awk -v limit="$IPFW_LOG_LIMIT" \
>Release-Note:
>Audit-Trail:
>Unformatted:



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