Don't default to polkit auth when running non-root

This commit is contained in:
Daniel P. Berrange 2008-07-11 09:50:01 +00:00
parent 1d86fca433
commit 5e239b00d6
2 changed files with 13 additions and 0 deletions

View File

@ -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

View 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