summaryrefslogtreecommitdiff
path: root/src/initctl.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-07-11 02:22:46 +0200
committerLennart Poettering <lennart@poettering.net>2010-07-11 02:22:46 +0200
commitb574246b4f8e4eb86c29c38c7df47b541b68188a (patch)
treeb42d2c6f432a64abe2dd6b23a580026212644cb5 /src/initctl.c
parent7740296dcf581bbaaffa74f6f97a97d1def85e12 (diff)
dbus: use private connections wherever possible
Diffstat (limited to 'src/initctl.c')
-rw-r--r--src/initctl.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/initctl.c b/src/initctl.c
index 7241acb8df..83a560a14a 100644
--- a/src/initctl.c
+++ b/src/initctl.c
@@ -232,7 +232,7 @@ static void server_done(Server *s) {
close_nointr_nofail(s->epoll_fd);
if (s->bus) {
- dbus_connection_set_exit_on_disconnect(s->bus, FALSE);
+ dbus_connection_close(s->bus);
dbus_connection_unref(s->bus);
}
}
@@ -297,14 +297,10 @@ static int server_init(Server *s, unsigned n_sockets) {
s->n_fifos ++;
}
- if (!(s->bus = dbus_connection_open("unix:abstract=/org/freedesktop/systemd1/private", &error))) {
+ if (bus_connect(DBUS_BUS_SYSTEM, &s->bus, NULL, &error) < 0) {
log_error("Failed to get D-Bus connection: %s", error.message);
goto fail;
}
- if ((r = bus_check_peercred(s->bus)) < 0) {
- log_error("Bus connection failed peer credential check: %s", strerror(-r));
- goto fail;
- }
return 0;