rpms/hplip/devel hplip-no-root-config.patch, 1.5, 1.6 hplip.spec, 1.158, 1.159

Tim Waugh (twaugh) fedora-extras-commits at redhat.com
Tue Sep 25 14:49:29 UTC 2007


Author: twaugh

Update of /cvs/pkgs/rpms/hplip/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8585

Modified Files:
	hplip-no-root-config.patch hplip.spec 
Log Message:
* Tue Sep 25 2007 Tim Waugh <twaugh at redhat.com> 2.7.7-5
- Prevent hpfax trying to load configuration files as user lp.


hplip-no-root-config.patch:

Index: hplip-no-root-config.patch
===================================================================
RCS file: /cvs/pkgs/rpms/hplip/devel/hplip-no-root-config.patch,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- hplip-no-root-config.patch	9 Jul 2007 14:22:52 -0000	1.5
+++ hplip-no-root-config.patch	25 Sep 2007 14:49:26 -0000	1.6
@@ -1,17 +1,18 @@
---- hplip-2.7.6/base/g.py.no-root-config	2007-06-18 17:56:32.000000000 +0100
-+++ hplip-2.7.6/base/g.py	2007-06-29 17:58:29.000000000 +0100
-@@ -105,6 +105,10 @@
+diff -up hplip-2.7.7/base/g.py.no-root-config hplip-2.7.7/base/g.py
+--- hplip-2.7.7/base/g.py.no-root-config	2007-06-18 17:56:32.000000000 +0100
++++ hplip-2.7.7/base/g.py	2007-09-25 15:23:23.000000000 +0100
+@@ -105,6 +105,10 @@ class Config(dict):
  
          log.debug("Reading config file %s" % filename)
  
-+        if filename.startswith ("/root/"):
++        if filename.startswith ("/root/") or filename.startswith ("/var/"):
 +            # Don't try opening a file in root's home directory.
 +            return
 +
          try:
              f = file(filename, 'r')
              self.config_obj.readfp(f)
-@@ -134,23 +138,24 @@
+@@ -134,23 +138,25 @@ class Config(dict):
  # Config file: directories and ports
  prop.sys_config_file = '/etc/hp/hplip.conf'
  prop.user_dir = os.path.expanduser('~/.hplip')
@@ -26,7 +27,8 @@
  prop.user_config_file = os.path.join(prop.user_dir, 'hplip.conf')
  
 -if not os.path.exists(prop.user_config_file):
-+if (not prop.user_config_file.startswith ("/root/") and
++if (not (prop.user_config_file.startswith ("/root/") or
++         prop.user_config_file.startswith ("/var/")) and
 +    not os.getuid () == 0):
 +    os.umask(0037)
      try:


Index: hplip.spec
===================================================================
RCS file: /cvs/pkgs/rpms/hplip/devel/hplip.spec,v
retrieving revision 1.158
retrieving revision 1.159
diff -u -r1.158 -r1.159
--- hplip.spec	6 Sep 2007 12:19:39 -0000	1.158
+++ hplip.spec	25 Sep 2007 14:49:26 -0000	1.159
@@ -1,7 +1,7 @@
 Summary: HP Linux Imaging and Printing Project
 Name: hplip
 Version: 2.7.7
-Release: 4%{?dist}
+Release: 5%{?dist}
 License: GPLv2+ and MIT
 Group: System Environment/Daemons
 Conflicts: system-config-printer < 0.6.132
@@ -278,6 +278,9 @@
 exit 0
 
 %changelog
+* Tue Sep 25 2007 Tim Waugh <twaugh at redhat.com> 2.7.7-5
+- Prevent hpfax trying to load configuration files as user lp.
+
 * Thu Sep  6 2007 Tim Waugh <twaugh at redhat.com> 2.7.7-4
 - Reverted udev rules change.
 - Ship a HAL FDI file to get correct access control on the USB device




More information about the fedora-extras-commits mailing list