core: add new setting Writable= to ListenSpecial= socket units

Writable= is a new boolean setting. If ture, then ListenSpecial= will
open the specified path in O_RDWR mode, rather than just O_RDONLY.

This is useful for implementing services like rfkill, where /dev/rfkill
is more useful when opened in write mode, if we want to not only save
but also restore its state.
This commit is contained in:
Lennart Poettering
2015-10-01 14:28:13 +02:00
parent 7e9d36e06b
commit 55301ec028
5 changed files with 16 additions and 3 deletions
+8
View File
@@ -381,6 +381,14 @@
For SOCK_RAW the port is the IP protocol.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>Writable=</varname></term>
<listitem><para>Takes a boolean argument. May only be used in
conjunction with <varname>ListenSpecial=</varname>. If true,
the specified special file is opened in read-write mode, if
false in read-only mode. Defaults to false.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>MaxConnections=</varname></term>
<listitem><para>The maximum number of connections to