The policy kit and HAL node device drivers both require a

DBus connection. The HAL device code further requires that
the DBus connection is integrated with the event loop and
provides such glue logic itself.

The forthcoming FirewallD integration also requires a
dbus connection with event loop integration. Thus we need
to pull the current event loop glue out of the HAL driver.

Thus we create src/util/virdbus.{c,h} files. This contains
just one method virDBusGetSystemBus() which obtains a handle
to the single shared system bus instance, with event glue
automagically setup.
This commit is contained in:
Daniel P. Berrange
2012-04-19 15:34:35 +01:00
committed by Daniel Berrange
parent 7c26343bc3
commit 2223ea984c
15 changed files with 300 additions and 204 deletions

View File

@@ -812,7 +812,6 @@ int main(int argc, char **argv) {
struct daemonConfig *config;
bool privileged = geteuid() == 0 ? true : false;
bool implicit_conf = false;
bool use_polkit_dbus;
char *run_dir = NULL;
mode_t old_umask;
@@ -1008,8 +1007,6 @@ int main(int argc, char **argv) {
goto cleanup;
}
use_polkit_dbus = config->auth_unix_rw == REMOTE_AUTH_POLKIT ||
config->auth_unix_ro == REMOTE_AUTH_POLKIT;
if (!(srv = virNetServerNew(config->min_workers,
config->max_workers,
config->prio_workers,
@@ -1018,7 +1015,6 @@ int main(int argc, char **argv) {
config->keepalive_count,
!!config->keepalive_required,
config->mdns_adv ? config->mdns_name : NULL,
use_polkit_dbus,
remoteClientInitHook))) {
ret = VIR_DAEMON_ERR_INIT;
goto cleanup;