rpms/hplip/F-10 hplip-no-root-config.patch, 1.7, 1.8 hplip.spec, 1.191, 1.192

Tim Waugh twaugh at fedoraproject.org
Mon Jan 12 18:41:42 UTC 2009


Author: twaugh

Update of /cvs/pkgs/rpms/hplip/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv13739

Modified Files:
	hplip-no-root-config.patch hplip.spec 
Log Message:
* Tue Dec 23 2008 Tim Waugh <twaugh at redhat.com> 2.8.12-1
- 2.8.12.


hplip-no-root-config.patch:

Index: hplip-no-root-config.patch
===================================================================
RCS file: /cvs/pkgs/rpms/hplip/F-10/hplip-no-root-config.patch,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- hplip-no-root-config.patch	23 Dec 2008 11:57:27 -0000	1.7
+++ hplip-no-root-config.patch	12 Jan 2009 18:41:11 -0000	1.8
@@ -1,7 +1,23 @@
 diff -up hplip-2.8.12/base/g.py.no-root-config hplip-2.8.12/base/g.py
 --- hplip-2.8.12/base/g.py.no-root-config	2008-12-17 20:41:12.000000000 +0000
-+++ hplip-2.8.12/base/g.py	2008-12-23 10:19:44.000000000 +0000
-@@ -107,6 +107,10 @@ class Config(dict):
++++ hplip-2.8.12/base/g.py	2009-01-12 12:22:31.000000000 +0000
+@@ -91,6 +91,15 @@ class ConfigSection(dict):
+ 
+         self.config_obj.set(self.section_name, option, val)
+ 
++        filename = self.filename
++        if filename.startswith ("/root/") or filename.startswith ("/var/"):
++            # Don't try writing a file in root's home directory.
++            return
++        elif filename.startswith ("/etc/"):
++            # Certainly don't try writing the system-wide config file!
++            # See bug #479178.
++            return
++
+         try:
+             f = file(self.filename, 'w')
+             self.config_obj.write(f)
+@@ -107,6 +116,10 @@ class Config(dict):
  
          log.debug("Reading config file %s" % filename)
  


Index: hplip.spec
===================================================================
RCS file: /cvs/pkgs/rpms/hplip/F-10/hplip.spec,v
retrieving revision 1.191
retrieving revision 1.192
diff -u -r1.191 -r1.192
--- hplip.spec	23 Dec 2008 11:57:27 -0000	1.191
+++ hplip.spec	12 Jan 2009 18:41:11 -0000	1.192
@@ -1,7 +1,7 @@
 Summary: HP Linux Imaging and Printing Project
 Name: hplip
 Version: 2.8.12
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: GPLv2+ and MIT
 Group: System Environment/Daemons
 Conflicts: system-config-printer < 0.6.132
@@ -313,6 +313,9 @@
 exit 0
 
 %changelog
+* Mon Jan 12 2009 Tim Waugh <twaugh at redhat.com> 2.8.12-2
+- Don't write to system-wide configuration file (bug #479178).
+
 * Tue Dec 23 2008 Tim Waugh <twaugh at redhat.com> 2.8.12-1
 - 2.8.12.
 




More information about the fedora-extras-commits mailing list