deprecate at_console statement

This commit is contained in:
Zdenek Dohnal 2018-11-09 14:45:59 +01:00
parent 7545ec2060
commit 7462904569
2 changed files with 97 additions and 2 deletions

View File

@ -0,0 +1,89 @@
From 19df47d2630b637d1802efe2c3cd5a00f2e40c3b Mon Sep 17 00:00:00 2001
From: Tom Gundersen <teg@jklm.no>
Date: Wed, 7 Nov 2018 17:11:46 +0100
Subject: [PATCH] dbus: remove deprecated at_console statement
As described in [0], this likely did not have the intended effect, so
simply remove it. The change in behavior is that up until this patch
it would be possible for root and any non-system user to potentially
own the system-config-printer dbus names. Now this is extended to also
allow any system user.
[0]: <https://www.spinics.net/lists/linux-bluetooth/msg75267.html>
Signed-off-by: Tom Gundersen <teg@jklm.no>
CC: David Herrmann <dh.herrmann@gmail.com>
---
dbus/com.redhat.NewPrinterNotification.conf | 13 +------------
dbus/com.redhat.PrinterDriversInstaller.conf | 13 +------------
2 files changed, 2 insertions(+), 24 deletions(-)
diff --git a/dbus/com.redhat.NewPrinterNotification.conf b/dbus/com.redhat.NewPrinterNotification.conf
index 912cbcd4..4ef92e37 100644
--- a/dbus/com.redhat.NewPrinterNotification.conf
+++ b/dbus/com.redhat.NewPrinterNotification.conf
@@ -2,27 +2,16 @@
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
- <policy at_console="true">
- <allow own="com.redhat.NewPrinterNotification"/>
- </policy>
-
- <policy user="root">
- <allow own="com.redhat.NewPrinterNotification"/>
- </policy>
-
<policy user="root">
<allow send_destination="com.redhat.NewPrinterNotification"
send_interface="com.redhat.NewPrinterNotification"/>
</policy>
<policy context="default">
- <deny own="com.redhat.NewPrinterNotification"/>
+ <allow own="com.redhat.NewPrinterNotification"/>
<deny send_destination="com.redhat.NewPrinterNotification"
send_interface="com.redhat.NewPrinterNotification"/>
- </policy>
-
- <policy context="default">
<allow send_destination="com.redhat.NewPrinterNotification"
send_interface="org.freedesktop.DBus.Introspectable" />
<allow send_destination="com.redhat.NewPrinterNotification"
diff --git a/dbus/com.redhat.PrinterDriversInstaller.conf b/dbus/com.redhat.PrinterDriversInstaller.conf
index d5e5c543..e3ffb2fa 100644
--- a/dbus/com.redhat.PrinterDriversInstaller.conf
+++ b/dbus/com.redhat.PrinterDriversInstaller.conf
@@ -2,27 +2,16 @@
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
- <policy at_console="true">
- <allow own="com.redhat.PrinterDriversInstaller"/>
- </policy>
-
- <policy user="root">
- <allow own="com.redhat.PrinterDriversInstaller"/>
- </policy>
-
<policy user="root">
<allow send_destination="com.redhat.PrinterDriversInstaller"
send_interface="com.redhat.PrinterDriversInstaller"/>
</policy>
<policy context="default">
- <deny own="com.redhat.PrinterDriversInstaller"/>
+ <allow own="com.redhat.PrinterDriversInstaller"/>
<deny send_destination="com.redhat.PrinterDriversInstaller"
send_interface="com.redhat.PrinterDriversInstaller"/>
- </policy>
-
- <policy context="default">
<allow send_destination="com.redhat.PrinterDriversInstaller"
send_interface="org.freedesktop.DBus.Introspectable" />
<allow send_destination="com.redhat.PrinterDriversInstaller"
--
2.17.2

View File

@ -9,7 +9,7 @@
Summary: A printer administration tool Summary: A printer administration tool
Name: system-config-printer Name: system-config-printer
Version: 1.5.11 Version: 1.5.11
Release: 13%{?dist} Release: 14%{?dist}
License: GPLv2+ License: GPLv2+
URL: https://github.com/%{username}/%{name} URL: https://github.com/%{username}/%{name}
Source0: %{url}/releases/download/%{version}/%{name}-%{version}.tar.gz Source0: %{url}/releases/download/%{version}/%{name}-%{version}.tar.gz
@ -25,6 +25,7 @@ Patch07: 0001-Fallback-to-using-LC_CTYPE-if-LC_MESSAGES-is-empty-a.patch
Patch08: 0001-define-classes-for-Secret-only-when-libsecret-is-ins.patch Patch08: 0001-define-classes-for-Secret-only-when-libsecret-is-ins.patch
Patch09: 0001-Fix-typo-in-debugprint-call-https-github.com-zdohnal.patch Patch09: 0001-Fix-typo-in-debugprint-call-https-github.com-zdohnal.patch
Patch10: 0001-Fix-TypeError-raised-by-debugprint-call.patch Patch10: 0001-Fix-TypeError-raised-by-debugprint-call.patch
Patch11: 0001-dbus-remove-deprecated-at_console-statement.patch
# gcc is no longer in buildroot by default # gcc is no longer in buildroot by default
# gcc is needed for udev-configure-printer.c # gcc is needed for udev-configure-printer.c
@ -95,6 +96,7 @@ printers.
%prep %prep
%setup -q %setup -q
# all backported from upstream
%patch01 -p1 -b .authdialog %patch01 -p1 -b .authdialog
%patch02 -p1 -b .upstream0 %patch02 -p1 -b .upstream0
%patch03 -p1 -b .upstream1 %patch03 -p1 -b .upstream1
@ -105,6 +107,7 @@ printers.
%patch08 -p1 -b .upstream6 %patch08 -p1 -b .upstream6
%patch09 -p1 -b .upstream7 %patch09 -p1 -b .upstream7
%patch10 -p1 -b .upstream8 %patch10 -p1 -b .upstream8
%patch11 -p1 -b .deprecate-at-console
%build %build
%configure --with-udev-rules %configure --with-udev-rules
@ -205,10 +208,13 @@ touch %buildroot%{_localstatedir}/run/udev-configure-printer/usb-uris
%{_mandir}/man1/%{name}.1* %{_mandir}/man1/%{name}.1*
%post %post
/bin/rm -f /var/cache/foomatic/foomatic.pickle %{_bindir}/rm -f /var/cache/foomatic/foomatic.pickle
exit 0 exit 0
%changelog %changelog
* Fri Nov 09 2018 Zdenek Dohnal <zdohnal@redhat.com> - 1.5.11-14
- deprecate at_console statement
* Mon Oct 15 2018 Zdenek Dohnal <zdohnal@redhat.com> - 1.5.11-13 * Mon Oct 15 2018 Zdenek Dohnal <zdohnal@redhat.com> - 1.5.11-13
- backport several upstream patches - backport several upstream patches