From: Lennart Poettering Date: Thu, 19 Jul 2012 00:17:50 +0000 (+0200) Subject: manager: use a private notify sockets in containers to avoid problems with shared... X-Git-Tag: v187~17 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=31f92a7df427593532d221dd715e2e0a5b6f3a96;ds=sidebyside manager: use a private notify sockets in containers to avoid problems with shared abstract socket namespaces --- diff --git a/src/core/manager.c b/src/core/manager.c index 27dc9f38e..48305e373 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -96,7 +96,7 @@ static int manager_setup_notify(Manager *m) { zero(sa); sa.sa.sa_family = AF_UNIX; - if (getpid() != 1) + if (getpid() != 1 || detect_container(NULL) > 0) snprintf(sa.un.sun_path, sizeof(sa.un.sun_path), NOTIFY_SOCKET "/%llu", random_ull()); else strncpy(sa.un.sun_path, NOTIFY_SOCKET, sizeof(sa.un.sun_path));