Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Jul 2002 10:06:20 -0700 (PDT)
From:      frf <frf@xocolatl.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   bin/40960: periodic security leaves tmp files behind
Message-ID:  <200207241706.g6OH6K6k090930@mleko.xocolatl.com>

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

>Number:         40960
>Category:       bin
>Synopsis:       periodic security leaves tmp files behind
>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:   Wed Jul 24 10:10:04 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     frf@xocolatl.com
>Release:        FreeBSD 4.6-STABLE i386
>Organization:
>Environment:
System: FreeBSD mleko.xocolatl.com 4.6-STABLE FreeBSD 4.6-STABLE


>Description:
Most of the scripts in /etc/periodic/security use mktemp to create
temp files, and then they go into a case statement to decide if the
body of the script should be run. If the "case" is YES, then the
tempfile is removed at the bottom of the statement. If the "case"
is "not YES", the 'rm -f ${TMP} is never reached and a zero length
temp file remains behind after the script exits.

>How-To-Repeat:
Change YES to NO for any of the "periodic security" options that
create a temp file

>Fix:
move the TMP=`mktemp` bit inside the case statement (preferred)
duplicate the rm $TMP for the default case
move the rm $TMP outside the case statement
>Release-Note:
>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?200207241706.g6OH6K6k090930>