- Fixed no-root-config patch (bug #489055).
This commit is contained in:
parent
245e2a707c
commit
ec8111936b
@ -1,21 +1,21 @@
|
||||
diff -up hplip-3.9.2/base/g.py.no-root-config hplip-3.9.2/base/g.py
|
||||
--- hplip-3.9.2/base/g.py.no-root-config 2009-02-20 00:36:51.000000000 +0000
|
||||
+++ hplip-3.9.2/base/g.py 2009-02-20 11:13:28.000000000 +0000
|
||||
@@ -110,6 +110,10 @@ class ConfigBase(object):
|
||||
keys = options
|
||||
+++ hplip-3.9.2/base/g.py 2009-03-09 17:43:15.000000000 +0000
|
||||
@@ -111,6 +111,10 @@ class ConfigBase(object):
|
||||
|
||||
def read(self):
|
||||
if self.filename is not None:
|
||||
+ filename = self.filename
|
||||
+ if filename.startswith ("/root/") or filename.startswith ("/var/"):
|
||||
+ # Don't try opening a file in root's home directory.
|
||||
+ return
|
||||
+
|
||||
if self.filename is not None:
|
||||
try:
|
||||
fp = open(self.filename, "r")
|
||||
@@ -119,6 +123,15 @@ class ConfigBase(object):
|
||||
log.debug("Unable to open file %s for reading." % self.filename)
|
||||
self.conf.readfp(fp)
|
||||
@@ -120,6 +124,15 @@ class ConfigBase(object):
|
||||
|
||||
def write(self):
|
||||
if self.filename is not None:
|
||||
+ filename = self.filename
|
||||
+ if filename.startswith ("/root/") or filename.startswith ("/var/"):
|
||||
+ # Don't try writing a file in root's home directory.
|
||||
@ -25,6 +25,6 @@ diff -up hplip-3.9.2/base/g.py.no-root-config hplip-3.9.2/base/g.py
|
||||
+ # See bug #479178.
|
||||
+ return
|
||||
+
|
||||
if self.filename is not None:
|
||||
try:
|
||||
fp = open(self.filename, "w")
|
||||
self.conf.write(fp)
|
||||
|
@ -1,7 +1,7 @@
|
||||
Summary: HP Linux Imaging and Printing Project
|
||||
Name: hplip
|
||||
Version: 3.9.2
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
License: GPLv2+ and MIT
|
||||
Group: System Environment/Daemons
|
||||
Conflicts: system-config-printer < 0.6.132
|
||||
@ -326,6 +326,9 @@ fi
|
||||
exit 0
|
||||
|
||||
%changelog
|
||||
* Mon Mar 9 2009 Tim Waugh <twaugh@redhat.com> 3.9.2-4
|
||||
- Fixed no-root-config patch (bug #489055).
|
||||
|
||||
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.9.2-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user