- Moved hp-setup to the ui package (bug #243273).

- Prevent SELinux audit message from the CUPS backends (bug #241776)
This commit is contained in:
Tim Waugh 2007-06-08 11:36:24 +00:00
parent 6b94569d61
commit 7c4b16168c
2 changed files with 30 additions and 3 deletions

View File

@ -0,0 +1,19 @@
--- hplip-1.7.2/base/g.py.no-root-config 2007-05-30 16:08:04.000000000 +0100
+++ hplip-1.7.2/base/g.py 2007-05-30 16:16:54.000000000 +0100
@@ -88,6 +88,16 @@
dict.__setattr__(self, "config_obj", ConfigParser.ConfigParser())
dict.__setattr__(self, "filename", filename)
+ if filename.startswith ("/root/"):
+ import sys, posixpath
+ argv0 = sys.argv[0]
+ name = posixpath.basename (argv0)
+ if name == "hp" or name == "hpfax":
+ # Don't try opening a file in root's home directory. We are
+ # running as a CUPS backend, and doing so would cause an
+ # SELinux AVC message (bug #241776).
+ return
+
try:
pathmode = os.stat(filename)[stat.ST_MODE]
if pathmode & 0022 != 0:

View File

@ -1,7 +1,7 @@
Summary: HP Linux Imaging and Printing Project
Name: hplip
Version: 1.7.2
Release: 10%{?dist}
Release: 11%{?dist}
License: GPL/MIT/BSD
Group: System Environment/Daemons
Conflicts: system-config-printer < 0.6.132
@ -24,6 +24,7 @@ Patch8: hplip-libsane.patch
Patch9: hplip-media-empty.patch
Patch10: hplip-faxing-with-low-supplies.patch
Patch11: hplip-unload-traceback.patch
Patch12: hplip-no-root-config.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
Requires(post): /sbin/service
@ -116,6 +117,9 @@ rm -rf $RPM_BUILD_DIR/%{name}-%{version}
# Prevent a traceback when unloading a photo card (bug #238617).
%patch11 -p1 -b .unload-traceback
# Prevent SELinux audit message from the CUPS backends (bug #241776)
%patch12 -p1 -b .no-root-config
autoconf # for patch4
%build
@ -192,7 +196,6 @@ rm -rf %{buildroot}
%{_bindir}/hp-makeuri
%{_bindir}/hp-probe
%{_bindir}/hp-sendfax
%{_bindir}/hp-setup
%{_bindir}/hp-testpage
%{_bindir}/hp-timedate
%{_bindir}/hp-unload
@ -218,7 +221,6 @@ rm -rf %{buildroot}
%{_datadir}/hplip/makecopies
%{_datadir}/hplip/makeuri
%{_datadir}/hplip/probe
%{_datadir}/hplip/setup
%{_datadir}/hplip/sendfax
%{_datadir}/hplip/testpage
%{_datadir}/hplip/timedate
@ -240,10 +242,12 @@ rm -rf %{buildroot}
%files gui
%{_bindir}/hp-print
%{_bindir}/hp-setup
%{_bindir}/hp-toolbox
# Files
%{_datadir}/hplip/data/images
%{_datadir}/hplip/print
%{_datadir}/hplip/setup
%{_datadir}/hplip/toolbox
# Directories
%{_datadir}/hplip/ui
@ -291,6 +295,10 @@ fi
exit 0
%changelog
* Fri Jun 8 2007 Tim Waugh <twaugh@redhat.com>
- Moved hp-setup to the ui package (bug #243273).
- Prevent SELinux audit message from the CUPS backends (bug #241776)
* Thu May 10 2007 Tim Waugh <twaugh@redhat.com> 1.7.2-10
- Prevent a traceback when unloading a photo card (bug #238617).