]> xenbits.xensource.com Git - libvirt.git/commitdiff
Allow polkit auth for VNC and SSH users
authorCole Robinson <crobinso@redhat.com>
Tue, 7 Feb 2012 16:50:29 +0000 (11:50 -0500)
committerCole Robinson <crobinso@redhat.com>
Tue, 7 Feb 2012 16:59:35 +0000 (11:59 -0500)
If you are sitting in front of a physical machine and logged in as
a regular user, you can connect to the system libvirtd instance
by providing a root password to policykit. This is how most
virt-manager users talk to libvirt.

However, if you are launching virt-manager over ssh -X, or over
VNC started from say /etc/sysconfig/vncservers, our policykit policy
rejects the user outright, providing no option to provide the root
password. This is confusing to users and doesn't seem to serve much
point.

Change the policy to allow inactive (VNC) and non-local (SSH, VNC)
to provide root credentials for accessing system libvirtd. We use
auth_admin rather than auth_admin_keep so that credentials aren't
cached at all, and every subsequent reconnection to libvirt requires
auth.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=625115
Similar change to PackageKit policy:
https://bugzilla.redhat.com/show_bug.cgi?id=528511

daemon/libvirtd.policy-0
daemon/libvirtd.policy-1

index b6da94615ef55d663f8846167f5984bff1391801..5d6845c5c2e5376f2e77b37a55fdeff25813a5fc 100644 (file)
@@ -34,8 +34,8 @@ file are instantly applied.
       <defaults>
         <!-- Only a program in the active host session can use libvirt in
              read-write mode for management, and we require user password -->
-        <allow_any>no</allow_any>
-        <allow_inactive>no</allow_inactive>
+        <allow_any>auth_admin</allow_any>
+        <allow_inactive>auth_admin</allow_inactive>
         <allow_active>auth_admin_keep_session</allow_active>
       </defaults>
     </action>
index 6fa3a5e71e8c80373d310d240b358ec3c2f2ba16..c2bec1f2a7d88239df1ccfaf9fdeaee2fe0eec2c 100644 (file)
@@ -34,8 +34,8 @@ file are instantly applied.
       <defaults>
         <!-- Only a program in the active host session can use libvirt in
              read-write mode for management, and we require user password -->
-        <allow_any>no</allow_any>
-        <allow_inactive>no</allow_inactive>
+        <allow_any>auth_admin</allow_any>
+        <allow_inactive>auth_admin</allow_inactive>
         <allow_active>auth_admin_keep</allow_active>
       </defaults>
     </action>