Package: lm-sensors Version: 1:2.9.0-8 Priority: normal Tags: patch There is a bug in the pwmconfig, it would be a security bug if it would use /tmp instead of /usr/tmp but it's a bug nevertheless. The attached patch fixes the issue and introduces safe handling of temporary files at the same time.
Regards Javier
diff -Nru lm-sensors-2.9.0.orig/prog/pwm/pwmconfig lm-sensors-2.9.0/prog/pwm/pwmconfig --- lm-sensors-2.9.0.orig/prog/pwm/pwmconfig 2004-12-20 23:00:10.000000000 +0100 +++ lm-sensors-2.9.0/prog/pwm/pwmconfig 2005-01-24 10:06:01.000000000 +0100 @@ -209,8 +209,9 @@ if [ "$PLOT" = "y" ] then - TMP1=/usr/tmp/pwmtest$$.1 - TMP2=/usr/tmp/pwmtest$$.2 + TMP1=`tempfile` || { echo "$0: Cannot create temporary file" >&2; exit 1; } + TMP2=`tempfile` || { echo "$0: Cannot create temporary file" >&2; exit 1; } + trap " /bin/rm -f -- \"$TMP1\" \"$TMP2\" " 0 1 2 3 13 15 echo "set xlabel \"PWM: $P\"" > $TMP1 echo "set ylabel \"FAN: $F (RPM)\"" >> $TMP1 echo 'set nokey' >> $TMP1
signature.asc
Description: Digital signature