mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
* qemud/qemud.c: patch from Guido Günther fixing the place where
config file check is done. Daniel
This commit is contained in:
@@ -1912,6 +1912,14 @@ remoteReadConfigFile (struct qemud_server *server, const char *filename)
|
||||
char *unix_sock_rw_perms = NULL;
|
||||
char *unix_sock_group = NULL;
|
||||
|
||||
#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
|
||||
|
||||
/* Just check the file is readable before opening it, otherwise
|
||||
* libvirt emits an error.
|
||||
*/
|
||||
@@ -1926,14 +1934,6 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user