*** SECURITY FIX ***

Secure the creation of temporary files. Problem found by Javier
Fernandez-Sanguino Pena, patch by Aurelien Jarno.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2871 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2005-01-26 21:12:50 +00:00
1 parent c06a1850ff
commit a0a471c8c5
1 file changed
+2 -2
+2 -2
View File
@@ -209,8 +209,8 @@ function pwmdetail()
if [ "$PLOT" = "y" ]
then
TMP1=/usr/tmp/pwmtest$$.1
TMP2=/usr/tmp/pwmtest$$.2
TMP1=`mktemp -t pwmtest1.XXXXXXXXXX` || { echo "$0: Cannot create temporary file" >&2; exit 1; }
TMP2=`mktemp -t pwmtest2.XXXXXXXXXX` || { rm -f $TMP1 ; echo "$0: Cannot create temporary file" >&2; exit 1; }
echo "set xlabel \"PWM: $P\"" > $TMP1
echo "set ylabel \"FAN: $F (RPM)\"" >> $TMP1
echo 'set nokey' >> $TMP1