mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 14:16:00 +00:00
Changed to a more secure way of handling tempfiles
This commit is contained in:
parent
31f5cc79db
commit
771fb2dd72
1 changed files with 7 additions and 4 deletions
|
@ -32,6 +32,7 @@ GPLv2
|
||||||
#
|
#
|
||||||
# HISTORY
|
# HISTORY
|
||||||
# v1.0 : Initial release
|
# v1.0 : Initial release
|
||||||
|
# 1.0.1 : More secure handling of tempfiles
|
||||||
#
|
#
|
||||||
###############################################
|
###############################################
|
||||||
#
|
#
|
||||||
|
@ -115,7 +116,7 @@ esac
|
||||||
|
|
||||||
|
|
||||||
# Location and name of tempfile to parse
|
# 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
|
# Get statuspage from the modem
|
||||||
|
@ -168,4 +169,6 @@ fi
|
||||||
#
|
#
|
||||||
# Remove tempory file, used for parsing data
|
# Remove tempory file, used for parsing data
|
||||||
#
|
#
|
||||||
rm -f $FILENAME
|
trap "rm -rf $FILENAME" EXIT
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue