chiark / gitweb /
sshd, tmux and others are broken when /dev/pts is mounted with "-o nodev"
[elogind.git] / src / initctl.c
index a18cf384a473121dcc9064423684ff5b1173ca74..83a560a14a538e305d16bb8f45d85cc633fa98f4 100644 (file)
@@ -41,6 +41,7 @@
 #include "initreq.h"
 #include "special.h"
 #include "sd-daemon.h"
+#include "dbus-common.h"
 
 #define SERVER_FD_MAX 16
 #define TIMEOUT ((int) (10*MSEC_PER_SEC))
@@ -231,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);
         }
 }
@@ -296,7 +297,7 @@ 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;
         }