From 8f227e7db75c45d1e0eb19c9d8b703f170f3058d Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Thu, 13 Mar 2008 18:02:05 +0000 Subject: [PATCH] Don't run policykit checks when root (rhbz #436994) --- virt-manager-0.5.4-polkit-root.patch | 14 ++++++++++++++ virt-manager.spec | 7 ++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 virt-manager-0.5.4-polkit-root.patch diff --git a/virt-manager-0.5.4-polkit-root.patch b/virt-manager-0.5.4-polkit-root.patch new file mode 100644 index 0000000..6d42ca2 --- /dev/null +++ b/virt-manager-0.5.4-polkit-root.patch @@ -0,0 +1,14 @@ +diff -rup virt-manager-0.5.4.orig/src/virtManager/connection.py virt-manager-0.5.4/src/virtManager/connection.py +--- virt-manager-0.5.4.orig/src/virtManager/connection.py 2008-03-10 20:17:51.000000000 -0400 ++++ virt-manager-0.5.4/src/virtManager/connection.py 2008-03-13 13:51:14.000000000 -0400 +@@ -336,6 +336,9 @@ class vmmConnection(gobject.GObject): + self.connectThread.start() + + def _do_creds_polkit(self, action): ++ if os.getuid() == 0: ++ logging.debug("Skipping policykit check as root") ++ return 0 + logging.debug("Doing policykit for %s" % action) + bus = dbus.SessionBus() + obj = bus.get_object("org.gnome.PolicyKit", "/org/gnome/PolicyKit/Manager") +Only in virt-manager-0.5.4/src/virtManager: connection.py~ diff --git a/virt-manager.spec b/virt-manager.spec index 5f9cbaa..e2a5644 100644 --- a/virt-manager.spec +++ b/virt-manager.spec @@ -8,7 +8,7 @@ Name: virt-manager Version: 0.5.4 -Release: 1%{_extra_release} +Release: 2%{_extra_release} Summary: Virtual Machine Manager Group: Applications/Emulators @@ -17,6 +17,7 @@ URL: http://virt-manager.org/ Source0: http://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar.gz Source1: %{name}.pam Source2: %{name}.console +Patch1: %{name}-%{version}-polkit-root.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # These two are just the oldest version tested @@ -68,6 +69,7 @@ API. %prep %setup -q +%patch1 -p1 %build %configure @@ -158,6 +160,9 @@ fi %{_datadir}/dbus-1/services/%{name}.service %changelog +* Thu Mar 13 2008 Daniel P. Berrange - 0.5.4-2.fc9 +- Don't run policykit checks when root (rhbz #436994) + * Mon Mar 10 2008 Daniel P. Berrange - 0.5.4-1.fc9 - Update to 0.5.4 release