exec: introduce PrivateDevices= switch to provide services with a private /dev
Similar to PrivateNetwork=, PrivateTmp= introduce PrivateDevices= that sets up a private /dev with only the API pseudo-devices like /dev/null, /dev/zero, /dev/random, but not any physical devices in them.
This commit is contained in:
@@ -894,6 +894,24 @@
|
||||
for details.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>PrivateDevices=</varname></term>
|
||||
|
||||
<listitem><para>Takes a boolean
|
||||
argument. If true, sets up a new /dev
|
||||
namespace for the executed processes
|
||||
and only adds API pseudo devices such
|
||||
as <filename>/dev/null</filename>,
|
||||
<filename>/dev/zero</filename> or
|
||||
<filename>/dev/random</filename> to
|
||||
it, but no physical devices such as
|
||||
<filename>/dev/sda</filename>. This is
|
||||
useful to securely turn off physical
|
||||
device access by the executed
|
||||
process. Defaults to
|
||||
false.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>MountFlags=</varname></term>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user