Blob Blame History Raw
diff --git a/yum-rhn-plugin.spec b/yum-rhn-plugin.spec
index 5178223..1ee4a5e 100644
--- a/yum-rhn-plugin.spec
+++ b/yum-rhn-plugin.spec
@@ -1,7 +1,7 @@
 Summary: Spacewalk support for yum
 Name: yum-rhn-plugin
 Version: 2.0.1
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: GPLv2
 Group: System Environment/Base
 Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -49,16 +49,16 @@ export pluginconf='/etc/yum/pluginconf.d/rhnplugin.conf'
 if [ $1 -gt 1 ] && [ -f /etc/sysconfig/rhn/systemid ] && [ -f "$pluginconf" ]; then
     if grep -q '^[[:space:]]*enabled[[:space:]]*=[[:space:]]*1[[:space:]]*$' \
        "$pluginconf"; then
-        touch /var/tmp/enable-yum-rhn-plugin
+        echo "1" > /etc/enable-yum-rhn-plugin
     fi
 fi
 
 %post
 # 682820 - re-enable yum-rhn-plugin after package upgrade if the system is already registered
 export pluginconf='/etc/yum/pluginconf.d/rhnplugin.conf'
-if [ $1 -gt 1 ] && [ -f "$pluginconf" ] && [ -f "/var/tmp/enable-yum-rhn-plugin" ]; then
+if [ $1 -gt 1 ] && [ -f "$pluginconf" ] && [ -f "/etc/enable-yum-rhn-plugin" ]; then
     sed -i '/\[main]/,/^$/{/enabled/s/0/1/}' "$pluginconf"
-    rm -f /var/tmp/enable-yum-rhn-plugin
+    rm -f /etc/enable-yum-rhn-plugin
 fi
 
 %files -f %{name}.lang
@@ -70,6 +70,9 @@ fi
 %doc LICENSE
 
 %changelog
+* Mon Feb 03 2014 Milan Zazrivec <mzazrivec@redhat.com> 2.0.1-3
+- Resolves: #1043850 - avoid insecure use of /var/tmp
+
 * Mon Sep 09 2013 Stephen Herr <sherr@redhat.com> 2.0.1-2
 - Resolves: #1006045 - keep yum-rhn-plugins higher default timeout