]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
Don't default to polkit auth when running non-root
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 11 Jul 2008 09:50:01 +0000 (09:50 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Fri, 11 Jul 2008 09:50:01 +0000 (09:50 +0000)
ChangeLog
qemud/qemud.c

index dd79b76ff522f102d84311713717f604f25db0b6..56e837b5d0f09a15aca22af92ef45bb4e1300459 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Jul 11 10:48:59 BST 2008 Daniel P. Berrange <berrange@redhat.com>
+
+       * qemud/qemud.c: Don't default to polkit auth when running
+       as non-root
+
 Fri Jul 11 10:46:59 BST 2008 Daniel P. Berrange <berrange@redhat.com>
 
        * src/qemu_driver.c: Fix parsing of QEMU stdout looking for
index 139d1ffc3b73d1e51f94cd16bc293799e58b287c..30557e1172f8773c09ed00db0232e831ee55293b 100644 (file)
@@ -1926,6 +1926,14 @@ remoteReadConfigFile (struct qemud_server *server, const char *filename)
     GET_CONF_STR (conf, filename, tcp_port);
     GET_CONF_STR (conf, filename, listen_addr);
 
+#if HAVE_POLKIT
+    /* Change the default back to no auth for non-root */
+    if (getuid() != 0 && auth_unix_rw == REMOTE_AUTH_POLKIT)
+        auth_unix_rw = REMOTE_AUTH_NONE;
+    if (getuid() != 0 && auth_unix_ro == REMOTE_AUTH_POLKIT)
+        auth_unix_ro = REMOTE_AUTH_NONE;
+#endif
+
     if (remoteConfigGetAuth(conf, "auth_unix_rw", &auth_unix_rw, filename) < 0)
         goto free_and_fail;
 #if HAVE_POLKIT