1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-22 02:51:03 +00:00

Changed to a more secure way of handling tempfiles

This commit is contained in:
Finn Andersen 2014-10-30 09:56:25 +01:00
parent 31f5cc79db
commit 771fb2dd72

View file

@ -32,6 +32,7 @@ GPLv2
#
# HISTORY
# v1.0 : Initial release
# 1.0.1 : More secure handling of tempfiles
#
###############################################
#
@ -115,7 +116,7 @@ esac
# Location and name of tempfile to parse
FILENAME=/tmp/cisco_epc3010.dump
FILENAME=$(mktemp /tmp/cisco_epc3010-XXXX.dump) || exit 1
# Get statuspage from the modem
@ -168,4 +169,6 @@ fi
#
# Remove tempory file, used for parsing data
#
rm -f $FILENAME
trap "rm -rf $FILENAME" EXIT