From 7c4b16168c2ce65e3df53dc768ebb8203d55f4d7 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Fri, 8 Jun 2007 11:36:24 +0000 Subject: [PATCH] - Moved hp-setup to the ui package (bug #243273). - Prevent SELinux audit message from the CUPS backends (bug #241776) --- hplip-no-root-config.patch | 19 +++++++++++++++++++ hplip.spec | 14 +++++++++++--- 2 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 hplip-no-root-config.patch diff --git a/hplip-no-root-config.patch b/hplip-no-root-config.patch new file mode 100644 index 0000000..45a2282 --- /dev/null +++ b/hplip-no-root-config.patch @@ -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: diff --git a/hplip.spec b/hplip.spec index d89fe46..870bd07 100644 --- a/hplip.spec +++ b/hplip.spec @@ -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 +- 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 1.7.2-10 - Prevent a traceback when unloading a photo card (bug #238617).