diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-03-14 16:15:31 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-03-14 16:15:31 +0100 |
commit | 6f79c579ec9c188173dde41395bbfb86c547fdd3 (patch) | |
tree | 2fbb3d6b72ef0c1af0582b64624886c27d806b9a /src/manager.c | |
parent | f41de9596627ef68fcb4c0dae4b9bd8033701230 (diff) |
main: remove AF_UNIX sockets before binding
Diffstat (limited to 'src/manager.c')
-rw-r--r-- | src/manager.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/manager.c b/src/manager.c index 6ccb03fab4..1ab4c94eef 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; |