From 613b411c947635136637f8cdd66b94512f761eab Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 27 Nov 2013 20:23:18 +0100 Subject: service: add the ability for units to join other unit's PrivateNetwork= and PrivateTmp= namespaces --- man/systemd.exec.xml | 30 ++++++++++++++++++++++-------- man/systemd.unit.xml | 31 +++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 8 deletions(-) (limited to 'man') diff --git a/man/systemd.exec.xml b/man/systemd.exec.xml index 8c44071d53..207592dda7 100644 --- a/man/systemd.exec.xml +++ b/man/systemd.exec.xml @@ -846,9 +846,9 @@ system namespace for the executed processes and mounts private /tmp and - /var/tmp directories - inside it, that are not shared by - processes outside of the + /var/tmp + directories inside it, that are not + shared by processes outside of the namespace. This is useful to secure access to temporary files of the process, but makes sharing between @@ -856,9 +856,17 @@ /tmp or /var/tmp impossible. All temporary data created - by service will be removed after service - is stopped. Defaults to - false. + by service will be removed after + service is stopped. Defaults to + false. Note that it is possible to run + two or more units within the same + private /tmp and + /var/tmp + namespace by using the + JoinsNamespaceOf= + directive, see + systemd.unit5 + for details. @@ -874,8 +882,14 @@ available to the executed process. This is useful to securely turn off network access by the executed - process. Defaults to - false. + process. Defaults to false. Note that + it is possible to run two or more + units within the same private network + namespace by using the + JoinsNamespaceOf= + directive, see + systemd.unit5 + for details. diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml index 2c8bfbef70..4dc427c305 100644 --- a/man/systemd.unit.xml +++ b/man/systemd.unit.xml @@ -656,6 +656,37 @@ settings. + + JoinsNamespaceOf= + + For units that start + processes (such as service units), + lists one or more other units whose + network and/or temporary file + namespace to join. This only applies + to unit types which support the + PrivateNetwork= and + PrivateTmp= + directives (see + systemd.exec5 + for details). If a unit that has this + setting set is started its processes + will see the same + /tmp, + /tmp/var and + network namespace as one listed unit + that is started. If multiple listed + units are already started it is not + defined which namespace is + joined. Note that this setting only + has an effect if + PrivateNetwork= + and/or PrivateTmp= + is enabled for both the unit that + joins the namespace and the unit whose + namespace is joined. + + RequiresMountsFor= -- cgit v1.2.3-54-g00ecf