Add unix:dir=/something addresses
authorSimon McVittie <smcv@collabora.com>
Tue, 20 Jun 2017 13:37:04 +0000 (14:37 +0100)
committerSimon McVittie <smcv@collabora.com>
Thu, 29 Jun 2017 13:03:03 +0000 (14:03 +0100)
commitb951c5006cb8dcd1ec18d9466cbc5a087bc26776
treef24302800f9576956eb75d9ca8ecc61689452362
parent30d90f6de22a93719c7157383e14024e49db9f57
Add unix:dir=/something addresses

These are like unix:tmpdir=/something, except that the resulting
socket is always path-based, never abstract.

This is desirable for two reasons:

* If a Linux container manager wants to expose a path-based socket
  into the container, it can do so by bind-mounting it in the
  container's filesystem namespace. That cannot work for abstract
  sockets because they are not files.

* Conversely, if a Linux container manager does not want to expose
  a path-based socket in the container, it can avoid bind-mounting it,
  or bind-mount some harmless object like /dev/null over it.
  That cannot work for abstract sockets because access to abstract
  sockets is part of the network namespace, which is all-or-nothing.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101567
dbus/dbus-server-unix.c
doc/dbus-specification.xml