diff options
author | Richard Phibel <rphibel@googlemail.com> | 2022-11-07 17:13:15 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2023-01-10 15:16:26 +0100 |
commit | cd48e23f6a33c9acb47a06b99d9bdc84ee42cebe (patch) | |
tree | 4c241fe4081efeb70aa6b33ff9a7613b2b0b2720 /man | |
parent | 81315baa68c9c8f7f6f5608fa8bc1daebf0618df (diff) | |
download | systemd-cd48e23f6a33c9acb47a06b99d9bdc84ee42cebe.tar.gz |
core: add OpenFile setting
Diffstat (limited to 'man')
-rw-r--r-- | man/org.freedesktop.systemd1.xml | 6 | ||||
-rw-r--r-- | man/systemd.service.xml | 31 |
2 files changed, 37 insertions, 0 deletions
diff --git a/man/org.freedesktop.systemd1.xml b/man/org.freedesktop.systemd1.xml index 32ead7f272..5154638c33 100644 --- a/man/org.freedesktop.systemd1.xml +++ b/man/org.freedesktop.systemd1.xml @@ -2576,6 +2576,8 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2eservice { readonly u NRestarts = ...; @org.freedesktop.DBus.Property.EmitsChangedSignal("const") readonly s OOMPolicy = '...'; + @org.freedesktop.DBus.Property.EmitsChangedSignal("const") + readonly a(sst) OpenFile = [...]; readonly t ExecMainStartTimestamp = ...; readonly t ExecMainStartTimestampMonotonic = ...; readonly t ExecMainExitTimestamp = ...; @@ -3173,6 +3175,8 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2eservice { <!--property OOMPolicy is not documented!--> + <!--property OpenFile is not documented!--> + <!--property ExecCondition is not documented!--> <!--property ExecConditionEx is not documented!--> @@ -3729,6 +3733,8 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2eservice { <variablelist class="dbus-property" generated="True" extra-ref="OOMPolicy"/> + <variablelist class="dbus-property" generated="True" extra-ref="OpenFile"/> + <variablelist class="dbus-property" generated="True" extra-ref="ExecMainStartTimestamp"/> <variablelist class="dbus-property" generated="True" extra-ref="ExecMainStartTimestampMonotonic"/> diff --git a/man/systemd.service.xml b/man/systemd.service.xml index 1c9e59f722..e327f688f4 100644 --- a/man/systemd.service.xml +++ b/man/systemd.service.xml @@ -1156,6 +1156,37 @@ kills, this setting determines the state of the unit after <command>systemd-oomd</command> kills a cgroup associated with it.</para></listitem> </varlistentry> + <varlistentry> + <term><varname>OpenFile=</varname></term> + <listitem><para>Takes an argument of the form <literal>path<optional><replaceable>:fd-name:options</replaceable></optional></literal>, + where: + <itemizedlist> + <listitem><simpara><literal>path</literal> is a path to a file or an <constant>AF_UNIX</constant> socket in the file system;</simpara></listitem> + <listitem><simpara><literal>fd-name</literal> is a name that will be associated with the file descriptor; + the name may contain any ASCII character, but must exclude control characters and ":", and must be at most 255 characters in length; + it is optional and, if not provided, defaults to the file name;</simpara></listitem> + <listitem><simpara><literal>options</literal> is a comma-separated list of access options; + possible values are + <literal>read-only</literal>, + <literal>append</literal>, + <literal>truncate</literal>, + <literal>graceful</literal>; + if not specified, files will be opened in <constant>rw</constant> mode; + if <literal>graceful</literal> is specified, errors during file/socket opening are ignored. + Specifying the same option several times is treated as an error.</simpara></listitem> + </itemizedlist> + The file or socket is opened by the service manager and the file descriptor is passed to the service. + If the path is a socket, we call <function>connect()</function> on it. + See <citerefentry><refentrytitle>sd_listen_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry> + for more details on how to retrieve these file descriptors.</para> + + <para>This setting is useful to allow services to access files/sockets that they can't access themselves + (due to running in a separate mount namespace, not having privileges, ...).</para> + + <para>This setting can be specified multiple times, in which case all the specified paths are opened and the file descriptors passed to the service. + If the empty string is assigned, the entire list of open files defined prior to this is reset.</para></listitem> + </varlistentry> + </variablelist> <para id='shared-unit-options'>Check |