Blame SOURCES/yum-rhn-plugin-2.0.1-2-el7-to-yum-rhn-plugin-2.0.1-3-el7.patch

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