diff --git a/hplip-no-root-config.patch b/hplip-no-root-config.patch index 028ecd4..a1d5bce 100644 --- a/hplip-no-root-config.patch +++ b/hplip-no-root-config.patch @@ -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: diff --git a/hplip.spec b/hplip.spec index cce079a..9fdbcab 100644 --- a/hplip.spec +++ b/hplip.spec @@ -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 @@ fi exit 0 %changelog +* Tue Sep 25 2007 Tim Waugh 2.7.7-5 +- Prevent hpfax trying to load configuration files as user lp. + * Thu Sep 6 2007 Tim Waugh 2.7.7-4 - Reverted udev rules change. - Ship a HAL FDI file to get correct access control on the USB device