summaryrefslogtreecommitdiffstats
path: root/etc/periodic/security/550.ipfwlimit
diff options
context:
space:
mode:
authorcjc <cjc@FreeBSD.org>2002-08-25 04:09:17 +0000
committercjc <cjc@FreeBSD.org>2002-08-25 04:09:17 +0000
commit1bdbc52de73cf71badcb2564c142d3bd1b49eada (patch)
tree5c6bebf0979e515438921a9fe4a7177081994353 /etc/periodic/security/550.ipfwlimit
parentdd7bfe512b7208756388162f0bd728e5ae1af875 (diff)
downloadFreeBSD-src-1bdbc52de73cf71badcb2564c142d3bd1b49eada.zip
FreeBSD-src-1bdbc52de73cf71badcb2564c142d3bd1b49eada.tar.gz
Only create a temporary file if we are actually going to do something
in the script. Eliminates a bug where we create a temp file, but don't delete it since the rm(1) is only done if the check is enabled. PR: bin/40960 Submitted by: frf <frf@xocolatl.com> MFC after: 3 days
Diffstat (limited to 'etc/periodic/security/550.ipfwlimit')
-rwxr-xr-xetc/periodic/security/550.ipfwlimit2
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/periodic/security/550.ipfwlimit b/etc/periodic/security/550.ipfwlimit
index 3d54331..653dcf1 100755
--- a/etc/periodic/security/550.ipfwlimit
+++ b/etc/periodic/security/550.ipfwlimit
@@ -38,11 +38,11 @@ then
source_periodic_confs
fi
-TMP=`mktemp ${TMPDIR:-/tmp}/security.XXXXXXXXXX`
rc=0
case "$daily_status_security_ipfwlimit_enable" in
[Yy][Ee][Ss])
+ TMP=`mktemp ${TMPDIR:-/tmp}/security.XXXXXXXXXX`
IPFW_LOG_LIMIT=`sysctl -n net.inet.ip.fw.verbose_limit 2> /dev/null`
if [ $? -eq 0 ] && [ "${IPFW_LOG_LIMIT}" -ne 0 ]; then
ipfw -a l | grep " log " | perl -n -e \
OpenPOWER on IntegriCloud