summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorLuca Boccassi <bluca@debian.org>2022-11-01 23:34:15 +0000
committerLuca Boccassi <luca.boccassi@gmail.com>2023-04-13 21:33:48 +0100
commit6ef721cbc7dadee4ae878ecf0076d87e57233908 (patch)
treed8593fb6923cba2c6bcc51027d8d5d7238557311 /man
parentce963a747fa53d4bd9d7e51d2230bf48fafd0d59 (diff)
downloadsystemd-6ef721cbc7dadee4ae878ecf0076d87e57233908.tar.gz
user units: implicitly enable PrivateUsers= when sandboxing options are set
Enabling these options when not running as root requires a user namespace, so implicitly enable PrivateUsers=. This has a side effect as it changes which users are visible to the unit. However until now these options did not work at all for user units, and in practice just a handful of user units in Fedora, Debian and Ubuntu mistakenly used them (and they have been all fixed since). This fixes the long-standing confusing issue that the user and system units take the same options but the behaviour is wildly (and sometimes silently) different depending on which is which, with user units requiring manually specifiying PrivateUsers= in order for sandboxing options to actually work and not be silently ignored.
Diffstat (limited to 'man')
-rw-r--r--man/system-or-user-ns.xml8
1 files changed, 6 insertions, 2 deletions
diff --git a/man/system-or-user-ns.xml b/man/system-or-user-ns.xml
index 7a302d5980..532c1ef64e 100644
--- a/man/system-or-user-ns.xml
+++ b/man/system-or-user-ns.xml
@@ -8,9 +8,13 @@
<refsect1>
<para id="singular">This option is only available for system services, or for services running in per-user
- instances of the service manager when <varname>PrivateUsers=</varname> is enabled.</para>
+ instances of the service manager in which case <varname>PrivateUsers=</varname> is implicitly enabled
+ (requires unprivileged user namespaces support to be enabled in the kernel via the
+ <literal>kernel.unprivileged_userns_clone=</literal> sysctl).</para>
<para id="plural">These options are only available for system services, or for services running in per-user
- instances of the service manager when <varname>PrivateUsers=</varname> is enabled.</para>
+ instances of the service manager in which case <varname>PrivateUsers=</varname> is implicitly enabled
+ (requires unprivileged user namespaces support to be enabled in the kernel via the
+ <literal>kernel.unprivileged_userns_clone=</literal> sysctl).</para>
</refsect1>