[systemd-commits] src/dbus.c src/manager.c
Lennart Poettering
lennart at kemper.freedesktop.org
Mon Mar 14 08:32:52 PDT 2011
src/dbus.c | 1 +
src/manager.c | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 6f79c579ec9c188173dde41395bbfb86c547fdd3
Author: Lennart Poettering <lennart at poettering.net>
Date: Mon Mar 14 16:15:31 2011 +0100
main: remove AF_UNIX sockets before binding
diff --git a/src/dbus.c b/src/dbus.c
index 31e776f..7afb0fb 100644
--- a/src/dbus.c
+++ b/src/dbus.c
@@ -955,6 +955,7 @@ static int bus_init_private(Manager *m) {
if (getpid() != 1)
return 0;
+ unlink("/dev/.run/systemd/private");
if (!(m->private_bus = dbus_server_listen("unix:path=/dev/.run/systemd/private", &error))) {
log_error("Failed to create private D-Bus server: %s", error.message);
r = -EIO;
diff --git a/src/manager.c b/src/manager.c
index 6ccb03f..1ab4c94 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -90,8 +90,10 @@ static int manager_setup_notify(Manager *m) {
if (getpid() != 1)
snprintf(sa.un.sun_path, sizeof(sa.un.sun_path), NOTIFY_SOCKET_USER "/%llu", random_ull());
- else
+ else {
+ unlink(NOTIFY_SOCKET_SYSTEM);
strncpy(sa.un.sun_path, NOTIFY_SOCKET_SYSTEM, sizeof(sa.un.sun_path));
+ }
if (sa.un.sun_path[0] == '@')
sa.un.sun_path[0] = 0;
More information about the systemd-commits
mailing list