mirror of https://gitee.com/openkylin/libvirt.git
Don't default to polkit auth when running non-root
This commit is contained in:
parent
1d86fca433
commit
5e239b00d6
|
@ -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>
|
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
|
* src/qemu_driver.c: Fix parsing of QEMU stdout looking for
|
||||||
|
|
|
@ -1926,6 +1926,14 @@ remoteReadConfigFile (struct qemud_server *server, const char *filename)
|
||||||
GET_CONF_STR (conf, filename, tcp_port);
|
GET_CONF_STR (conf, filename, tcp_port);
|
||||||
GET_CONF_STR (conf, filename, listen_addr);
|
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)
|
if (remoteConfigGetAuth(conf, "auth_unix_rw", &auth_unix_rw, filename) < 0)
|
||||||
goto free_and_fail;
|
goto free_and_fail;
|
||||||
#if HAVE_POLKIT
|
#if HAVE_POLKIT
|
||||||
|
|
Loading…
Reference in New Issue