mirror of
https://src.fedoraproject.org/rpms/virt-manager.git
synced 2025-07-16 09:04:55 +00:00
Fix broken polkit check (rhbz #464069)
This commit is contained in:
46
virt-manager-0.5.4-polkit-check.patch
Normal file
46
virt-manager-0.5.4-polkit-check.patch
Normal file
@@ -0,0 +1,46 @@
|
||||
changeset: 830:2893744f29b0
|
||||
user: "Daniel P. Berrange <berrange@redhat.com>"
|
||||
date: Thu Aug 21 12:29:33 2008 +0100
|
||||
files: src/virtManager/connection.py
|
||||
description:
|
||||
Fix check for policykit
|
||||
|
||||
|
||||
diff -r 043e6981cb84 -r 2893744f29b0 src/virtManager/connection.py
|
||||
--- a/src/virtManager/connection.py Thu Aug 21 12:06:35 2008 +0100
|
||||
+++ b/src/virtManager/connection.py Thu Aug 21 12:29:33 2008 +0100
|
||||
@@ -38,7 +38,10 @@
|
||||
from virtManager.netdev import vmmNetDevice
|
||||
from virtManager.storagepool import vmmStoragePool
|
||||
|
||||
-LIBVIRT_POLICY_FILE = "/usr/share/PolicyKit/policy/libvirtd.policy"
|
||||
+LIBVIRT_POLICY_FILES = [
|
||||
+ "/usr/share/PolicyKit/policy/libvirtd.policy",
|
||||
+ "/usr/share/PolicyKit/policy/org.libvirt.unix.policy"
|
||||
+]
|
||||
|
||||
def get_local_hostname():
|
||||
try:
|
||||
@@ -137,7 +140,12 @@
|
||||
|
||||
self.readOnly = readOnly
|
||||
if not self.is_remote() and os.getuid() != 0 and self.uri != "qemu:///session":
|
||||
- if not os.path.exists(LIBVIRT_POLICY_FILE):
|
||||
+ hasPolkit = False
|
||||
+ for f in LIBVIRT_POLICY_FILES:
|
||||
+ if os.path.exists(f):
|
||||
+ hasPolkit = True
|
||||
+
|
||||
+ if not hasPolkit:
|
||||
self.readOnly = True
|
||||
|
||||
self.state = self.STATE_DISCONNECTED
|
||||
@@ -460,6 +468,7 @@
|
||||
try:
|
||||
flags = 0
|
||||
if self.readOnly:
|
||||
+ logging.info("Caller requested read only connection")
|
||||
flags = libvirt.VIR_CONNECT_RO
|
||||
|
||||
self.vmm = libvirt.openAuth(self.uri,
|
||||
|
@@ -8,7 +8,7 @@
|
||||
|
||||
Name: virt-manager
|
||||
Version: 0.5.4
|
||||
Release: 4%{_extra_release}
|
||||
Release: 5%{_extra_release}
|
||||
Summary: Virtual Machine Manager
|
||||
|
||||
Group: Applications/Emulators
|
||||
@@ -20,6 +20,7 @@ Source2: %{name}.console
|
||||
Patch1: %{name}-%{version}-polkit-root.patch
|
||||
Patch2: %{name}-%{version}-i18n.patch
|
||||
Patch3: %{name}-%{version}-image-dir.patch
|
||||
Patch4: %{name}-%{version}-polkit-check.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
# These two are just the oldest version tested
|
||||
@@ -74,6 +75,7 @@ API.
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
|
||||
%build
|
||||
%configure
|
||||
@@ -164,6 +166,9 @@ fi
|
||||
%{_datadir}/dbus-1/services/%{name}.service
|
||||
|
||||
%changelog
|
||||
* Thu Oct 2 2008 Daniel P. Berrange <berrange@redhat.com> - 0.5.4-5.fc9
|
||||
- Fix polkit policy file check (rhbz #464069)
|
||||
|
||||
* Fri May 9 2008 Daniel P. Berrange <berrange@redhat.com> - 0.5.4-4.fc9
|
||||
- Default disk images to /var/lib/libvirt/images
|
||||
|
||||
|
Reference in New Issue
Block a user