]> git.pld-linux.org Git - packages/lm_sensors.git/commitdiff
- fix for CAN-2005-2672 (insecure temporary file creation) auto/ac/lm_sensors-2_9_1-3
authorAdam Gołębiowski <adamg@pld-linux.org>
Wed, 31 Aug 2005 07:46:02 +0000 (07:46 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- release 3

Changed files:
    lm_sensors-CAN-2005-2672.patch -> 1.1
    lm_sensors.spec -> 1.140

lm_sensors-CAN-2005-2672.patch [new file with mode: 0644]
lm_sensors.spec

diff --git a/lm_sensors-CAN-2005-2672.patch b/lm_sensors-CAN-2005-2672.patch
new file mode 100644 (file)
index 0000000..1518c67
--- /dev/null
@@ -0,0 +1,18 @@
+diff -burN lm_sensors-2.9.1.orig/prog/pwm/pwmconfig lm_sensors-2.9.1/prog/pwm/pwmconfig
+--- lm_sensors-2.9.1.orig/prog/pwm/pwmconfig   2005-08-31 09:38:08.272485088 +0200
++++ lm_sensors-2.9.1/prog/pwm/pwmconfig        2005-08-31 09:40:43.701856232 +0200
+@@ -465,9 +465,11 @@
+ function SaveConfig {
+       echo
+       echo "Saving configuration to $FCCONFIG..."
+-      egrep -v '(INTERVAL|FCTEMPS|FCFANS|MAXTEMP|MINTEMP|MINSTART|MINSTOP)' $FCCONFIG >/tmp/fancontrol
+-      echo -e "INTERVAL=$INTERVAL\nFCTEMPS=$FCTEMPS\nFCFANS=$FCFANS\nMINTEMP=$MINTEMP\nMAXTEMP=$MAXTEMP\nMINSTART=$MINSTART\nMINSTOP=$MINSTOP" >>/tmp/fancontrol
+-      mv /tmp/fancontrol $FCCONFIG
++      tmpfile=`mktemp pwmconfig.XXXXXX` || { echo "$0: Cannot create temporary file" >&2; exit 1;  }
++      trap " [ -f \"$tmpfile\" ] && /bin/rm -f -- \"$tmpfile\"" 0 1 2 3 13 15
++      egrep -v '(INTERVAL|FCTEMPS|FCFANS|MAXTEMP|MINTEMP|MINSTART|MINSTOP)' $FCCONFIG >$tmpfile
++      echo -e "INTERVAL=$INTERVAL\nFCTEMPS=$FCTEMPS\nFCFANS=$FCFANS\nMINTEMP=$MINTEMP\nMAXTEMP=$MAXTEMP\nMINSTART=$MINSTART\nMINSTOP=$MINSTOP" >>$tmpfile
++      mv $tmpfile $FCCONFIG
+       #check if file was written correctly
+       echo 'Configuration saved'
+ }
index 1ca848cd7ac2d0953ce1de544e5b51ae2d231b80..aeacd23c529b845f574d860d5af353d7aa7c1a1e 100644 (file)
@@ -17,7 +17,7 @@ Summary(ru):  
 Summary(uk):   õÔÉ̦ÔÉ ÄÌÑ ÍÏΦÔÏÒÉÎÇÕ ÁÐÁÒÁÔÕÒÉ
 Name:          lm_sensors
 Version:       2.9.1
-%define _rel   2
+%define _rel   3
 Release:       %{_rel}
 License:       GPL
 Group:         Applications/System
@@ -30,6 +30,7 @@ Patch1:               %{name}-ppc.patch
 Patch2:                %{name}-iconv-in-libc.patch
 Patch3:                %{name}-sensors-detect-PATH.patch
 Patch4:                %{name}-ipmi.patch
+Patch5:                %{name}-CAN-2005-2672.patch
 URL:           http://www.lm-sensors.nu/
 BuildRequires: rpmbuild(macros) >= 1.213
 %if %{with userspace}
@@ -183,6 +184,7 @@ Modu
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
 
 %build
 %if %{with kernel}
This page took 0.071375 seconds and 4 git commands to generate.