chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
swap: properly enter maintenance mode on failure
[elogind.git]
/
src
/
initctl.c
diff --git
a/src/initctl.c
b/src/initctl.c
index 7241acb8dfe59771c9d5c930eeb1aeaecbaccc2e..83a560a14a538e305d16bb8f45d85cc633fa98f4 100644
(file)
--- 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) {
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);
}
}
dbus_connection_unref(s->bus);
}
}
@@
-297,14
+297,10
@@
static int server_init(Server *s, unsigned n_sockets) {
s->n_fifos ++;
}
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;
}
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;
return 0;