hplip/hplip-no-root-config.patch
2008-12-23 11:38:18 +00:00

15 lines
567 B
Diff

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):
log.debug("Reading config file %s" % filename)
+ 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)