diff -Nru libconfig-model-systemd-perl-0.235.1/Build.PL libconfig-model-systemd-perl-0.236.1/Build.PL --- libconfig-model-systemd-perl-0.235.1/Build.PL 2017-10-14 19:05:04.000000000 +0000 +++ libconfig-model-systemd-perl-0.236.1/Build.PL 2018-01-03 14:01:19.000000000 +0000 @@ -1,7 +1,7 @@ # # This file is part of Config-Model-Systemd # -# This software is Copyright (c) 2015-2017 by Dominique Dumont. +# This software is Copyright (c) 2015-2018 by Dominique Dumont. # # This is free software, licensed under: # diff -Nru libconfig-model-systemd-perl-0.235.1/Changes libconfig-model-systemd-perl-0.236.1/Changes --- libconfig-model-systemd-perl-0.235.1/Changes 2017-10-14 19:05:04.000000000 +0000 +++ libconfig-model-systemd-perl-0.236.1/Changes 2018-01-03 14:01:19.000000000 +0000 @@ -1,3 +1,10 @@ +0.236.1 2018-01-03 + + Systemd model update: + * update from systemd 236 documentation + * parse-man: cope with new structure of systemd.exec + documentation + 0.235.1 2017-10-14 Systemd model update: diff -Nru libconfig-model-systemd-perl-0.235.1/contrib/parse-man.pl libconfig-model-systemd-perl-0.236.1/contrib/parse-man.pl --- libconfig-model-systemd-perl-0.235.1/contrib/parse-man.pl 2017-10-14 19:05:04.000000000 +0000 +++ libconfig-model-systemd-perl-0.236.1/contrib/parse-man.pl 2018-01-03 14:01:19.000000000 +0000 @@ -2,7 +2,7 @@ # # This file is part of Config-Model-Systemd # -# This software is Copyright (c) 2015-2017 by Dominique Dumont. +# This software is Copyright (c) 2015-2018 by Dominique Dumont. # # This is free software, licensed under: # @@ -52,6 +52,7 @@ my %data = ( element => [] ); my $config_class; my $file ; + my $subsystem; my $desc = sub ($t, $elt) { my $txt = $elt->text; @@ -113,7 +114,8 @@ my $varname = $term_elt->first_child('varname')->text; my ($name, $extra_info) = $varname =~ /C<([\w-]+)=([^>]*)>/ ; - die "Error: cannot extract parameter name from '$varname'" unless defined $name; + next unless defined $name; + say "- $config_class: storing parameter $name"; # we hope that deprecated items are listed in the same order with the new items push $data{element}->@*, [$config_class => $name => $desc => $extra_info => shift @supersedes ]; @@ -122,7 +124,7 @@ my $set_config_class = sub ($name) { $config_class = 'Systemd::'.( $map->{$name} || 'Section::'.ucfirst($name)); - say $file->basename(".xml").": Parsing class $config_class"; + say "Parsing class $config_class from " . $file->basename(".xml") . ':'; }; my $parse_sub_title = sub { @@ -150,11 +152,12 @@ # varname handling is done before the variable handling # below 'varname' => $turn_to_pod_c, - 'refsect1[string(title)=~ /Options/]/variablelist/varlistentry' => $variable, + 'refsect1/variablelist/varlistentry' => $variable, } ); - foreach my $subsystem ($list->@*) { + foreach my $_subsystem ($list->@*) { + $subsystem = $_subsystem; $file = $systemd_man_path->child("systemd.$subsystem.xml"); $set_config_class->($subsystem); $twig->parsefile($file); diff -Nru libconfig-model-systemd-perl-0.235.1/debian/changelog libconfig-model-systemd-perl-0.236.1/debian/changelog --- libconfig-model-systemd-perl-0.235.1/debian/changelog 2017-10-16 11:40:08.000000000 +0000 +++ libconfig-model-systemd-perl-0.236.1/debian/changelog 2018-01-10 18:01:03.000000000 +0000 @@ -1,3 +1,15 @@ +libconfig-model-systemd-perl (0.236.1-1) unstable; urgency=medium + + [ Damyan Ivanov ] + * declare conformance with Policy 4.1.2 (no changes needed) + + [ Dominique Dumont ] + * New upstream version 0.236.1 + * add support for systemd 236 + * update upstream copyright year (cme update) + + -- Dominique Dumont Wed, 10 Jan 2018 19:01:03 +0100 + libconfig-model-systemd-perl (0.235.1-1) unstable; urgency=medium * New upstream version 0.235.1 diff -Nru libconfig-model-systemd-perl-0.235.1/debian/control libconfig-model-systemd-perl-0.236.1/debian/control --- libconfig-model-systemd-perl-0.235.1/debian/control 2017-10-16 11:40:08.000000000 +0000 +++ libconfig-model-systemd-perl-0.236.1/debian/control 2018-01-10 18:01:03.000000000 +0000 @@ -12,7 +12,7 @@ liblog-log4perl-perl, libmouse-perl, libpath-tiny-perl (>= 0.086) -Standards-Version: 4.1.1 +Standards-Version: 4.1.2 Vcs-Browser: https://anonscm.debian.org/cgit/pkg-perl/packages/libconfig-model-systemd-perl.git Vcs-Git: https://anonscm.debian.org/git/pkg-perl/packages/libconfig-model-systemd-perl.git Homepage: https://metacpan.org/release/Config-Model-Systemd diff -Nru libconfig-model-systemd-perl-0.235.1/debian/copyright libconfig-model-systemd-perl-0.236.1/debian/copyright --- libconfig-model-systemd-perl-0.235.1/debian/copyright 2017-10-16 11:40:08.000000000 +0000 +++ libconfig-model-systemd-perl-0.236.1/debian/copyright 2018-01-10 18:01:03.000000000 +0000 @@ -8,11 +8,11 @@ License: LGPL-2.1 Files: contrib/* -Copyright: 2015-2017, Dominique Dumont. +Copyright: 2015-2018, Dominique Dumont. License: LGPL-2.1 Files: lib/* -Copyright: 2015-2017, Dominique Dumont. +Copyright: 2015-2018, Dominique Dumont. License: LGPL-2.1 Files: lib/Config/Model/models/Systemd.pod @@ -40,7 +40,7 @@ License: LGPL-2.1 Files: t/model_tests.d/* -Copyright: 2015-2017, Dominique Dumont. +Copyright: 2015-2018, Dominique Dumont. License: LGPL-2.1 License: LGPL-2.1 diff -Nru libconfig-model-systemd-perl-0.235.1/dist.ini libconfig-model-systemd-perl-0.236.1/dist.ini --- libconfig-model-systemd-perl-0.235.1/dist.ini 2017-10-14 19:05:04.000000000 +0000 +++ libconfig-model-systemd-perl-0.236.1/dist.ini 2018-01-03 14:01:19.000000000 +0000 @@ -2,7 +2,7 @@ author = Dominique Dumont license = LGPL_2_1 copyright_holder = Dominique Dumont -copyright_year = 2015-2017 +copyright_year = 2015-2018 [MetaResources] homepage = https://github.com/dod38fr/config-model/wiki diff -Nru libconfig-model-systemd-perl-0.235.1/lib/Config/Model/Backend/Systemd/Layers.pm libconfig-model-systemd-perl-0.236.1/lib/Config/Model/Backend/Systemd/Layers.pm --- libconfig-model-systemd-perl-0.235.1/lib/Config/Model/Backend/Systemd/Layers.pm 2017-10-14 19:05:04.000000000 +0000 +++ libconfig-model-systemd-perl-0.236.1/lib/Config/Model/Backend/Systemd/Layers.pm 2018-01-03 14:01:19.000000000 +0000 @@ -1,14 +1,14 @@ # # This file is part of Config-Model-Systemd # -# This software is Copyright (c) 2015-2017 by Dominique Dumont. +# This software is Copyright (c) 2015-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::Backend::Systemd::Layers; -$Config::Model::Backend::Systemd::Layers::VERSION = '0.235.1'; +$Config::Model::Backend::Systemd::Layers::VERSION = '0.236.1'; use Mouse::Role; @@ -57,7 +57,7 @@ =head1 VERSION -version 0.235.1 +version 0.236.1 =head1 SYNOPSIS @@ -83,7 +83,7 @@ =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2015-2017 by Dominique Dumont. +This software is Copyright (c) 2015-2018 by Dominique Dumont. This is free software, licensed under: diff -Nru libconfig-model-systemd-perl-0.235.1/lib/Config/Model/Backend/Systemd/Unit.pm libconfig-model-systemd-perl-0.236.1/lib/Config/Model/Backend/Systemd/Unit.pm --- libconfig-model-systemd-perl-0.235.1/lib/Config/Model/Backend/Systemd/Unit.pm 2017-10-14 19:05:04.000000000 +0000 +++ libconfig-model-systemd-perl-0.236.1/lib/Config/Model/Backend/Systemd/Unit.pm 2018-01-03 14:01:19.000000000 +0000 @@ -1,14 +1,14 @@ # # This file is part of Config-Model-Systemd # -# This software is Copyright (c) 2015-2017 by Dominique Dumont. +# This software is Copyright (c) 2015-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::Backend::Systemd::Unit ; -$Config::Model::Backend::Systemd::Unit::VERSION = '0.235.1'; +$Config::Model::Backend::Systemd::Unit::VERSION = '0.236.1'; use strict; use warnings; use 5.010; @@ -239,7 +239,7 @@ =head1 VERSION -version 0.235.1 +version 0.236.1 =head1 SYNOPSIS @@ -278,7 +278,7 @@ =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2015-2017 by Dominique Dumont. +This software is Copyright (c) 2015-2018 by Dominique Dumont. This is free software, licensed under: diff -Nru libconfig-model-systemd-perl-0.235.1/lib/Config/Model/Backend/Systemd.pm libconfig-model-systemd-perl-0.236.1/lib/Config/Model/Backend/Systemd.pm --- libconfig-model-systemd-perl-0.235.1/lib/Config/Model/Backend/Systemd.pm 2017-10-14 19:05:04.000000000 +0000 +++ libconfig-model-systemd-perl-0.236.1/lib/Config/Model/Backend/Systemd.pm 2018-01-03 14:01:19.000000000 +0000 @@ -1,14 +1,14 @@ # # This file is part of Config-Model-Systemd # -# This software is Copyright (c) 2015-2017 by Dominique Dumont. +# This software is Copyright (c) 2015-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::Backend::Systemd ; -$Config::Model::Backend::Systemd::VERSION = '0.235.1'; +$Config::Model::Backend::Systemd::VERSION = '0.236.1'; use strict; use warnings; use 5.010; @@ -233,7 +233,7 @@ =head1 VERSION -version 0.235.1 +version 0.236.1 =head1 SYNOPSIS @@ -272,7 +272,7 @@ =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2015-2017 by Dominique Dumont. +This software is Copyright (c) 2015-2018 by Dominique Dumont. This is free software, licensed under: diff -Nru libconfig-model-systemd-perl-0.235.1/lib/Config/Model/models/Systemd/Common/Exec.pl libconfig-model-systemd-perl-0.236.1/lib/Config/Model/models/Systemd/Common/Exec.pl --- libconfig-model-systemd-perl-0.235.1/lib/Config/Model/models/Systemd/Common/Exec.pl 2017-10-14 19:05:04.000000000 +0000 +++ libconfig-model-systemd-perl-0.236.1/lib/Config/Model/models/Systemd/Common/Exec.pl 2018-01-03 14:01:19.000000000 +0000 @@ -1,7 +1,7 @@ # # This file is part of Config-Model-Systemd # -# This software is Copyright (c) 2015-2017 by Dominique Dumont. +# This software is Copyright (c) 2015-2018 by Dominique Dumont. # # This is free software, licensed under: # @@ -17,24 +17,18 @@ 'warn' => 'Unknown parameter' } ], - 'class_description' => 'Unit configuration files for services, sockets, mount -points, and swap devices share a subset of configuration options -which define the execution environment of spawned -processes. - -This man page lists the configuration options shared by -these four unit types. See -L -for the common options of all unit configuration files, and + 'class_description' => 'Unit configuration files for services, sockets, mount points, and swap devices share a subset of +configuration options which define the execution environment of spawned processes. + +This man page lists the configuration options shared by these four unit types. See +L for the common +options of all unit configuration files, and L, L, -L, -and -L -for more information on the specific unit configuration files. The -execution specific configuration options are configured in the -[Service], [Socket], [Mount], or [Swap] sections, depending on the -unit type. +L, and +L for more +information on the specific unit configuration files. The execution specific configuration options are configured +in the [Service], [Socket], [Mount], or [Swap] sections, depending on the unit type. In addition, options which control resources through Linux Control Groups (cgroups) are listed in L. @@ -113,11 +107,65 @@ 'yes' ] }, + 'BindPaths', + { + 'cargo' => { + 'type' => 'leaf', + 'value_type' => 'uniline' + }, + 'description' => 'Configures unit-specific bind mounts. A bind mount makes a particular file or directory +available at an additional place in the unit\'s view of the file system. Any bind mounts created with this +option are specific to the unit, and are not visible in the host\'s mount table. This option expects a +whitespace separated list of bind mount definitions. Each definition consists of a colon-separated triple of +source path, destination path and option string, where the latter two are optional. If only a source path is +specified the source and destination is taken to be the same. The option string may be either +C or C for configuring a recursive or non-recursive bind +mount. If the destination path is omitted, the option string must be omitted too. + +C creates regular writable bind mounts (unless the source file system mount +is already marked read-only), while C creates read-only bind mounts. These +settings may be used more than once, each usage appends to the unit\'s list of bind mounts. If the empty string +is assigned to either of these two options the entire list of bind mounts defined prior to this is reset. Note +that in this case both read-only and regular bind mounts are reset, regardless which of the two settings is +used. + +This option is particularly useful when C/C +is used. In this case the source path refers to a path on the host file system, while the destination path +refers to a path below the root directory of the unit.', + 'type' => 'list' + }, + 'BindReadOnlyPaths', + { + 'cargo' => { + 'type' => 'leaf', + 'value_type' => 'uniline' + }, + 'description' => 'Configures unit-specific bind mounts. A bind mount makes a particular file or directory +available at an additional place in the unit\'s view of the file system. Any bind mounts created with this +option are specific to the unit, and are not visible in the host\'s mount table. This option expects a +whitespace separated list of bind mount definitions. Each definition consists of a colon-separated triple of +source path, destination path and option string, where the latter two are optional. If only a source path is +specified the source and destination is taken to be the same. The option string may be either +C or C for configuring a recursive or non-recursive bind +mount. If the destination path is omitted, the option string must be omitted too. + +C creates regular writable bind mounts (unless the source file system mount +is already marked read-only), while C creates read-only bind mounts. These +settings may be used more than once, each usage appends to the unit\'s list of bind mounts. If the empty string +is assigned to either of these two options the entire list of bind mounts defined prior to this is reset. Note +that in this case both read-only and regular bind mounts are reset, regardless which of the two settings is +used. + +This option is particularly useful when C/C +is used. In this case the source path refers to a path on the host file system, while the destination path +refers to a path below the root directory of the unit.', + 'type' => 'list' + }, 'User', { 'description' => "Set the UNIX user or group that the processes are executed as, respectively. Takes a single -user or group name, or a numeric ID as argument. For system services (services run by the system service manager, -i.e. managed by PID 1) and for user services of the root user (services managed by root's instance of +user or group name, or a numeric ID as argument. For system services (services run by the system service +manager, i.e. managed by PID 1) and for user services of the root user (services managed by root's instance of systemd --user), the default is C, but C may be used to specify a different user. For user services of any other user, switching user identity is not permitted, hence the only valid setting is the same user the user's service manager is running as. If no group @@ -144,8 +192,8 @@ 'Group', { 'description' => "Set the UNIX user or group that the processes are executed as, respectively. Takes a single -user or group name, or a numeric ID as argument. For system services (services run by the system service manager, -i.e. managed by PID 1) and for user services of the root user (services managed by root's instance of +user or group name, or a numeric ID as argument. For system services (services run by the system service +manager, i.e. managed by PID 1) and for user services of the root user (services managed by root's instance of systemd --user), the default is C, but C may be used to specify a different user. For user services of any other user, switching user identity is not permitted, hence the only valid setting is the same user the user's service manager is running as. If no group @@ -181,7 +229,10 @@ enabled for a unit, the name of the dynamic user/group is implicitly derived from the unit name. If the unit name without the type suffix qualifies as valid user name it is used directly, otherwise a name incorporating a hash of it is used. If a statically allocated user or group of the configured name already exists, it is used -and no dynamic user/group is allocated. Dynamic users/groups are allocated from the UID/GID range +and no dynamic user/group is allocated. Note that if C is specified and the static group +with the name exists, then it is required that the static user with the name already exists. Similarly, if +C is specified and the static user with the name exists, then it is required that the +static group with the name already exists. Dynamic users/groups are allocated from the UID/GID range 61184\x{2026}65519. It is recommended to avoid this range for regular system or login users. At any point in time each UID/GID from this range is only assigned to zero or one dynamically allocated users/groups in use. However, UID/GIDs are recycled after a unit is terminated. Care should be taken that any processes running @@ -215,723 +266,242 @@ 'type' => 'leaf', 'value_type' => 'uniline' }, - 'description' => 'Sets the supplementary Unix groups the -processes are executed as. This takes a space-separated list -of group names or IDs. This option may be specified more than -once, in which case all listed groups are set as supplementary -groups. When the empty string is assigned, the list of -supplementary groups is reset, and all assignments prior to -this one will have no effect. In any way, this option does not -override, but extends the list of supplementary groups -configured in the system group database for the -user. This does not affect commands prefixed with C<+>.', + 'description' => 'Sets the supplementary Unix groups the processes are executed as. This takes a space-separated +list of group names or IDs. This option may be specified more than once, in which case all listed groups are +set as supplementary groups. When the empty string is assigned, the list of supplementary groups is reset, and +all assignments prior to this one will have no effect. In any way, this option does not override, but extends +the list of supplementary groups configured in the system group database for the user. This does not affect +commands prefixed with C<+>.', 'type' => 'list' }, - 'RemoveIPC', + 'PAMName', { - 'description' => 'Takes a boolean parameter. If set, all System V and POSIX IPC objects owned by the user and -group the processes of this unit are run as are removed when the unit is stopped. This setting only has an -effect if at least one of C, C and -C are used. It has no effect on IPC objects owned by the root user. Specifically, -this removes System V semaphores, as well as System V and POSIX shared memory segments and message queues. If -multiple units use the same user or group the IPC objects are removed when the last of these units is -stopped. This setting is implied if C is set.', + 'description' => 'Sets the PAM service name to set up a session as. If set, the executed process will be +registered as a PAM session under the specified service name. This is only useful in conjunction with the +C setting, and is otherwise ignored. If not set, no PAM session will be opened for the +executed processes. See L for +details. + +Note that for each unit making use of this option a PAM session handler process will be maintained as +part of the unit and stays around as long as the unit is active, to ensure that appropriate actions can be +taken when the unit and hence the PAM session terminates. This process is named C<(sd-pam)> and +is an immediate child process of the unit\'s main process. + +Note that when this option is used for a unit it is very likely (depending on PAM configuration) that the +main unit process will be migrated to its own session scope unit when it is activated. This process will hence +be associated with two units: the unit it was originally started from (and for which +C was configured), and the session scope unit. Any child processes of that process +will however be associated with the session scope unit only. This has implications when used in combination +with CC, as these child processes will not be able to affect +changes in the original unit through notification messages. These messages will be considered belonging to the +session scope unit and not the original unit. It is hence not recommended to use C in +combination with CC.', 'type' => 'leaf', - 'value_type' => 'boolean', - 'write_as' => [ - 'no', - 'yes' - ] + 'value_type' => 'uniline' }, - 'Nice', + 'CapabilityBoundingSet', { - 'description' => 'Sets the default nice level (scheduling -priority) for executed processes. Takes an integer between -20 -(highest priority) and 19 (lowest priority). See -L -for details.', - 'max' => '19', - 'min' => '-20', + 'description' => 'Controls which capabilities to include in the capability bounding set for the executed +process. See L for +details. Takes a whitespace-separated list of capability names, e.g. C, +C, C. Capabilities listed will be +included in the bounding set, all others are removed. If the list of capabilities is prefixed with +C<~>, all but the listed capabilities will be included, the effect of the assignment +inverted. Note that this option also affects the respective capabilities in the effective, permitted and +inheritable capability sets. If this option is not used, the capability bounding set is not modified on process +execution, hence no limits on the capabilities of the process are enforced. This option may appear more than +once, in which case the bounding sets are merged by C, or by C if +the lines are prefixed with C<~> (see below). If the empty string is assigned to this option, +the bounding set is reset to the empty capability set, and all prior settings have no effect. If set to +C<~> (without any further argument), the bounding set is reset to the full set of available +capabilities, also undoing any previous settings. This does not affect commands prefixed with +C<+>. + +Example: if a unit has the following, + + CapabilityBoundingSet=CAP_A CAP_B + CapabilityBoundingSet=CAP_B CAP_C + +then C, C, and C are set. +If the second line is prefixed with C<~>, e.g., + + CapabilityBoundingSet=CAP_A CAP_B + CapabilityBoundingSet=~CAP_B CAP_C + +then, only C is set.', 'type' => 'leaf', - 'value_type' => 'integer' + 'value_type' => 'uniline' }, - 'OOMScoreAdjust', + 'AmbientCapabilities', { - 'description' => 'Sets the adjustment level for the -Out-Of-Memory killer for executed processes. Takes an integer -between -1000 (to disable OOM killing for this process) and -1000 (to make killing of this process under memory pressure -very likely). See proc.txt -for details.', - 'max' => '1000', - 'min' => '-1000', + 'description' => 'Controls which capabilities to include in the ambient capability set for the executed +process. Takes a whitespace-separated list of capability names, e.g. C, +C, C. This option may appear more than +once in which case the ambient capability sets are merged (see the above examples in +C). If the list of capabilities is prefixed with C<~>, +all but the listed capabilities will be included, the effect of the assignment inverted. If the empty string is +assigned to this option, the ambient capability set is reset to the empty capability set, and all prior +settings have no effect. If set to C<~> (without any further argument), the ambient capability +set is reset to the full set of available capabilities, also undoing any previous settings. Note that adding +capabilities to ambient capability set adds them to the process\'s inherited capability set. + +Ambient capability sets are useful if you want to execute a process as a non-privileged user but still want to +give it some capabilities. Note that in this case option C is automatically added +to C to retain the capabilities over the user +change. C does not affect commands prefixed with +C<+>.', 'type' => 'leaf', - 'value_type' => 'integer' + 'value_type' => 'uniline' }, - 'IOSchedulingClass', + 'NoNewPrivileges', { - 'choice' => [ - '0', - '1', - '2', - '3', - 'none', - 'realtime', - 'best-effort', - 'idle' - ], - 'description' => 'Sets the I/O scheduling class for executed -processes. Takes an integer between 0 and 3 or one of the -strings C, C, -C or C. See -L -for details.', + 'description' => 'Takes a boolean argument. If true, ensures that the service process and all its children can +never gain new privileges through execve() (e.g. via setuid or setgid bits, or filesystem +capabilities). This is the simplest and most effective way to ensure that a process and its children can never +elevate privileges again. Defaults to false, but certain settings force C, +ignoring the value of this setting. This is the case when C, +C, C, +C, C, +C, C, +C, or C are specified. Also see +No New Privileges +Flag. ', 'type' => 'leaf', - 'value_type' => 'enum' + 'value_type' => 'boolean', + 'write_as' => [ + 'no', + 'yes' + ] }, - 'IOSchedulingPriority', + 'SecureBits', { - 'description' => 'Sets the I/O scheduling priority for executed -processes. Takes an integer between 0 (highest priority) and 7 -(lowest priority). The available priorities depend on the -selected I/O scheduling class (see above). See -L -for details.', - 'max' => '7', - 'min' => '0', + 'description' => 'Controls the secure bits set for the executed process. Takes a space-separated combination of +options from the following list: C, C, +C, C, C, and +C. This option may appear more than once, in which case the secure bits are +ORed. If the empty string is assigned to this option, the bits are reset to 0. This does not affect commands +prefixed with C<+>. See L for +details.', 'type' => 'leaf', - 'value_type' => 'integer' + 'value_type' => 'uniline' }, - 'CPUSchedulingPolicy', + 'SELinuxContext', { - 'choice' => [ - 'other', - 'batch', - 'idle', - 'fifo', - 'rr' - ], - 'description' => 'Sets the CPU scheduling policy for executed -processes. Takes one of -C, -C, -C, -C or -C. See -L -for details.', + 'description' => 'Set the SELinux security context of the executed process. If set, this will override the +automated domain transition. However, the policy still needs to authorize the transition. This directive is +ignored if SELinux is disabled. If prefixed by C<->, all errors will be ignored. This does not +affect commands prefixed with C<+>. See L for +details.', 'type' => 'leaf', - 'value_type' => 'enum' + 'value_type' => 'uniline' }, - 'CPUSchedulingPriority', + 'AppArmorProfile', { - 'description' => 'Sets the CPU scheduling priority for executed -processes. The available priority range depends on the -selected CPU scheduling policy (see above). For real-time -scheduling policies an integer between 1 (lowest priority) and -99 (highest priority) can be used. See -L -for details. ', + 'description' => 'Takes a profile name as argument. The process executed by the unit will switch to this profile +when started. Profiles must already be loaded in the kernel, or the unit will fail. This result in a non +operation if AppArmor is not enabled. If prefixed by C<->, all errors will be ignored. This +does not affect commands prefixed with C<+>.', 'type' => 'leaf', 'value_type' => 'uniline' }, - 'CPUSchedulingResetOnFork', + 'SmackProcessLabel', { - 'description' => 'Takes a boolean argument. If true, elevated -CPU scheduling priorities and policies will be reset when the -executed processes fork, and can hence not leak into child -processes. See -L -for details. Defaults to false.', + 'description' => 'Takes a C security label as argument. The process executed by the unit +will be started under this label and SMACK will decide whether the process is allowed to run or not, based on +it. The process will continue to run under the label specified here unless the executable has its own +C label, in which case the process will transition to run under that label. When not +specified, the label that systemd is running under is used. This directive is ignored if SMACK is +disabled. + +The value may be prefixed by C<->, in which case all errors will be ignored. An empty +value may be specified to unset previous assignments. This does not affect commands prefixed with +C<+>.', 'type' => 'leaf', - 'value_type' => 'boolean', - 'write_as' => [ - 'no', - 'yes' - ] - }, - 'CPUAffinity', - { - 'cargo' => { - 'type' => 'leaf', - 'value_type' => 'uniline' - }, - 'description' => 'Controls the CPU affinity of the executed -processes. Takes a list of CPU indices or ranges separated by -either whitespace or commas. CPU ranges are specified by the -lower and upper CPU indices separated by a dash. -This option may be specified more than once, in which case the -specified CPU affinity masks are merged. If the empty string -is assigned, the mask is reset, all assignments prior to this -will have no effect. See -L -for details.', - 'type' => 'list' + 'value_type' => 'uniline' }, - 'UMask', + 'LimitCPU', { - 'description' => 'Controls the file mode creation mask. Takes an -access mode in octal notation. See -L -for details. Defaults to 0022.', + 'description' => "Set soft and hard limits on various resources for executed processes. See +L for details on +the resource limit concept. Resource limits may be specified in two formats: either as single value to set a +specific soft and hard limit to the same value, or as colon-separated pair C to set +both limits individually (e.g. C). Use the string C to +configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base 1024) +may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time values, +the usual time units ms, s, min, h and so on may be used (see +L for +details). Note that if no time unit is specified for C the default unit of seconds +is implied, while for C the default unit of microseconds is implied. Also, note +that the effective granularity of the limits might influence their enforcement. For example, time limits +specified for C will be rounded up implicitly to multiples of 1s. For +C the value may be specified in two syntaxes: if prefixed with C<+> +or C<->, the value is understood as regular Linux nice value in the range -20..19. If not +prefixed like this the value is understood as raw resource limit parameter in the range 0..40 (with 0 being +equivalent to 1). + +Note that most process resource limits configured with these options are per-process, and processes may +fork in order to acquire a new set of resources that are accounted independently of the original process, and +may thus escape limits set. Also note that C is not implemented on Linux, and +setting it has no effect. Often it is advisable to prefer the resource controls listed in +L +over these per-process limits, as they apply to services as a whole, may be altered dynamically at runtime, and +are generally more expressive. For example, C is a more powerful (and working) +replacement for C. + +For system units these resource limits may be chosen freely. For user units however (i.e. units run by a +per-user instance of +L), these limits are +bound by (possibly more restrictive) per-user limits enforced by the OS. + +Resource limits not configured explicitly for a unit default to the value configured in the various +C, C, \x{2026} options available in +L, and \x{2013} +if not configured there \x{2013} the kernel or per-user defaults, as defined by the OS (the latter only for user +services, see above).", 'type' => 'leaf', 'value_type' => 'uniline' }, - 'Environment', + 'LimitFSIZE', { - 'cargo' => { - 'type' => 'leaf', - 'value_type' => 'uniline' - }, - 'description' => 'Sets environment variables for executed -processes. Takes a space-separated list of variable -assignments. This option may be specified more than once, in -which case all listed variables will be set. If the same -variable is set twice, the later setting will override the -earlier setting. If the empty string is assigned to this -option, the list of environment variables is reset, all prior -assignments have no effect. Variable expansion is not -performed inside the strings, however, specifier expansion is -possible. The $ character has no special meaning. If you need -to assign a value containing spaces or the equals sign to a variable, use double -quotes (") for the assignment. - -Example: + 'description' => "Set soft and hard limits on various resources for executed processes. See +L for details on +the resource limit concept. Resource limits may be specified in two formats: either as single value to set a +specific soft and hard limit to the same value, or as colon-separated pair C to set +both limits individually (e.g. C). Use the string C to +configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base 1024) +may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time values, +the usual time units ms, s, min, h and so on may be used (see +L for +details). Note that if no time unit is specified for C the default unit of seconds +is implied, while for C the default unit of microseconds is implied. Also, note +that the effective granularity of the limits might influence their enforcement. For example, time limits +specified for C will be rounded up implicitly to multiples of 1s. For +C the value may be specified in two syntaxes: if prefixed with C<+> +or C<->, the value is understood as regular Linux nice value in the range -20..19. If not +prefixed like this the value is understood as raw resource limit parameter in the range 0..40 (with 0 being +equivalent to 1). - Environment="VAR1=word1 word2" VAR2=word3 "VAR3=$word 5 6" +Note that most process resource limits configured with these options are per-process, and processes may +fork in order to acquire a new set of resources that are accounted independently of the original process, and +may thus escape limits set. Also note that C is not implemented on Linux, and +setting it has no effect. Often it is advisable to prefer the resource controls listed in +L +over these per-process limits, as they apply to services as a whole, may be altered dynamically at runtime, and +are generally more expressive. For example, C is a more powerful (and working) +replacement for C. -gives three variables C, -C, C -with the values C, -C, C<$word 5 6>. +For system units these resource limits may be chosen freely. For user units however (i.e. units run by a +per-user instance of +L), these limits are +bound by (possibly more restrictive) per-user limits enforced by the OS. -See -L -for details about environment variables.', - 'type' => 'list' - }, - 'EnvironmentFile', - { - 'cargo' => { - 'type' => 'leaf', - 'value_type' => 'uniline' - }, - 'description' => 'Similar to C but -reads the environment variables from a text file. The text -file should contain new-line-separated variable assignments. -Empty lines, lines without an C<=> separator, -or lines starting with ; or # will be ignored, -which may be used for commenting. A line ending with a -backslash will be concatenated with the following one, -allowing multiline variable definitions. The parser strips -leading and trailing whitespace from the values of -assignments, unless you use double quotes ("). - -The argument passed should be an absolute filename or -wildcard expression, optionally prefixed with -C<->, which indicates that if the file does -not exist, it will not be read and no error or warning message -is logged. This option may be specified more than once in -which case all specified files are read. If the empty string -is assigned to this option, the list of file to read is reset, -all prior assignments have no effect. - -The files listed with this directive will be read -shortly before the process is executed (more specifically, -after all processes from a previous unit state terminated. -This means you can generate these files in one unit state, and -read it with this option in the next). - -Settings from these -files override settings made with -C. If the same variable is set -twice from these files, the files will be read in the order -they are specified and the later setting will override the -earlier setting.', - 'type' => 'list' - }, - 'PassEnvironment', - { - 'cargo' => { - 'type' => 'leaf', - 'value_type' => 'uniline' - }, - 'description' => 'Pass environment variables set for the system service manager to executed processes. Takes a -space-separated list of variable names. This option may be specified more than once, in which case all listed -variables will be passed. If the empty string is assigned to this option, the list of environment variables to -pass is reset, all prior assignments have no effect. Variables specified that are not set for the system -manager will not be passed and will be silently ignored. Note that this option is only relevant for the system -service manager, as system services by default do not automatically inherit any environment variables set for -the service manager itself. However, in case of the user service manager all environment variables are passed -to the executed processes anyway, hence this option is without effect for the user service manager. - -Variables set for invoked processes due to this setting are subject to being overridden by those -configured with C or C. - -Example: - - PassEnvironment=VAR1 VAR2 VAR3 - -passes three variables C, -C, C -with the values set for those variables in PID1. - -See -L -for details about environment variables.', - 'type' => 'list' - }, - 'UnsetEnvironment', - { - 'cargo' => { - 'type' => 'leaf', - 'value_type' => 'uniline' - }, - 'description' => 'Explicitly unset environment variable assignments that would normally be passed from the -service manager to invoked processes of this unit. Takes a space-separated list of variable names or variable -assignments. This option may be specified more than once, in which case all listed variables/assignments will -be unset. If the empty string is assigned to this option, the list of environment variables/assignments to -unset is reset. If a variable assignment is specified (that is: a variable name, followed by -C<=>, followed by its value), then any environment variable matching this precise assignment is -removed. If a variable name is specified (that is a variable name without any following C<=> or -value), then any assignment matching the variable name, regardless of its value is removed. Note that the -effect of C is applied as final step when the environment list passed to -executed processes is compiled. That means it may undo assignments from any configuration source, including -assignments made through C or C, inherited from -the system manager\'s global set of environment variables, inherited via C, -set by the service manager itself (such as C<$NOTIFY_SOCKET> and such), or set by a PAM module -(in case C is used). - -See -L -for details about environment variables.', - 'type' => 'list' - }, - 'StandardInput', - { - 'choice' => [ - 'null', - 'tty', - 'tty-force', - 'tty-fail', - 'socket', - 'fd' - ], - 'description' => 'Controls where file descriptor 0 (STDIN) of -the executed processes is connected to. Takes one of -C, -C, -C, -C, -C or -C. - -If C is selected, standard input -will be connected to /dev/null, i.e. all -read attempts by the process will result in immediate -EOF. - -If C is selected, standard input is -connected to a TTY (as configured by -C, see below) and the executed -process becomes the controlling process of the terminal. If -the terminal is already being controlled by another process, -the executed process waits until the current controlling -process releases the terminal. - -C is similar to -C, but the executed process is forcefully -and immediately made the controlling process of the terminal, -potentially removing previous controlling processes from the -terminal. - -C is similar to -C but if the terminal already has a -controlling process start-up of the executed process -fails. - -The C option is only valid in -socket-activated services, and only when the socket -configuration file (see -L -for details) specifies a single socket only. If this option is -set, standard input will be connected to the socket the -service was activated from, which is primarily useful for -compatibility with daemons designed for use with the -traditional -L -daemon. - -The C option connects -the input stream to a single file descriptor provided by a socket unit. -A custom named file descriptor can be specified as part of this option, -after a C<:> (e.g. C). -If no name is specified, C is assumed -(i.e. C is equivalent to C). -At least one socket unit defining such name must be explicitly provided via the -C option, and file descriptor name may differ -from the name of its containing socket unit. -If multiple matches are found, the first one will be used. -See C in -L -for more details about named descriptors and ordering. - -This setting defaults to -C.', - 'type' => 'leaf', - 'value_type' => 'enum' - }, - 'StandardOutput', - { - 'choice' => [ - 'inherit', - 'null', - 'tty', - 'journal', - 'syslog', - 'kmsg', - 'journal+console', - 'syslog+console', - 'kmsg+console', - 'socket', - 'fd' - ], - 'description' => 'Controls where file descriptor 1 (STDOUT) of -the executed processes is connected to. Takes one of -C, -C, -C, -C, -C, -C, -C, -C, -C, -C or -C. - -C duplicates the file descriptor -of standard input for standard output. - -C connects standard output to -/dev/null, i.e. everything written to it -will be lost. - -C connects standard output to a tty -(as configured via C, see below). If -the TTY is used for output only, the executed process will not -become the controlling process of the terminal, and will not -fail or wait for other processes to release the -terminal. - -C connects standard output with -the journal which is accessible via -L. -Note that everything that is written to syslog or kmsg (see -below) is implicitly stored in the journal as well, the -specific two options listed below are hence supersets of this -one. - -C connects standard output to the -L -system syslog service, in addition to the journal. Note that -the journal daemon is usually configured to forward everything -it receives to syslog anyway, in which case this option is no -different from C. - -C connects standard output with the -kernel log buffer which is accessible via -L, -in addition to the journal. The journal daemon might be -configured to send all logs to kmsg anyway, in which case this -option is no different from C. - -C, -C and -C work in a similar way as the -three options above but copy the output to the system console -as well. - -C connects standard output to a -socket acquired via socket activation. The semantics are -similar to the same option of -C. - -The C option connects -the output stream to a single file descriptor provided by a socket unit. -A custom named file descriptor can be specified as part of this option, -after a C<:> (e.g. C). -If no name is specified, C is assumed -(i.e. C is equivalent to C). -At least one socket unit defining such name must be explicitly provided via the -C option, and file descriptor name may differ -from the name of its containing socket unit. -If multiple matches are found, the first one will be used. -See C in -L -for more details about named descriptors and ordering. - -If the standard output (or error output, see below) of a unit is connected to the journal, syslog or the -kernel log buffer, the unit will implicitly gain a dependency of type C on -systemd-journald.socket (also see the "Implicit Dependencies" section above). - -This setting defaults to the value set with -C in -L, -which defaults to C. Note that setting -this parameter might result in additional dependencies to be -added to the unit (see above).', - 'type' => 'leaf', - 'value_type' => 'enum' - }, - 'StandardError', - { - 'description' => 'Controls where file descriptor 2 (STDERR) of -the executed processes is connected to. The available options -are identical to those of C, -with some exceptions: if set to C the -file descriptor used for standard output is duplicated for -standard error, while C operates on the error -stream and will look by default for a descriptor named -C. - -This setting defaults to the value set with -C in -L, -which defaults to C. Note that setting -this parameter might result in additional dependencies to be -added to the unit (see above).', - 'type' => 'leaf', - 'value_type' => 'uniline' - }, - 'TTYPath', - { - 'description' => 'Sets the terminal device node to use if -standard input, output, or error are connected to a TTY (see -above). Defaults to -/dev/console.', - 'type' => 'leaf', - 'value_type' => 'uniline' - }, - 'TTYReset', - { - 'description' => 'Reset the terminal device specified with -C before and after execution. -Defaults to C.', - 'type' => 'leaf', - 'value_type' => 'uniline' - }, - 'TTYVHangup', - { - 'description' => 'Disconnect all clients which have opened the -terminal device specified with C -before and after execution. Defaults to -C.', - 'type' => 'leaf', - 'value_type' => 'uniline' - }, - 'TTYVTDisallocate', - { - 'description' => 'If the terminal device specified with -C is a virtual console terminal, try -to deallocate the TTY before and after execution. This ensures -that the screen and scrollback buffer is cleared. Defaults to -C.', - 'type' => 'leaf', - 'value_type' => 'uniline' - }, - 'SyslogIdentifier', - { - 'description' => 'Sets the process name to prefix log lines sent -to the logging system or the kernel log buffer with. If not -set, defaults to the process name of the executed process. -This option is only useful when -C or -C are set to -C, C or -C (or to the same settings in combination -with C<+console>).', - 'type' => 'leaf', - 'value_type' => 'uniline' - }, - 'SyslogFacility', - { - 'description' => 'Sets the syslog facility to use when logging -to syslog. One of C, -C, C, -C, C, -C, C, -C, C, -C, C, -C, C, -C, C, -C, C, -C, C or -C. See -L -for details. This option is only useful when -C or -C are set to -C. Defaults to -C.', - 'type' => 'leaf', - 'value_type' => 'uniline' - }, - 'SyslogLevel', - { - 'description' => 'The default syslog level to use when logging to -syslog or the kernel log buffer. One of -C, -C, -C, -C, -C, -C, -C, -C. See -L -for details. This option is only useful when -C or -C are set to -C or C. Note that -individual lines output by the daemon might be prefixed with a -different log level which can be used to override the default -log level specified here. The interpretation of these prefixes -may be disabled with C, -see below. For details, see -L. -Defaults to -C.', - 'type' => 'leaf', - 'value_type' => 'uniline' - }, - 'SyslogLevelPrefix', - { - 'description' => 'Takes a boolean argument. If true and -C or -C are set to -C, C or -C, log lines written by the executed -process that are prefixed with a log level will be passed on -to syslog with this log level set but the prefix removed. If -set to false, the interpretation of these prefixes is disabled -and the logged lines are passed on as-is. For details about -this prefixing see -L. -Defaults to true.', - 'type' => 'leaf', - 'value_type' => 'boolean', - 'write_as' => [ - 'no', - 'yes' - ] - }, - 'TimerSlackNSec', - { - 'description' => 'Sets the timer slack in nanoseconds for the -executed processes. The timer slack controls the accuracy of -wake-ups triggered by timers. See -L -for more information. Note that in contrast to most other time -span definitions this parameter takes an integer value in -nano-seconds if no unit is specified. The usual time units are -understood too.', - 'type' => 'leaf', - 'value_type' => 'uniline' - }, - 'LimitCPU', - { - 'description' => "Set soft and hard limits on various resources for executed processes. See -L for details on -the resource limit concept. Resource limits may be specified in two formats: either as single value to set a -specific soft and hard limit to the same value, or as colon-separated pair C to set -both limits individually (e.g. C). Use the string C -to configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base -1024) may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time -values, the usual time units ms, s, min, h and so on may be used (see -L for -details). Note that if no time unit is specified for C the default unit of seconds -is implied, while for C the default unit of microseconds is implied. Also, note -that the effective granularity of the limits might influence their enforcement. For example, time limits -specified for C will be rounded up implicitly to multiples of 1s. For -C the value may be specified in two syntaxes: if prefixed with C<+> -or C<->, the value is understood as regular Linux nice value in the range -20..19. If not -prefixed like this the value is understood as raw resource limit parameter in the range 0..40 (with 0 being -equivalent to 1). - -Note that most process resource limits configured with -these options are per-process, and processes may fork in order -to acquire a new set of resources that are accounted -independently of the original process, and may thus escape -limits set. Also note that C is not -implemented on Linux, and setting it has no effect. Often it -is advisable to prefer the resource controls listed in -L -over these per-process limits, as they apply to services as a -whole, may be altered dynamically at runtime, and are -generally more expressive. For example, -C is a more powerful (and -working) replacement for C. - -For system units these resource limits may be chosen freely. For user units however (i.e. units run by a -per-user instance of -L), these limits are -bound by (possibly more restrictive) per-user limits enforced by the OS. - -Resource limits not configured explicitly for a unit default to the value configured in the various -C, C, \x{2026} options available in -L, and \x{2013} -if not configured there \x{2013} the kernel or per-user defaults, as defined by the OS (the latter only for user -services, see above).", - 'type' => 'leaf', - 'value_type' => 'uniline' - }, - 'LimitFSIZE', - { - 'description' => "Set soft and hard limits on various resources for executed processes. See -L for details on -the resource limit concept. Resource limits may be specified in two formats: either as single value to set a -specific soft and hard limit to the same value, or as colon-separated pair C to set -both limits individually (e.g. C). Use the string C -to configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base -1024) may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time -values, the usual time units ms, s, min, h and so on may be used (see -L for -details). Note that if no time unit is specified for C the default unit of seconds -is implied, while for C the default unit of microseconds is implied. Also, note -that the effective granularity of the limits might influence their enforcement. For example, time limits -specified for C will be rounded up implicitly to multiples of 1s. For -C the value may be specified in two syntaxes: if prefixed with C<+> -or C<->, the value is understood as regular Linux nice value in the range -20..19. If not -prefixed like this the value is understood as raw resource limit parameter in the range 0..40 (with 0 being -equivalent to 1). - -Note that most process resource limits configured with -these options are per-process, and processes may fork in order -to acquire a new set of resources that are accounted -independently of the original process, and may thus escape -limits set. Also note that C is not -implemented on Linux, and setting it has no effect. Often it -is advisable to prefer the resource controls listed in -L -over these per-process limits, as they apply to services as a -whole, may be altered dynamically at runtime, and are -generally more expressive. For example, -C is a more powerful (and -working) replacement for C. - -For system units these resource limits may be chosen freely. For user units however (i.e. units run by a -per-user instance of -L), these limits are -bound by (possibly more restrictive) per-user limits enforced by the OS. - -Resource limits not configured explicitly for a unit default to the value configured in the various -C, C, \x{2026} options available in -L, and \x{2013} -if not configured there \x{2013} the kernel or per-user defaults, as defined by the OS (the latter only for user -services, see above).", - 'type' => 'leaf', - 'value_type' => 'uniline' +Resource limits not configured explicitly for a unit default to the value configured in the various +C, C, \x{2026} options available in +L, and \x{2013} +if not configured there \x{2013} the kernel or per-user defaults, as defined by the OS (the latter only for user +services, see above).", + 'type' => 'leaf', + 'value_type' => 'uniline' }, 'LimitDATA', { @@ -939,10 +509,10 @@ L for details on the resource limit concept. Resource limits may be specified in two formats: either as single value to set a specific soft and hard limit to the same value, or as colon-separated pair C to set -both limits individually (e.g. C). Use the string C -to configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base -1024) may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time -values, the usual time units ms, s, min, h and so on may be used (see +both limits individually (e.g. C). Use the string C to +configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base 1024) +may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time values, +the usual time units ms, s, min, h and so on may be used (see L for details). Note that if no time unit is specified for C the default unit of seconds is implied, while for C the default unit of microseconds is implied. Also, note @@ -953,19 +523,14 @@ prefixed like this the value is understood as raw resource limit parameter in the range 0..40 (with 0 being equivalent to 1). -Note that most process resource limits configured with -these options are per-process, and processes may fork in order -to acquire a new set of resources that are accounted -independently of the original process, and may thus escape -limits set. Also note that C is not -implemented on Linux, and setting it has no effect. Often it -is advisable to prefer the resource controls listed in +Note that most process resource limits configured with these options are per-process, and processes may +fork in order to acquire a new set of resources that are accounted independently of the original process, and +may thus escape limits set. Also note that C is not implemented on Linux, and +setting it has no effect. Often it is advisable to prefer the resource controls listed in L -over these per-process limits, as they apply to services as a -whole, may be altered dynamically at runtime, and are -generally more expressive. For example, -C is a more powerful (and -working) replacement for C. +over these per-process limits, as they apply to services as a whole, may be altered dynamically at runtime, and +are generally more expressive. For example, C is a more powerful (and working) +replacement for C. For system units these resource limits may be chosen freely. For user units however (i.e. units run by a per-user instance of @@ -986,10 +551,10 @@ L for details on the resource limit concept. Resource limits may be specified in two formats: either as single value to set a specific soft and hard limit to the same value, or as colon-separated pair C to set -both limits individually (e.g. C). Use the string C -to configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base -1024) may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time -values, the usual time units ms, s, min, h and so on may be used (see +both limits individually (e.g. C). Use the string C to +configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base 1024) +may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time values, +the usual time units ms, s, min, h and so on may be used (see L for details). Note that if no time unit is specified for C the default unit of seconds is implied, while for C the default unit of microseconds is implied. Also, note @@ -1000,19 +565,14 @@ prefixed like this the value is understood as raw resource limit parameter in the range 0..40 (with 0 being equivalent to 1). -Note that most process resource limits configured with -these options are per-process, and processes may fork in order -to acquire a new set of resources that are accounted -independently of the original process, and may thus escape -limits set. Also note that C is not -implemented on Linux, and setting it has no effect. Often it -is advisable to prefer the resource controls listed in +Note that most process resource limits configured with these options are per-process, and processes may +fork in order to acquire a new set of resources that are accounted independently of the original process, and +may thus escape limits set. Also note that C is not implemented on Linux, and +setting it has no effect. Often it is advisable to prefer the resource controls listed in L -over these per-process limits, as they apply to services as a -whole, may be altered dynamically at runtime, and are -generally more expressive. For example, -C is a more powerful (and -working) replacement for C. +over these per-process limits, as they apply to services as a whole, may be altered dynamically at runtime, and +are generally more expressive. For example, C is a more powerful (and working) +replacement for C. For system units these resource limits may be chosen freely. For user units however (i.e. units run by a per-user instance of @@ -1033,10 +593,10 @@ L for details on the resource limit concept. Resource limits may be specified in two formats: either as single value to set a specific soft and hard limit to the same value, or as colon-separated pair C to set -both limits individually (e.g. C). Use the string C -to configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base -1024) may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time -values, the usual time units ms, s, min, h and so on may be used (see +both limits individually (e.g. C). Use the string C to +configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base 1024) +may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time values, +the usual time units ms, s, min, h and so on may be used (see L for details). Note that if no time unit is specified for C the default unit of seconds is implied, while for C the default unit of microseconds is implied. Also, note @@ -1047,19 +607,14 @@ prefixed like this the value is understood as raw resource limit parameter in the range 0..40 (with 0 being equivalent to 1). -Note that most process resource limits configured with -these options are per-process, and processes may fork in order -to acquire a new set of resources that are accounted -independently of the original process, and may thus escape -limits set. Also note that C is not -implemented on Linux, and setting it has no effect. Often it -is advisable to prefer the resource controls listed in +Note that most process resource limits configured with these options are per-process, and processes may +fork in order to acquire a new set of resources that are accounted independently of the original process, and +may thus escape limits set. Also note that C is not implemented on Linux, and +setting it has no effect. Often it is advisable to prefer the resource controls listed in L -over these per-process limits, as they apply to services as a -whole, may be altered dynamically at runtime, and are -generally more expressive. For example, -C is a more powerful (and -working) replacement for C. +over these per-process limits, as they apply to services as a whole, may be altered dynamically at runtime, and +are generally more expressive. For example, C is a more powerful (and working) +replacement for C. For system units these resource limits may be chosen freely. For user units however (i.e. units run by a per-user instance of @@ -1080,10 +635,10 @@ L for details on the resource limit concept. Resource limits may be specified in two formats: either as single value to set a specific soft and hard limit to the same value, or as colon-separated pair C to set -both limits individually (e.g. C). Use the string C -to configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base -1024) may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time -values, the usual time units ms, s, min, h and so on may be used (see +both limits individually (e.g. C). Use the string C to +configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base 1024) +may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time values, +the usual time units ms, s, min, h and so on may be used (see L for details). Note that if no time unit is specified for C the default unit of seconds is implied, while for C the default unit of microseconds is implied. Also, note @@ -1094,19 +649,14 @@ prefixed like this the value is understood as raw resource limit parameter in the range 0..40 (with 0 being equivalent to 1). -Note that most process resource limits configured with -these options are per-process, and processes may fork in order -to acquire a new set of resources that are accounted -independently of the original process, and may thus escape -limits set. Also note that C is not -implemented on Linux, and setting it has no effect. Often it -is advisable to prefer the resource controls listed in +Note that most process resource limits configured with these options are per-process, and processes may +fork in order to acquire a new set of resources that are accounted independently of the original process, and +may thus escape limits set. Also note that C is not implemented on Linux, and +setting it has no effect. Often it is advisable to prefer the resource controls listed in L -over these per-process limits, as they apply to services as a -whole, may be altered dynamically at runtime, and are -generally more expressive. For example, -C is a more powerful (and -working) replacement for C. +over these per-process limits, as they apply to services as a whole, may be altered dynamically at runtime, and +are generally more expressive. For example, C is a more powerful (and working) +replacement for C. For system units these resource limits may be chosen freely. For user units however (i.e. units run by a per-user instance of @@ -1127,10 +677,10 @@ L for details on the resource limit concept. Resource limits may be specified in two formats: either as single value to set a specific soft and hard limit to the same value, or as colon-separated pair C to set -both limits individually (e.g. C). Use the string C -to configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base -1024) may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time -values, the usual time units ms, s, min, h and so on may be used (see +both limits individually (e.g. C). Use the string C to +configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base 1024) +may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time values, +the usual time units ms, s, min, h and so on may be used (see L for details). Note that if no time unit is specified for C the default unit of seconds is implied, while for C the default unit of microseconds is implied. Also, note @@ -1141,19 +691,14 @@ prefixed like this the value is understood as raw resource limit parameter in the range 0..40 (with 0 being equivalent to 1). -Note that most process resource limits configured with -these options are per-process, and processes may fork in order -to acquire a new set of resources that are accounted -independently of the original process, and may thus escape -limits set. Also note that C is not -implemented on Linux, and setting it has no effect. Often it -is advisable to prefer the resource controls listed in +Note that most process resource limits configured with these options are per-process, and processes may +fork in order to acquire a new set of resources that are accounted independently of the original process, and +may thus escape limits set. Also note that C is not implemented on Linux, and +setting it has no effect. Often it is advisable to prefer the resource controls listed in L -over these per-process limits, as they apply to services as a -whole, may be altered dynamically at runtime, and are -generally more expressive. For example, -C is a more powerful (and -working) replacement for C. +over these per-process limits, as they apply to services as a whole, may be altered dynamically at runtime, and +are generally more expressive. For example, C is a more powerful (and working) +replacement for C. For system units these resource limits may be chosen freely. For user units however (i.e. units run by a per-user instance of @@ -1174,10 +719,10 @@ L for details on the resource limit concept. Resource limits may be specified in two formats: either as single value to set a specific soft and hard limit to the same value, or as colon-separated pair C to set -both limits individually (e.g. C). Use the string C -to configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base -1024) may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time -values, the usual time units ms, s, min, h and so on may be used (see +both limits individually (e.g. C). Use the string C to +configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base 1024) +may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time values, +the usual time units ms, s, min, h and so on may be used (see L for details). Note that if no time unit is specified for C the default unit of seconds is implied, while for C the default unit of microseconds is implied. Also, note @@ -1188,19 +733,14 @@ prefixed like this the value is understood as raw resource limit parameter in the range 0..40 (with 0 being equivalent to 1). -Note that most process resource limits configured with -these options are per-process, and processes may fork in order -to acquire a new set of resources that are accounted -independently of the original process, and may thus escape -limits set. Also note that C is not -implemented on Linux, and setting it has no effect. Often it -is advisable to prefer the resource controls listed in +Note that most process resource limits configured with these options are per-process, and processes may +fork in order to acquire a new set of resources that are accounted independently of the original process, and +may thus escape limits set. Also note that C is not implemented on Linux, and +setting it has no effect. Often it is advisable to prefer the resource controls listed in L -over these per-process limits, as they apply to services as a -whole, may be altered dynamically at runtime, and are -generally more expressive. For example, -C is a more powerful (and -working) replacement for C. +over these per-process limits, as they apply to services as a whole, may be altered dynamically at runtime, and +are generally more expressive. For example, C is a more powerful (and working) +replacement for C. For system units these resource limits may be chosen freely. For user units however (i.e. units run by a per-user instance of @@ -1221,10 +761,10 @@ L for details on the resource limit concept. Resource limits may be specified in two formats: either as single value to set a specific soft and hard limit to the same value, or as colon-separated pair C to set -both limits individually (e.g. C). Use the string C -to configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base -1024) may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time -values, the usual time units ms, s, min, h and so on may be used (see +both limits individually (e.g. C). Use the string C to +configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base 1024) +may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time values, +the usual time units ms, s, min, h and so on may be used (see L for details). Note that if no time unit is specified for C the default unit of seconds is implied, while for C the default unit of microseconds is implied. Also, note @@ -1235,19 +775,14 @@ prefixed like this the value is understood as raw resource limit parameter in the range 0..40 (with 0 being equivalent to 1). -Note that most process resource limits configured with -these options are per-process, and processes may fork in order -to acquire a new set of resources that are accounted -independently of the original process, and may thus escape -limits set. Also note that C is not -implemented on Linux, and setting it has no effect. Often it -is advisable to prefer the resource controls listed in +Note that most process resource limits configured with these options are per-process, and processes may +fork in order to acquire a new set of resources that are accounted independently of the original process, and +may thus escape limits set. Also note that C is not implemented on Linux, and +setting it has no effect. Often it is advisable to prefer the resource controls listed in L -over these per-process limits, as they apply to services as a -whole, may be altered dynamically at runtime, and are -generally more expressive. For example, -C is a more powerful (and -working) replacement for C. +over these per-process limits, as they apply to services as a whole, may be altered dynamically at runtime, and +are generally more expressive. For example, C is a more powerful (and working) +replacement for C. For system units these resource limits may be chosen freely. For user units however (i.e. units run by a per-user instance of @@ -1268,10 +803,10 @@ L for details on the resource limit concept. Resource limits may be specified in two formats: either as single value to set a specific soft and hard limit to the same value, or as colon-separated pair C to set -both limits individually (e.g. C). Use the string C -to configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base -1024) may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time -values, the usual time units ms, s, min, h and so on may be used (see +both limits individually (e.g. C). Use the string C to +configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base 1024) +may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time values, +the usual time units ms, s, min, h and so on may be used (see L for details). Note that if no time unit is specified for C the default unit of seconds is implied, while for C the default unit of microseconds is implied. Also, note @@ -1282,19 +817,14 @@ prefixed like this the value is understood as raw resource limit parameter in the range 0..40 (with 0 being equivalent to 1). -Note that most process resource limits configured with -these options are per-process, and processes may fork in order -to acquire a new set of resources that are accounted -independently of the original process, and may thus escape -limits set. Also note that C is not -implemented on Linux, and setting it has no effect. Often it -is advisable to prefer the resource controls listed in +Note that most process resource limits configured with these options are per-process, and processes may +fork in order to acquire a new set of resources that are accounted independently of the original process, and +may thus escape limits set. Also note that C is not implemented on Linux, and +setting it has no effect. Often it is advisable to prefer the resource controls listed in L -over these per-process limits, as they apply to services as a -whole, may be altered dynamically at runtime, and are -generally more expressive. For example, -C is a more powerful (and -working) replacement for C. +over these per-process limits, as they apply to services as a whole, may be altered dynamically at runtime, and +are generally more expressive. For example, C is a more powerful (and working) +replacement for C. For system units these resource limits may be chosen freely. For user units however (i.e. units run by a per-user instance of @@ -1315,10 +845,10 @@ L for details on the resource limit concept. Resource limits may be specified in two formats: either as single value to set a specific soft and hard limit to the same value, or as colon-separated pair C to set -both limits individually (e.g. C). Use the string C -to configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base -1024) may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time -values, the usual time units ms, s, min, h and so on may be used (see +both limits individually (e.g. C). Use the string C to +configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base 1024) +may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time values, +the usual time units ms, s, min, h and so on may be used (see L for details). Note that if no time unit is specified for C the default unit of seconds is implied, while for C the default unit of microseconds is implied. Also, note @@ -1329,19 +859,14 @@ prefixed like this the value is understood as raw resource limit parameter in the range 0..40 (with 0 being equivalent to 1). -Note that most process resource limits configured with -these options are per-process, and processes may fork in order -to acquire a new set of resources that are accounted -independently of the original process, and may thus escape -limits set. Also note that C is not -implemented on Linux, and setting it has no effect. Often it -is advisable to prefer the resource controls listed in +Note that most process resource limits configured with these options are per-process, and processes may +fork in order to acquire a new set of resources that are accounted independently of the original process, and +may thus escape limits set. Also note that C is not implemented on Linux, and +setting it has no effect. Often it is advisable to prefer the resource controls listed in L -over these per-process limits, as they apply to services as a -whole, may be altered dynamically at runtime, and are -generally more expressive. For example, -C is a more powerful (and -working) replacement for C. +over these per-process limits, as they apply to services as a whole, may be altered dynamically at runtime, and +are generally more expressive. For example, C is a more powerful (and working) +replacement for C. For system units these resource limits may be chosen freely. For user units however (i.e. units run by a per-user instance of @@ -1362,10 +887,10 @@ L for details on the resource limit concept. Resource limits may be specified in two formats: either as single value to set a specific soft and hard limit to the same value, or as colon-separated pair C to set -both limits individually (e.g. C). Use the string C -to configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base -1024) may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time -values, the usual time units ms, s, min, h and so on may be used (see +both limits individually (e.g. C). Use the string C to +configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base 1024) +may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time values, +the usual time units ms, s, min, h and so on may be used (see L for details). Note that if no time unit is specified for C the default unit of seconds is implied, while for C the default unit of microseconds is implied. Also, note @@ -1376,19 +901,14 @@ prefixed like this the value is understood as raw resource limit parameter in the range 0..40 (with 0 being equivalent to 1). -Note that most process resource limits configured with -these options are per-process, and processes may fork in order -to acquire a new set of resources that are accounted -independently of the original process, and may thus escape -limits set. Also note that C is not -implemented on Linux, and setting it has no effect. Often it -is advisable to prefer the resource controls listed in +Note that most process resource limits configured with these options are per-process, and processes may +fork in order to acquire a new set of resources that are accounted independently of the original process, and +may thus escape limits set. Also note that C is not implemented on Linux, and +setting it has no effect. Often it is advisable to prefer the resource controls listed in L -over these per-process limits, as they apply to services as a -whole, may be altered dynamically at runtime, and are -generally more expressive. For example, -C is a more powerful (and -working) replacement for C. +over these per-process limits, as they apply to services as a whole, may be altered dynamically at runtime, and +are generally more expressive. For example, C is a more powerful (and working) +replacement for C. For system units these resource limits may be chosen freely. For user units however (i.e. units run by a per-user instance of @@ -1409,10 +929,10 @@ L for details on the resource limit concept. Resource limits may be specified in two formats: either as single value to set a specific soft and hard limit to the same value, or as colon-separated pair C to set -both limits individually (e.g. C). Use the string C -to configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base -1024) may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time -values, the usual time units ms, s, min, h and so on may be used (see +both limits individually (e.g. C). Use the string C to +configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base 1024) +may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time values, +the usual time units ms, s, min, h and so on may be used (see L for details). Note that if no time unit is specified for C the default unit of seconds is implied, while for C the default unit of microseconds is implied. Also, note @@ -1423,19 +943,14 @@ prefixed like this the value is understood as raw resource limit parameter in the range 0..40 (with 0 being equivalent to 1). -Note that most process resource limits configured with -these options are per-process, and processes may fork in order -to acquire a new set of resources that are accounted -independently of the original process, and may thus escape -limits set. Also note that C is not -implemented on Linux, and setting it has no effect. Often it -is advisable to prefer the resource controls listed in +Note that most process resource limits configured with these options are per-process, and processes may +fork in order to acquire a new set of resources that are accounted independently of the original process, and +may thus escape limits set. Also note that C is not implemented on Linux, and +setting it has no effect. Often it is advisable to prefer the resource controls listed in L -over these per-process limits, as they apply to services as a -whole, may be altered dynamically at runtime, and are -generally more expressive. For example, -C is a more powerful (and -working) replacement for C. +over these per-process limits, as they apply to services as a whole, may be altered dynamically at runtime, and +are generally more expressive. For example, C is a more powerful (and working) +replacement for C. For system units these resource limits may be chosen freely. For user units however (i.e. units run by a per-user instance of @@ -1456,10 +971,10 @@ L for details on the resource limit concept. Resource limits may be specified in two formats: either as single value to set a specific soft and hard limit to the same value, or as colon-separated pair C to set -both limits individually (e.g. C). Use the string C -to configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base -1024) may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time -values, the usual time units ms, s, min, h and so on may be used (see +both limits individually (e.g. C). Use the string C to +configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base 1024) +may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time values, +the usual time units ms, s, min, h and so on may be used (see L for details). Note that if no time unit is specified for C the default unit of seconds is implied, while for C the default unit of microseconds is implied. Also, note @@ -1470,19 +985,14 @@ prefixed like this the value is understood as raw resource limit parameter in the range 0..40 (with 0 being equivalent to 1). -Note that most process resource limits configured with -these options are per-process, and processes may fork in order -to acquire a new set of resources that are accounted -independently of the original process, and may thus escape -limits set. Also note that C is not -implemented on Linux, and setting it has no effect. Often it -is advisable to prefer the resource controls listed in +Note that most process resource limits configured with these options are per-process, and processes may +fork in order to acquire a new set of resources that are accounted independently of the original process, and +may thus escape limits set. Also note that C is not implemented on Linux, and +setting it has no effect. Often it is advisable to prefer the resource controls listed in L -over these per-process limits, as they apply to services as a -whole, may be altered dynamically at runtime, and are -generally more expressive. For example, -C is a more powerful (and -working) replacement for C. +over these per-process limits, as they apply to services as a whole, may be altered dynamically at runtime, and +are generally more expressive. For example, C is a more powerful (and working) +replacement for C. For system units these resource limits may be chosen freely. For user units however (i.e. units run by a per-user instance of @@ -1503,10 +1013,10 @@ L for details on the resource limit concept. Resource limits may be specified in two formats: either as single value to set a specific soft and hard limit to the same value, or as colon-separated pair C to set -both limits individually (e.g. C). Use the string C -to configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base -1024) may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time -values, the usual time units ms, s, min, h and so on may be used (see +both limits individually (e.g. C). Use the string C to +configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base 1024) +may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time values, +the usual time units ms, s, min, h and so on may be used (see L for details). Note that if no time unit is specified for C the default unit of seconds is implied, while for C the default unit of microseconds is implied. Also, note @@ -1517,19 +1027,14 @@ prefixed like this the value is understood as raw resource limit parameter in the range 0..40 (with 0 being equivalent to 1). -Note that most process resource limits configured with -these options are per-process, and processes may fork in order -to acquire a new set of resources that are accounted -independently of the original process, and may thus escape -limits set. Also note that C is not -implemented on Linux, and setting it has no effect. Often it -is advisable to prefer the resource controls listed in +Note that most process resource limits configured with these options are per-process, and processes may +fork in order to acquire a new set of resources that are accounted independently of the original process, and +may thus escape limits set. Also note that C is not implemented on Linux, and +setting it has no effect. Often it is advisable to prefer the resource controls listed in L -over these per-process limits, as they apply to services as a -whole, may be altered dynamically at runtime, and are -generally more expressive. For example, -C is a more powerful (and -working) replacement for C. +over these per-process limits, as they apply to services as a whole, may be altered dynamically at runtime, and +are generally more expressive. For example, C is a more powerful (and working) +replacement for C. For system units these resource limits may be chosen freely. For user units however (i.e. units run by a per-user instance of @@ -1550,10 +1055,10 @@ L for details on the resource limit concept. Resource limits may be specified in two formats: either as single value to set a specific soft and hard limit to the same value, or as colon-separated pair C to set -both limits individually (e.g. C). Use the string C -to configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base -1024) may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time -values, the usual time units ms, s, min, h and so on may be used (see +both limits individually (e.g. C). Use the string C to +configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base 1024) +may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time values, +the usual time units ms, s, min, h and so on may be used (see L for details). Note that if no time unit is specified for C the default unit of seconds is implied, while for C the default unit of microseconds is implied. Also, note @@ -1564,19 +1069,14 @@ prefixed like this the value is understood as raw resource limit parameter in the range 0..40 (with 0 being equivalent to 1). -Note that most process resource limits configured with -these options are per-process, and processes may fork in order -to acquire a new set of resources that are accounted -independently of the original process, and may thus escape -limits set. Also note that C is not -implemented on Linux, and setting it has no effect. Often it -is advisable to prefer the resource controls listed in +Note that most process resource limits configured with these options are per-process, and processes may +fork in order to acquire a new set of resources that are accounted independently of the original process, and +may thus escape limits set. Also note that C is not implemented on Linux, and +setting it has no effect. Often it is advisable to prefer the resource controls listed in L -over these per-process limits, as they apply to services as a -whole, may be altered dynamically at runtime, and are -generally more expressive. For example, -C is a more powerful (and -working) replacement for C. +over these per-process limits, as they apply to services as a whole, may be altered dynamically at runtime, and +are generally more expressive. For example, C is a more powerful (and working) +replacement for C. For system units these resource limits may be chosen freely. For user units however (i.e. units run by a per-user instance of @@ -1591,105 +1091,628 @@ 'type' => 'leaf', 'value_type' => 'uniline' }, - 'PAMName', + 'UMask', { - 'description' => 'Sets the PAM service name to set up a session as. If set, the executed process will be -registered as a PAM session under the specified service name. This is only useful in conjunction with the -C setting, and is otherwise ignored. If not set, no PAM session will be opened for the -executed processes. See L for -details. - -Note that for each unit making use of this option a PAM session handler process will be maintained as -part of the unit and stays around as long as the unit is active, to ensure that appropriate actions can be -taken when the unit and hence the PAM session terminates. This process is named C<(sd-pam)> and -is an immediate child process of the unit\'s main process. - -Note that when this option is used for a unit it is very likely (depending on PAM configuration) that the -main unit process will be migrated to its own session scope unit when it is activated. This process will hence -be associated with two units: the unit it was originally started from (and for which -C was configured), and the session scope unit. Any child processes of that process -will however be associated with the session scope unit only. This has implications when used in combination -with CC, as these child processes will not be able to affect -changes in the original unit through notification messages. These messages will be considered belonging to the -session scope unit and not the original unit. It is hence not recommended to use C in -combination with CC.', + 'description' => 'Controls the file mode creation mask. Takes an access mode in octal notation. See +L for details. Defaults +to 0022.', 'type' => 'leaf', 'value_type' => 'uniline' }, - 'CapabilityBoundingSet', + 'KeyringMode', { - 'description' => 'Controls which capabilities to include in the capability bounding set for the executed -process. See L for -details. Takes a whitespace-separated list of capability names, e.g. C, -C, C. Capabilities listed will be -included in the bounding set, all others are removed. If the list of capabilities is prefixed with -C<~>, all but the listed capabilities will be included, the effect of the assignment -inverted. Note that this option also affects the respective capabilities in the effective, permitted and -inheritable capability sets. If this option is not used, the capability bounding set is not modified on process -execution, hence no limits on the capabilities of the process are enforced. This option may appear more than -once, in which case the bounding sets are merged by C, or by C -if the lines are prefixed with C<~> (see below). If the empty string is assigned -to this option, the bounding set is reset to the empty capability set, and all prior settings have no effect. -If set to C<~> (without any further argument), the bounding set is reset to the full set of available -capabilities, also undoing any previous settings. This does not affect commands prefixed with -C<+>. - -Example: if a unit has the following, + 'choice' => [ + 'inherit', + 'private', + 'shared' + ], + 'description' => 'Controls how the kernel session keyring is set up for the service (see L for +details on the session keyring). Takes one of C, C, +C. If set to C no special keyring setup is done, and the kernel\'s +default behaviour is applied. If C is used a new session keyring is allocated when a +service process is invoked, and it is not linked up with any user keyring. This is the recommended setting for +system services, as this ensures that multiple services running under the same system user ID (in particular +the root user) do not share their key material among each other. If C is used a new +session keyring is allocated as for C, but the user keyring of the user configured with +C is linked into it, so that keys assigned to the user may be requested by the unit\'s +processes. In this modes multiple units running processes under the same user ID may share key material. Unless +C is selected the unique invocation ID for the unit (see below) is added as a protected +key by the name C to the newly created session keyring. Defaults to +C for the system service manager and to C for the user service +manager.', + 'type' => 'leaf', + 'value_type' => 'enum' + }, + 'OOMScoreAdjust', + { + 'description' => 'Sets the adjustment level for the Out-Of-Memory killer for executed processes. Takes an integer +between -1000 (to disable OOM killing for this process) and 1000 (to make killing of this process under memory +pressure very likely). See proc.txt for +details.', + 'max' => '1000', + 'min' => '-1000', + 'type' => 'leaf', + 'value_type' => 'integer' + }, + 'TimerSlackNSec', + { + 'description' => 'Sets the timer slack in nanoseconds for the executed processes. The timer slack controls the +accuracy of wake-ups triggered by timers. See +L for more +information. Note that in contrast to most other time span definitions this parameter takes an integer value in +nano-seconds if no unit is specified. The usual time units are understood too.', + 'type' => 'leaf', + 'value_type' => 'uniline' + }, + 'Personality', + { + 'choice' => [ + 'x86', + 'x86-64', + 'ppc', + 'ppc-le', + 'ppc64', + 'ppc64-le', + 's390', + 's390x' + ], + 'description' => 'Controls which kernel architecture L shall report, +when invoked by unit processes. Takes one of the architecture identifiers C, +C, C, C, C, +C, C or C. Which personality +architectures are supported depends on the system architecture. Usually the 64bit versions of the various +system architectures support their immediate 32bit personality architecture counterpart, but no others. For +example, C systems support the C and +C personalities but no others. The personality feature is useful when running 32-bit +services on a 64-bit host system. If not specified, the personality is left unmodified and thus reflects the +personality of the host system\'s kernel.', + 'type' => 'leaf', + 'value_type' => 'enum' + }, + 'IgnoreSIGPIPE', + { + 'description' => 'Takes a boolean argument. If true, causes C to be ignored in the +executed process. Defaults to true because C generally is useful only in shell +pipelines.', + 'type' => 'leaf', + 'value_type' => 'boolean', + 'write_as' => [ + 'no', + 'yes' + ] + }, + 'Nice', + { + 'description' => 'Sets the default nice level (scheduling priority) for executed processes. Takes an integer +between -20 (highest priority) and 19 (lowest priority). See +L for +details.', + 'max' => '19', + 'min' => '-20', + 'type' => 'leaf', + 'value_type' => 'integer' + }, + 'CPUSchedulingPolicy', + { + 'choice' => [ + 'other', + 'batch', + 'idle', + 'fifo', + 'rr' + ], + 'description' => 'Sets the CPU scheduling policy for executed processes. Takes one of C, +C, C, C or C. See +L for +details.', + 'type' => 'leaf', + 'value_type' => 'enum' + }, + 'CPUSchedulingPriority', + { + 'description' => 'Sets the CPU scheduling priority for executed processes. The available priority range depends +on the selected CPU scheduling policy (see above). For real-time scheduling policies an integer between 1 +(lowest priority) and 99 (highest priority) can be used. See +L for +details. ', + 'type' => 'leaf', + 'value_type' => 'uniline' + }, + 'CPUSchedulingResetOnFork', + { + 'description' => 'Takes a boolean argument. If true, elevated CPU scheduling priorities and policies will be +reset when the executed processes fork, and can hence not leak into child processes. See +L for +details. Defaults to false.', + 'type' => 'leaf', + 'value_type' => 'boolean', + 'write_as' => [ + 'no', + 'yes' + ] + }, + 'CPUAffinity', + { + 'cargo' => { + 'type' => 'leaf', + 'value_type' => 'uniline' + }, + 'description' => 'Controls the CPU affinity of the executed processes. Takes a list of CPU indices or ranges +separated by either whitespace or commas. CPU ranges are specified by the lower and upper CPU indices separated +by a dash. This option may be specified more than once, in which case the specified CPU affinity masks are +merged. If the empty string is assigned, the mask is reset, all assignments prior to this will have no +effect. See +L for +details.', + 'type' => 'list' + }, + 'IOSchedulingClass', + { + 'choice' => [ + '0', + '1', + '2', + '3', + 'none', + 'realtime', + 'best-effort', + 'idle' + ], + 'description' => 'Sets the I/O scheduling class for executed processes. Takes an integer between 0 and 3 or one +of the strings C, C, C or +C. See +L for +details.', + 'type' => 'leaf', + 'value_type' => 'enum' + }, + 'IOSchedulingPriority', + { + 'description' => 'Sets the I/O scheduling priority for executed processes. Takes an integer between 0 (highest +priority) and 7 (lowest priority). The available priorities depend on the selected I/O scheduling class (see +above). See L for +details.', + 'max' => '7', + 'min' => '0', + 'type' => 'leaf', + 'value_type' => 'integer' + }, + 'ProtectSystem', + { + 'choice' => [ + 'no', + 'yes', + 'full', + 'strict' + ], + 'description' => 'Takes a boolean argument or the special values C or +C. If true, mounts the /usr and /boot +directories read-only for processes invoked by this unit. If set to C, the +/etc directory is mounted read-only, too. If set to C the entire +file system hierarchy is mounted read-only, except for the API file system subtrees /dev, +/proc and /sys (protect these directories using +C, C, +C). This setting ensures that any modification of the vendor-supplied +operating system (and optionally its configuration, and local mounts) is prohibited for the service. It is +recommended to enable this setting for all long-running services, unless they are involved with system updates +or need to modify the operating system in other ways. If this option is used, +C may be used to exclude specific directories from being made read-only. This +setting is implied if C is set. For this setting the same restrictions regarding +mount propagation and privileges apply as for C and related calls, see +below. Defaults to off.', + 'replace' => { + '0' => 'no', + '1' => 'yes', + 'false' => 'no', + 'true' => 'yes' + }, + 'type' => 'leaf', + 'value_type' => 'enum' + }, + 'ProtectHome', + { + 'choice' => [ + 'no', + 'yes', + 'read-only' + ], + 'description' => 'Takes a boolean argument or C. If true, the directories +/home, /root and /run/user are made inaccessible +and empty for processes invoked by this unit. If set to C, the three directories are +made read-only instead. It is recommended to enable this setting for all long-running services (in particular +network-facing ones), to ensure they cannot get access to private user data, unless the services actually +require access to the user\'s private data. This setting is implied if C is +set. For this setting the same restrictions regarding mount propagation and privileges apply as for +C and related calls, see below.', + 'replace' => { + '0' => 'no', + '1' => 'yes', + 'false' => 'no', + 'true' => 'yes' + }, + 'type' => 'leaf', + 'value_type' => 'enum' + }, + 'RuntimeDirectory', + { + 'description' => 'These options take a whitespace-separated list of directory names. The specified directory +names must be relative, and may not include C<.> or C<..>. If set, one or more +directories by the specified names will be created (including their parents) below /run +(or C<$XDG_RUNTIME_DIR> for user services), /var/lib (or +C<$XDG_CONFIG_HOME> for user services), /var/cache (or +C<$XDG_CACHE_HOME> for user services), /var/log (or +C<$XDG_CONFIG_HOME>/log for user services), or /etc +(or C<$XDG_CONFIG_HOME> for user services), respectively, when the unit is started. + +In case of C the lowest subdirectories are removed when the unit is +stopped. It is possible to preserve the specified directories in this case if +C is configured to C or C +(see below). The directories specified with C, +C, C, +C are not removed when the unit is stopped. + +Except in case of C, the innermost specified directories will be +owned by the user and group specified in C and C. If the +specified directories already exist and their owning user or group do not match the configured ones, all files +and directories below the specified directories as well as the directories themselves will have their file +ownership recursively changed to match what is configured. As an optimization, if the specified directories are +already owned by the right user and group, files and directories below of them are left as-is, even if they do +not match what is requested. The innermost specified directories will have their access mode adjusted to the +what is specified in C, C, +C, C and +C. + +These options imply C for the specified paths. When combined with +C or C these paths always reside on the host and +are mounted from there into the unit\'s file system namespace. + +If C is used in conjunction with C, +C and C is slightly altered: the directories +are created below /var/lib/private, /var/cache/private and +/var/log/private, respectively, which are host directories made inaccessible to +unprivileged users, which ensures that access to these directories cannot be gained through dynamic user ID +recycling. Symbolic links are created to hide this difference in behaviour. Both from perspective of the host +and from inside the unit, the relevant directories hence always appear directly below +/var/lib, /var/cache and /var/log. + +Use C to manage one or more runtime directories for the unit and bind +their lifetime to the daemon runtime. This is particularly useful for unprivileged daemons that cannot create +runtime directories in /run due to lack of privileges, and to make sure the runtime +directory is cleaned up automatically after use. For runtime directories that require more complex or different +configuration or lifetime guarantees, please consider using +L. + +Example: if a system service unit has the following, + + RuntimeDirectory=foo/bar baz + +the service manager creates /run/foo (if it does not exist), +/run/foo/bar, and /run/baz. The directories +/run/foo/bar and /run/baz except /run/foo are +owned by the user and group specified in C and C, and removed +when the service is stopped.', + 'type' => 'leaf', + 'value_type' => 'uniline' + }, + 'StateDirectory', + { + 'description' => 'These options take a whitespace-separated list of directory names. The specified directory +names must be relative, and may not include C<.> or C<..>. If set, one or more +directories by the specified names will be created (including their parents) below /run +(or C<$XDG_RUNTIME_DIR> for user services), /var/lib (or +C<$XDG_CONFIG_HOME> for user services), /var/cache (or +C<$XDG_CACHE_HOME> for user services), /var/log (or +C<$XDG_CONFIG_HOME>/log for user services), or /etc +(or C<$XDG_CONFIG_HOME> for user services), respectively, when the unit is started. + +In case of C the lowest subdirectories are removed when the unit is +stopped. It is possible to preserve the specified directories in this case if +C is configured to C or C +(see below). The directories specified with C, +C, C, +C are not removed when the unit is stopped. + +Except in case of C, the innermost specified directories will be +owned by the user and group specified in C and C. If the +specified directories already exist and their owning user or group do not match the configured ones, all files +and directories below the specified directories as well as the directories themselves will have their file +ownership recursively changed to match what is configured. As an optimization, if the specified directories are +already owned by the right user and group, files and directories below of them are left as-is, even if they do +not match what is requested. The innermost specified directories will have their access mode adjusted to the +what is specified in C, C, +C, C and +C. + +These options imply C for the specified paths. When combined with +C or C these paths always reside on the host and +are mounted from there into the unit\'s file system namespace. + +If C is used in conjunction with C, +C and C is slightly altered: the directories +are created below /var/lib/private, /var/cache/private and +/var/log/private, respectively, which are host directories made inaccessible to +unprivileged users, which ensures that access to these directories cannot be gained through dynamic user ID +recycling. Symbolic links are created to hide this difference in behaviour. Both from perspective of the host +and from inside the unit, the relevant directories hence always appear directly below +/var/lib, /var/cache and /var/log. - CapabilityBoundingSet=CAP_A CAP_B - CapabilityBoundingSet=CAP_B CAP_C +Use C to manage one or more runtime directories for the unit and bind +their lifetime to the daemon runtime. This is particularly useful for unprivileged daemons that cannot create +runtime directories in /run due to lack of privileges, and to make sure the runtime +directory is cleaned up automatically after use. For runtime directories that require more complex or different +configuration or lifetime guarantees, please consider using +L. -then C, C, and C are set. -If the second line is prefixed with C<~>, e.g., +Example: if a system service unit has the following, - CapabilityBoundingSet=CAP_A CAP_B - CapabilityBoundingSet=~CAP_B CAP_C + RuntimeDirectory=foo/bar baz -then, only C is set.', +the service manager creates /run/foo (if it does not exist), +/run/foo/bar, and /run/baz. The directories +/run/foo/bar and /run/baz except /run/foo are +owned by the user and group specified in C and C, and removed +when the service is stopped.', 'type' => 'leaf', 'value_type' => 'uniline' }, - 'AmbientCapabilities', + 'CacheDirectory', { - 'description' => 'Controls which capabilities to include in the ambient capability set for the executed -process. Takes a whitespace-separated list of capability names, e.g. C, -C, C. This option may appear more than -once in which case the ambient capability sets are merged (see the above examples in -C). If the list of capabilities is prefixed with -C<~>, all but the listed capabilities will be included, the effect of the assignment -inverted. If the empty string is assigned to this option, the ambient capability set is reset to the empty -capability set, and all prior settings have no effect. If set to C<~> (without any further -argument), the ambient capability set is reset to the full set of available capabilities, also undoing any -previous settings. Note that adding capabilities to ambient capability set adds them to the process\'s inherited -capability set. - - Ambient capability sets are useful if you want to execute a process as a -non-privileged user but still want to give it some capabilities. Note that in this case option -C is automatically added to C to retain the -capabilities over the user change. C does not affect commands prefixed -with C<+>.', + 'description' => 'These options take a whitespace-separated list of directory names. The specified directory +names must be relative, and may not include C<.> or C<..>. If set, one or more +directories by the specified names will be created (including their parents) below /run +(or C<$XDG_RUNTIME_DIR> for user services), /var/lib (or +C<$XDG_CONFIG_HOME> for user services), /var/cache (or +C<$XDG_CACHE_HOME> for user services), /var/log (or +C<$XDG_CONFIG_HOME>/log for user services), or /etc +(or C<$XDG_CONFIG_HOME> for user services), respectively, when the unit is started. + +In case of C the lowest subdirectories are removed when the unit is +stopped. It is possible to preserve the specified directories in this case if +C is configured to C or C +(see below). The directories specified with C, +C, C, +C are not removed when the unit is stopped. + +Except in case of C, the innermost specified directories will be +owned by the user and group specified in C and C. If the +specified directories already exist and their owning user or group do not match the configured ones, all files +and directories below the specified directories as well as the directories themselves will have their file +ownership recursively changed to match what is configured. As an optimization, if the specified directories are +already owned by the right user and group, files and directories below of them are left as-is, even if they do +not match what is requested. The innermost specified directories will have their access mode adjusted to the +what is specified in C, C, +C, C and +C. + +These options imply C for the specified paths. When combined with +C or C these paths always reside on the host and +are mounted from there into the unit\'s file system namespace. + +If C is used in conjunction with C, +C and C is slightly altered: the directories +are created below /var/lib/private, /var/cache/private and +/var/log/private, respectively, which are host directories made inaccessible to +unprivileged users, which ensures that access to these directories cannot be gained through dynamic user ID +recycling. Symbolic links are created to hide this difference in behaviour. Both from perspective of the host +and from inside the unit, the relevant directories hence always appear directly below +/var/lib, /var/cache and /var/log. + +Use C to manage one or more runtime directories for the unit and bind +their lifetime to the daemon runtime. This is particularly useful for unprivileged daemons that cannot create +runtime directories in /run due to lack of privileges, and to make sure the runtime +directory is cleaned up automatically after use. For runtime directories that require more complex or different +configuration or lifetime guarantees, please consider using +L. + +Example: if a system service unit has the following, + + RuntimeDirectory=foo/bar baz + +the service manager creates /run/foo (if it does not exist), +/run/foo/bar, and /run/baz. The directories +/run/foo/bar and /run/baz except /run/foo are +owned by the user and group specified in C and C, and removed +when the service is stopped.', 'type' => 'leaf', 'value_type' => 'uniline' }, - 'SecureBits', + 'LogsDirectory', + { + 'description' => 'These options take a whitespace-separated list of directory names. The specified directory +names must be relative, and may not include C<.> or C<..>. If set, one or more +directories by the specified names will be created (including their parents) below /run +(or C<$XDG_RUNTIME_DIR> for user services), /var/lib (or +C<$XDG_CONFIG_HOME> for user services), /var/cache (or +C<$XDG_CACHE_HOME> for user services), /var/log (or +C<$XDG_CONFIG_HOME>/log for user services), or /etc +(or C<$XDG_CONFIG_HOME> for user services), respectively, when the unit is started. + +In case of C the lowest subdirectories are removed when the unit is +stopped. It is possible to preserve the specified directories in this case if +C is configured to C or C +(see below). The directories specified with C, +C, C, +C are not removed when the unit is stopped. + +Except in case of C, the innermost specified directories will be +owned by the user and group specified in C and C. If the +specified directories already exist and their owning user or group do not match the configured ones, all files +and directories below the specified directories as well as the directories themselves will have their file +ownership recursively changed to match what is configured. As an optimization, if the specified directories are +already owned by the right user and group, files and directories below of them are left as-is, even if they do +not match what is requested. The innermost specified directories will have their access mode adjusted to the +what is specified in C, C, +C, C and +C. + +These options imply C for the specified paths. When combined with +C or C these paths always reside on the host and +are mounted from there into the unit\'s file system namespace. + +If C is used in conjunction with C, +C and C is slightly altered: the directories +are created below /var/lib/private, /var/cache/private and +/var/log/private, respectively, which are host directories made inaccessible to +unprivileged users, which ensures that access to these directories cannot be gained through dynamic user ID +recycling. Symbolic links are created to hide this difference in behaviour. Both from perspective of the host +and from inside the unit, the relevant directories hence always appear directly below +/var/lib, /var/cache and /var/log. + +Use C to manage one or more runtime directories for the unit and bind +their lifetime to the daemon runtime. This is particularly useful for unprivileged daemons that cannot create +runtime directories in /run due to lack of privileges, and to make sure the runtime +directory is cleaned up automatically after use. For runtime directories that require more complex or different +configuration or lifetime guarantees, please consider using +L. + +Example: if a system service unit has the following, + + RuntimeDirectory=foo/bar baz + +the service manager creates /run/foo (if it does not exist), +/run/foo/bar, and /run/baz. The directories +/run/foo/bar and /run/baz except /run/foo are +owned by the user and group specified in C and C, and removed +when the service is stopped.', + 'type' => 'leaf', + 'value_type' => 'uniline' + }, + 'ConfigurationDirectory', + { + 'description' => 'These options take a whitespace-separated list of directory names. The specified directory +names must be relative, and may not include C<.> or C<..>. If set, one or more +directories by the specified names will be created (including their parents) below /run +(or C<$XDG_RUNTIME_DIR> for user services), /var/lib (or +C<$XDG_CONFIG_HOME> for user services), /var/cache (or +C<$XDG_CACHE_HOME> for user services), /var/log (or +C<$XDG_CONFIG_HOME>/log for user services), or /etc +(or C<$XDG_CONFIG_HOME> for user services), respectively, when the unit is started. + +In case of C the lowest subdirectories are removed when the unit is +stopped. It is possible to preserve the specified directories in this case if +C is configured to C or C +(see below). The directories specified with C, +C, C, +C are not removed when the unit is stopped. + +Except in case of C, the innermost specified directories will be +owned by the user and group specified in C and C. If the +specified directories already exist and their owning user or group do not match the configured ones, all files +and directories below the specified directories as well as the directories themselves will have their file +ownership recursively changed to match what is configured. As an optimization, if the specified directories are +already owned by the right user and group, files and directories below of them are left as-is, even if they do +not match what is requested. The innermost specified directories will have their access mode adjusted to the +what is specified in C, C, +C, C and +C. + +These options imply C for the specified paths. When combined with +C or C these paths always reside on the host and +are mounted from there into the unit\'s file system namespace. + +If C is used in conjunction with C, +C and C is slightly altered: the directories +are created below /var/lib/private, /var/cache/private and +/var/log/private, respectively, which are host directories made inaccessible to +unprivileged users, which ensures that access to these directories cannot be gained through dynamic user ID +recycling. Symbolic links are created to hide this difference in behaviour. Both from perspective of the host +and from inside the unit, the relevant directories hence always appear directly below +/var/lib, /var/cache and /var/log. + +Use C to manage one or more runtime directories for the unit and bind +their lifetime to the daemon runtime. This is particularly useful for unprivileged daemons that cannot create +runtime directories in /run due to lack of privileges, and to make sure the runtime +directory is cleaned up automatically after use. For runtime directories that require more complex or different +configuration or lifetime guarantees, please consider using +L. + +Example: if a system service unit has the following, + + RuntimeDirectory=foo/bar baz + +the service manager creates /run/foo (if it does not exist), +/run/foo/bar, and /run/baz. The directories +/run/foo/bar and /run/baz except /run/foo are +owned by the user and group specified in C and C, and removed +when the service is stopped.', + 'type' => 'leaf', + 'value_type' => 'uniline' + }, + 'RuntimeDirectoryMode', + { + 'description' => 'Specifies the access mode of the directories specified in C, +C, C, C, or +C, respectively, as an octal number. Defaults to +C<0755>. See "Permissions" in L for a +discussion of the meaning of permission bits.', + 'type' => 'leaf', + 'value_type' => 'uniline' + }, + 'StateDirectoryMode', + { + 'description' => 'Specifies the access mode of the directories specified in C, +C, C, C, or +C, respectively, as an octal number. Defaults to +C<0755>. See "Permissions" in L for a +discussion of the meaning of permission bits.', + 'type' => 'leaf', + 'value_type' => 'uniline' + }, + 'CacheDirectoryMode', + { + 'description' => 'Specifies the access mode of the directories specified in C, +C, C, C, or +C, respectively, as an octal number. Defaults to +C<0755>. See "Permissions" in L for a +discussion of the meaning of permission bits.', + 'type' => 'leaf', + 'value_type' => 'uniline' + }, + 'LogsDirectoryMode', + { + 'description' => 'Specifies the access mode of the directories specified in C, +C, C, C, or +C, respectively, as an octal number. Defaults to +C<0755>. See "Permissions" in L for a +discussion of the meaning of permission bits.', + 'type' => 'leaf', + 'value_type' => 'uniline' + }, + 'ConfigurationDirectoryMode', { - 'description' => 'Controls the secure bits set for the executed -process. Takes a space-separated combination of options from -the following list: -C, -C, -C, -C, -C, and -C. -This option may appear more than once, in which case the secure -bits are ORed. If the empty string is assigned to this option, -the bits are reset to 0. This does not affect commands prefixed with C<+>. -See L -for details.', + 'description' => 'Specifies the access mode of the directories specified in C, +C, C, C, or +C, respectively, as an octal number. Defaults to +C<0755>. See "Permissions" in L for a +discussion of the meaning of permission bits.', 'type' => 'leaf', 'value_type' => 'uniline' }, + 'RuntimeDirectoryPreserve', + { + 'choice' => [ + 'no', + 'yes', + 'restart' + ], + 'description' => 'Takes a boolean argument or C. If set to C (the +default), the directories specified in C are always removed when the service +stops. If set to C the directories are preserved when the service is both automatically +and manually restarted. Here, the automatic restart means the operation specified in +C, and manual restart means the one triggered by systemctl restart +foo.service. If set to C, then the directories are not removed when the service is +stopped. Note that since the runtime directory /run is a mount point of +C, then for system services the directories specified in +C are removed when the system is rebooted.', + 'replace' => { + '0' => 'no', + '1' => 'yes', + 'false' => 'no', + 'true' => 'yes' + }, + 'type' => 'leaf', + 'value_type' => 'enum' + }, 'ReadWritePaths', { 'cargo' => { @@ -1793,84 +1816,30 @@ reading only, writing will be refused even if the usual file access controls would permit this. Nest C inside of C in order to provide writable subdirectories within read-only directories. Use C in order to whitelist -specific paths for write access if C is used. Paths listed in -C will be made inaccessible for processes inside the namespace (along with -everything below them in the file system hierarchy). - -Note that restricting access with these options does not extend to submounts of a directory that are -created later on. Non-directory paths may be specified as well. These options may be specified more than once, -in which case all paths listed will have limited access from within the namespace. If the empty string is -assigned to this option, the specific list is reset, and all prior assignments have no effect. - -Paths in C, C and -C may be prefixed with C<->, in which case they will be -ignored when they do not exist. If prefixed with C<+> the paths are taken relative to the root -directory of the unit, as configured with C/C, -instead of relative to the root directory of the host (see above). When combining C<-> and -C<+> on the same path make sure to specify C<-> first, and C<+> -second. - -Note that using this setting will disconnect propagation of mounts from the service to the host -(propagation in the opposite direction continues to work). This means that this setting may not be used for -services which shall be able to install mount points in the main mount namespace. Note that the effect of these -settings may be undone by privileged processes. In order to set up an effective sandboxed environment for a -unit it is thus recommended to combine these settings with either -C or -C.', - 'type' => 'list' - }, - 'BindPaths', - { - 'cargo' => { - 'type' => 'leaf', - 'value_type' => 'uniline' - }, - 'description' => 'Configures unit-specific bind mounts. A bind mount makes a particular file or directory -available at an additional place in the unit\'s view of the file system. Any bind mounts created with this -option are specific to the unit, and are not visible in the host\'s mount table. This option expects a -whitespace separated list of bind mount definitions. Each definition consists of a colon-separated triple of -source path, destination path and option string, where the latter two are optional. If only a source path is -specified the source and destination is taken to be the same. The option string may be either -C or C for configuring a recursive or non-recursive bind -mount. If the destination path is omitted, the option string must be omitted too. - -C creates regular writable bind mounts (unless the source file system mount -is already marked read-only), while C creates read-only bind mounts. These -settings may be used more than once, each usage appends to the unit\'s list of bind mounts. If the empty string -is assigned to either of these two options the entire list of bind mounts defined prior to this is reset. Note -that in this case both read-only and regular bind mounts are reset, regardless which of the two settings is -used. +specific paths for write access if C is used. Paths listed in +C will be made inaccessible for processes inside the namespace (along with +everything below them in the file system hierarchy). -This option is particularly useful when C/C -is used. In this case the source path refers to a path on the host file system, while the destination path -refers to a path below the root directory of the unit.', - 'type' => 'list' - }, - 'BindReadOnlyPaths', - { - 'cargo' => { - 'type' => 'leaf', - 'value_type' => 'uniline' - }, - 'description' => 'Configures unit-specific bind mounts. A bind mount makes a particular file or directory -available at an additional place in the unit\'s view of the file system. Any bind mounts created with this -option are specific to the unit, and are not visible in the host\'s mount table. This option expects a -whitespace separated list of bind mount definitions. Each definition consists of a colon-separated triple of -source path, destination path and option string, where the latter two are optional. If only a source path is -specified the source and destination is taken to be the same. The option string may be either -C or C for configuring a recursive or non-recursive bind -mount. If the destination path is omitted, the option string must be omitted too. +Note that restricting access with these options does not extend to submounts of a directory that are +created later on. Non-directory paths may be specified as well. These options may be specified more than once, +in which case all paths listed will have limited access from within the namespace. If the empty string is +assigned to this option, the specific list is reset, and all prior assignments have no effect. -C creates regular writable bind mounts (unless the source file system mount -is already marked read-only), while C creates read-only bind mounts. These -settings may be used more than once, each usage appends to the unit\'s list of bind mounts. If the empty string -is assigned to either of these two options the entire list of bind mounts defined prior to this is reset. Note -that in this case both read-only and regular bind mounts are reset, regardless which of the two settings is -used. +Paths in C, C and +C may be prefixed with C<->, in which case they will be +ignored when they do not exist. If prefixed with C<+> the paths are taken relative to the root +directory of the unit, as configured with C/C, +instead of relative to the root directory of the host (see above). When combining C<-> and +C<+> on the same path make sure to specify C<-> first, and C<+> +second. -This option is particularly useful when C/C -is used. In this case the source path refers to a path on the host file system, while the destination path -refers to a path below the root directory of the unit.', +Note that using this setting will disconnect propagation of mounts from the service to the host +(propagation in the opposite direction continues to work). This means that this setting may not be used for +services which shall be able to install mount points in the main mount namespace. Note that the effect of these +settings may be undone by privileged processes. In order to set up an effective sandboxed environment for a +unit it is thus recommended to combine these settings with either +C or +C.', 'type' => 'list' }, 'PrivateTmp', @@ -1892,8 +1861,8 @@ L is added. -Note that the implementation of this setting might be impossible (for example if mount namespaces -are not available), and the unit should be written in a way that does not solely rely on this setting for +Note that the implementation of this setting might be impossible (for example if mount namespaces are not +available), and the unit should be written in a way that does not solely rely on this setting for security.', 'type' => 'leaf', 'value_type' => 'boolean', @@ -1906,27 +1875,28 @@ { 'description' => 'Takes a boolean argument. If true, sets up a new /dev mount for the executed processes and only adds API pseudo devices such as /dev/null, -/dev/zero or -/dev/random (as well as the pseudo TTY subsystem) to it, but no physical devices such as -/dev/sda, system memory /dev/mem, system ports -/dev/port and others. This is useful to securely turn off physical device access by the -executed process. Defaults to false. Enabling this option will install a system call filter to block low-level -I/O system calls that are grouped in the C<@raw-io> set, will also remove -C and C from the capability bounding set for -the unit (see above), and set C (see +/dev/zero or /dev/random (as well as the pseudo TTY subsystem) to it, +but no physical devices such as /dev/sda, system memory /dev/mem, +system ports /dev/port and others. This is useful to securely turn off physical device +access by the executed process. Defaults to false. Enabling this option will install a system call filter to +block low-level I/O system calls that are grouped in the C<@raw-io> set, will also remove +C and C from the capability bounding set for the +unit (see above), and set C (see L for details). Note that using this setting will disconnect propagation of mounts from the service to the host (propagation in the opposite direction continues to work). This means that this setting may not be used for -services which shall be able to install mount points in the main mount namespace. The new /dev -will be mounted read-only and \'noexec\'. The latter may break old programs which try to set up executable memory by -using L of -/dev/zero instead of using C. For this setting the same restrictions -regarding mount propagation and privileges apply as for C and related calls, see above. -If turned on and if running in user mode, or in system mode, but without the C -capability (e.g. setting C), C is implied. +services which shall be able to install mount points in the main mount namespace. The new +/dev will be mounted read-only and \'noexec\'. The latter may break old programs which try +to set up executable memory by using +L of +/dev/zero instead of using C. For this setting the same +restrictions regarding mount propagation and privileges apply as for C and +related calls, see above. If turned on and if running in user mode, or in system mode, but without the +C capability (e.g. setting C), +C is implied. -Note that the implementation of this setting might be impossible (for example if mount namespaces -are not available), and the unit should be written in a way that does not solely rely on this setting for +Note that the implementation of this setting might be impossible (for example if mount namespaces are not +available), and the unit should be written in a way that does not solely rely on this setting for security.', 'type' => 'leaf', 'value_type' => 'boolean', @@ -1937,25 +1907,18 @@ }, 'PrivateNetwork', { - 'description' => 'Takes a boolean argument. If true, sets up a -new network namespace for the executed processes and -configures only the loopback network device -C inside it. No other network devices will -be available to the executed process. This is useful to -turn off network access by the executed process. -Defaults to false. It is possible to run two or more units -within the same private network namespace by using the -C directive, see -L -for details. Note that this option will disconnect all socket -families from the host, this includes AF_NETLINK and AF_UNIX. -The latter has the effect that AF_UNIX sockets in the abstract -socket namespace will become unavailable to the processes -(however, those located in the file system will continue to be -accessible). + 'description' => 'Takes a boolean argument. If true, sets up a new network namespace for the executed processes +and configures only the loopback network device C inside it. No other network devices will +be available to the executed process. This is useful to turn off network access by the executed process. +Defaults to false. It is possible to run two or more units within the same private network namespace by using +the C directive, see +L for +details. Note that this option will disconnect all socket families from the host, this includes AF_NETLINK and +AF_UNIX. The latter has the effect that AF_UNIX sockets in the abstract socket namespace will become +unavailable to the processes (however, those located in the file system will continue to be accessible). -Note that the implementation of this setting might be impossible (for example if network namespaces -are not available), and the unit should be written in a way that does not solely rely on this setting for +Note that the implementation of this setting might be impossible (for example if network namespaces are +not available), and the unit should be written in a way that does not solely rely on this setting for security.', 'type' => 'leaf', 'value_type' => 'boolean', @@ -1984,8 +1947,8 @@ databases in the root directory and on the host is reduced, as the only users and groups who need to be matched are C, C and the unit\'s own user and group. -Note that the implementation of this setting might be impossible (for example if user namespaces -are not available), and the unit should be written in a way that does not solely rely on this setting for +Note that the implementation of this setting might be impossible (for example if user namespaces are not +available), and the unit should be written in a way that does not solely rely on this setting for security.', 'type' => 'leaf', 'value_type' => 'boolean', @@ -1994,62 +1957,6 @@ 'yes' ] }, - 'ProtectSystem', - { - 'choice' => [ - 'no', - 'yes', - 'full', - 'strict' - ], - 'description' => 'Takes a boolean argument or the special values C or -C. If true, mounts the /usr and /boot -directories read-only for processes invoked by this unit. If set to C, the -/etc directory is mounted read-only, too. If set to C the entire -file system hierarchy is mounted read-only, except for the API file system subtrees /dev, -/proc and /sys (protect these directories using -C, C, -C). This setting ensures that any modification of the vendor-supplied -operating system (and optionally its configuration, and local mounts) is prohibited for the service. It is -recommended to enable this setting for all long-running services, unless they are involved with system updates -or need to modify the operating system in other ways. If this option is used, -C may be used to exclude specific directories from being made read-only. This -setting is implied if C is set. For this setting the same restrictions regarding -mount propagation and privileges apply as for C and related calls, see -above. Defaults to off.', - 'replace' => { - '0' => 'no', - '1' => 'yes', - 'false' => 'no', - 'true' => 'yes' - }, - 'type' => 'leaf', - 'value_type' => 'enum' - }, - 'ProtectHome', - { - 'choice' => [ - 'no', - 'yes', - 'read-only' - ], - 'description' => 'Takes a boolean argument or C. If true, the directories -/home, /root and /run/user are made inaccessible -and empty for processes invoked by this unit. If set to C, the three directories are -made read-only instead. It is recommended to enable this setting for all long-running services (in particular -network-facing ones), to ensure they cannot get access to private user data, unless the services actually -require access to the user\'s private data. This setting is implied if C is -set. For this setting the same restrictions regarding mount propagation and privileges apply as for -C and related calls, see above.', - 'replace' => { - '0' => 'no', - '1' => 'yes', - 'false' => 'no', - 'true' => 'yes' - }, - 'type' => 'leaf', - 'value_type' => 'enum' - }, 'ProtectKernelTunables', { 'description' => 'Takes a boolean argument. If true, kernel variables accessible through @@ -2077,24 +1984,19 @@ }, 'ProtectKernelModules', { - 'description' => 'Takes a boolean argument. If true, explicit module loading will -be denied. This allows to turn off module load and unload operations on modular -kernels. It is recommended to turn this on for most services that do not need special -file systems or extra kernel modules to work. Default to off. Enabling this option -removes C from the capability bounding set for -the unit, and installs a system call filter to block module system calls, -also /usr/lib/modules is made inaccessible. For this -setting the same restrictions regarding mount propagation and privileges -apply as for C and related calls, see above. -Note that limited automatic module loading due to user configuration or kernel -mapping tables might still happen as side effect of requested user operations, + 'description' => 'Takes a boolean argument. If true, explicit module loading will be denied. This allows to turn +off module load and unload operations on modular kernels. It is recommended to turn this on for most services +that do not need special file systems or extra kernel modules to work. Defaults to off. Enabling this option +removes C from the capability bounding set for the unit, and installs a +system call filter to block module system calls, also /usr/lib/modules is made +inaccessible. For this setting the same restrictions regarding mount propagation and privileges apply as for +C and related calls, see above. Note that limited automatic module loading due +to user configuration or kernel mapping tables might still happen as side effect of requested user operations, both privileged and unprivileged. To disable module auto-load feature please see LC mechanism and -/proc/sys/kernel/modules_disabled documentation. -If turned on and if running in user mode, or in system mode, but without the C -capability (e.g. setting C), C -is implied. -', +/proc/sys/kernel/modules_disabled documentation. If turned on and if running in user +mode, or in system mode, but without the C capability (e.g. setting +C), C is implied.', 'type' => 'leaf', 'value_type' => 'boolean', 'write_as' => [ @@ -2109,8 +2011,8 @@ unit. Except for container managers no services should require write access to the control groups hierarchies; it is hence recommended to turn this on for most services. For this setting the same restrictions regarding mount propagation and privileges apply as for C and related calls, see -above. Defaults to off. If C is set, C is -implied.', +above. Defaults to off. If C is set, C +is implied.', 'type' => 'leaf', 'value_type' => 'boolean', 'write_as' => [ @@ -2118,130 +2020,118 @@ 'yes' ] }, - 'MountFlags', - { - 'description' => 'Takes a mount propagation flag: C, C or -C, which control whether mounts in the file system namespace set up for this unit\'s -processes will receive or propagate mounts and unmounts. See L for -details. Defaults to C. Use C to ensure that mounts and unmounts -are propagated from systemd\'s namespace to the service\'s namespace and vice versa. Use C -to run processes so that none of their mounts and unmounts will propagate to the host. Use C -to also ensure that no mounts and unmounts from the host will propagate into the unit processes\' namespace. -If this is set to C or C, any mounts created by spawned processes -will be unmounted after the completion of the current command line of C, -C, C, -and C. Note that -C means that file systems mounted on the host might stay mounted continuously in the -unit\'s namespace, and thus keep the device busy. Note that the file system namespace related options -(C, C, C, -C, C, -C, C, -C, C) require that mount and unmount -propagation from the unit\'s file system namespace is disabled, and hence downgrade C to -C. ', - 'type' => 'leaf', - 'value_type' => 'uniline' - }, - 'UtmpIdentifier', + 'RestrictAddressFamilies', { - 'description' => 'Takes a four character identifier string for -an L -and wtmp entry for this service. This should only be -set for services such as getty -implementations (such as L) -where utmp/wtmp entries must be created and cleared before and -after execution, or for services that shall be executed as if -they were run by a getty process (see -below). If the configured string is longer than four -characters, it is truncated and the terminal four characters -are used. This setting interprets %I style string -replacements. This setting is unset by default, i.e. no -utmp/wtmp entries are created or cleaned up for this -service.', + 'description' => 'Restricts the set of socket address families accessible to the processes of this unit. Takes a +space-separated list of address family names to whitelist, such as C, +C or C. When prefixed with C<~> the +listed address families will be applied as blacklist, otherwise as whitelist. Note that this restricts access +to the L system call +only. Sockets passed into the process by other means (for example, by using socket activation with socket +units, see L) +are unaffected. Also, sockets created with socketpair() (which creates connected AF_UNIX +sockets only) are unaffected. Note that this option has no effect on 32-bit x86, s390, s390x, mips, mips-le, +ppc, ppc-le, pcc64, ppc64-le and is ignored (but works correctly on other ABIs, including x86-64). Note that on +systems supporting multiple ABIs (such as x86/x86-64) it is recommended to turn off alternative ABIs for +services, so that they cannot be used to circumvent the restrictions of this option. Specifically, it is +recommended to combine this option with C or similar. If +running in user mode, or in system mode, but without the C capability +(e.g. setting C), C is implied. By default, +no restrictions apply, all address families are accessible to processes. If assigned the empty string, any +previous address familiy restriction changes are undone. This setting does not affect commands prefixed with +C<+>. + +Use this option to limit exposure of processes to remote access, in particular via exotic and sensitive +network protocols, such as C. Note that in most cases, the local +C address family should be included in the configured whitelist as it is frequently +used for local communication, including for +L +logging.', 'type' => 'leaf', 'value_type' => 'uniline' }, - 'UtmpMode', - { - 'choice' => [ - 'init', - 'login', - 'user' - ], - 'description' => 'Takes one of C, -C or C. If -C is set, controls which -type of L/wtmp -entries for this service are generated. This setting has no -effect unless C is set -too. If C is set, only an -C entry is generated and the -invoked process must implement a -getty-compatible utmp/wtmp logic. If -C is set, first an -C entry, followed by a -C entry is generated. In -this case, the invoked process must implement a L-compatible -utmp/wtmp logic. If C is set, first an -C entry, then a -C entry and finally a -C entry is generated. In this -case, the invoked process may be any process that is suitable -to be run as session leader. Defaults to -C.', - 'type' => 'leaf', - 'value_type' => 'enum' - }, - 'SELinuxContext', + 'RestrictNamespaces', { - 'description' => 'Set the SELinux security context of the -executed process. If set, this will override the automated -domain transition. However, the policy still needs to -authorize the transition. This directive is ignored if SELinux -is disabled. If prefixed by C<->, all errors -will be ignored. This does not affect commands prefixed with C<+>. -See L -for details.', + 'description' => "Restricts access to Linux namespace functionality for the processes of this unit. For details +about Linux namespaces, see L. Either +takes a boolean argument, or a space-separated list of namespace type identifiers. If false (the default), no +restrictions on namespace creation and switching are made. If true, access to any kind of namespacing is +prohibited. Otherwise, a space-separated list of namespace type identifiers must be specified, consisting of +any combination of: C, C, C, +C, C, C and C. Any +namespace type listed is made accessible to the unit's processes, access to namespace types not listed is +prohibited (whitelisting). By prepending the list with a single tilde character (C<~>) the +effect may be inverted: only the listed namespace types will be made inaccessible, all unlisted ones are +permitted (blacklisting). If the empty string is assigned, the default namespace restrictions are applied, +which is equivalent to false. Internally, this setting limits access to the +L, +L and +L system calls, taking +the specified flags parameters into account. Note that \x{2014} if this option is used \x{2014} in addition to restricting +creation and switching of the specified types of namespaces (or all of them, if true) access to the +setns() system call with a zero flags parameter is prohibited. This setting is only +supported on x86, x86-64, mips, mips-le, mips64, mips64-le, mips64-n32, mips64-le-n32, ppc64, ppc64-le, s390 +and s390x, and enforces no restrictions on other architectures. If running in user mode, or in system mode, but +without the C capability (e.g. setting C), +C is implied. ", 'type' => 'leaf', 'value_type' => 'uniline' }, - 'AppArmorProfile', + 'LockPersonality', { - 'description' => 'Takes a profile name as argument. The process -executed by the unit will switch to this profile when started. -Profiles must already be loaded in the kernel, or the unit -will fail. This result in a non operation if AppArmor is not -enabled. If prefixed by C<->, all errors will -be ignored. This does not affect commands prefixed with C<+>.', + 'description' => 'Takes a boolean argument. If set, locks down the L system +call so that the kernel execution domain may not be changed from the default or the personality selected with +C directive. This may be useful to improve security, because odd personality +emulations may be poorly tested and source of vulnerabilities. If running in user mode, or in system mode, but +without the C capability (e.g. setting C), +C is implied.', 'type' => 'leaf', - 'value_type' => 'uniline' + 'value_type' => 'boolean', + 'write_as' => [ + 'no', + 'yes' + ] }, - 'SmackProcessLabel', + 'MemoryDenyWriteExecute', { - 'description' => 'Takes a C security -label as argument. The process executed by the unit will be -started under this label and SMACK will decide whether the -process is allowed to run or not, based on it. The process -will continue to run under the label specified here unless the -executable has its own C label, in -which case the process will transition to run under that -label. When not specified, the label that systemd is running -under is used. This directive is ignored if SMACK is -disabled. - -The value may be prefixed by C<->, in -which case all errors will be ignored. An empty value may be -specified to unset previous assignments. This does not affect -commands prefixed with C<+>.', + 'description' => 'Takes a boolean argument. If set, attempts to create memory mappings that are writable and +executable at the same time, or to change existing memory mappings to become executable, or mapping shared +memory segments as executable are prohibited. Specifically, a system call filter is added that rejects +L system calls with both +C and C set, +L or +L system calls +with C set and +L system calls with +C set. Note that this option is incompatible with programs and libraries that +generate program code dynamically at runtime, including JIT execution engines, executable stacks, and code +"trampoline" feature of various C compilers. This option improves service security, as it makes harder for +software exploits to change running code dynamically. Note that this feature is fully available on x86-64, and +partially on x86. Specifically, the shmat() protection is not available on x86. Note that +on systems supporting multiple ABIs (such as x86/x86-64) it is recommended to turn off alternative ABIs for +services, so that they cannot be used to circumvent the restrictions of this option. Specifically, it is +recommended to combine this option with C or similar. If +running in user mode, or in system mode, but without the C capability +(e.g. setting C), C is implied.', 'type' => 'leaf', - 'value_type' => 'uniline' + 'value_type' => 'boolean', + 'write_as' => [ + 'no', + 'yes' + ] }, - 'IgnoreSIGPIPE', + 'RestrictRealtime', { - 'description' => 'Takes a boolean argument. If true, causes -C to be ignored in the executed -process. Defaults to true because C -generally is useful only in shell pipelines.', + 'description' => 'Takes a boolean argument. If set, any attempts to enable realtime scheduling in a process of +the unit are refused. This restricts access to realtime task scheduling policies such as +C, C or C. See +L +for details about these scheduling policies. If running in user mode, or in system mode, but without the +C capability (e.g. setting C), +C is implied. Realtime scheduling policies may be used to monopolize CPU +time for longer periods of time, and may hence be used to lock up or otherwise trigger Denial-of-Service +situations on the system. It is hence recommended to restrict access to realtime scheduling to the few programs +that actually require them. Defaults to off.', 'type' => 'leaf', 'value_type' => 'boolean', 'write_as' => [ @@ -2249,18 +2139,15 @@ 'yes' ] }, - 'NoNewPrivileges', + 'RemoveIPC', { - 'description' => 'Takes a boolean argument. If true, ensures that the service process and all its children can -never gain new privileges through execve() (e.g. via setuid or setgid bits, or filesystem -capabilities). This is the simplest and most effective way to ensure that a process and its children can never -elevate privileges again. Defaults to false, but certain settings force -C, ignoring the value of this setting. This is the case when -C, C, -C, C, -C, C, -C, C, or -C are specified.', + 'description' => 'Takes a boolean parameter. If set, all System V and POSIX IPC objects owned by the user and +group the processes of this unit are run as are removed when the unit is stopped. This setting only has an +effect if at least one of C, C and +C are used. It has no effect on IPC objects owned by the root user. Specifically, +this removes System V semaphores, as well as System V and POSIX shared memory segments and message queues. If +multiple units use the same user or group the IPC objects are removed when the last of these units is +stopped. This setting is implied if C is set.', 'type' => 'leaf', 'value_type' => 'boolean', 'write_as' => [ @@ -2268,6 +2155,29 @@ 'yes' ] }, + 'MountFlags', + { + 'description' => 'Takes a mount propagation flag: C, C or +C, which control whether mounts in the file system namespace set up for this unit\'s +processes will receive or propagate mounts and unmounts. See L for +details. Defaults to C. Use C to ensure that mounts and unmounts +are propagated from systemd\'s namespace to the service\'s namespace and vice versa. Use C +to run processes so that none of their mounts and unmounts will propagate to the host. Use +C to also ensure that no mounts and unmounts from the host will propagate into the unit +processes\' namespace. If this is set to C or C, any mounts created +by spawned processes will be unmounted after the completion of the current command line of +C, C, C, and +C. Note that C means that file systems mounted on the host +might stay mounted continuously in the unit\'s namespace, and thus keep the device busy. Note that the file +system namespace related options (C, C, +C, C, C, +C, C, +C, C) require that mount and unmount +propagation from the unit\'s file system namespace is disabled, and hence downgrade C to +C. ', + 'type' => 'leaf', + 'value_type' => 'uniline' + }, 'SystemCallFilter', { 'cargo' => { @@ -2278,16 +2188,20 @@ executed by the unit processes except for the listed ones will result in immediate process termination with the C signal (whitelisting). If the first character of the list is C<~>, the effect is inverted: only the listed system calls will result in immediate process termination -(blacklisting). If running in user mode, or in system mode, but without the C -capability (e.g. setting C), C is -implied. This feature makes use of the Secure Computing Mode 2 interfaces of the kernel ('seccomp filtering') -and is useful for enforcing a minimal sandboxing environment. Note that the execve, -exit, exit_group, getrlimit, -rt_sigreturn, sigreturn system calls and the system calls for -querying time and sleeping are implicitly whitelisted and do not need to be listed explicitly. This option may -be specified more than once, in which case the filter masks are merged. If the empty string is assigned, the -filter is reset, all prior assignments will have no effect. This does not affect commands prefixed with -C<+>. +(blacklisting). Blacklisted system calls and system call groups may optionally be suffixed with a colon +(C<:>) and C error number (between 0 and 4095) or errno name such as +C, C or C. This value will be +returned when a blacklisted system call is triggered, instead of terminating the processes immediately. This +value takes precedence over the one given in C. If running in user +mode, or in system mode, but without the C capability (e.g. setting +C), C is implied. This feature makes use of +the Secure Computing Mode 2 interfaces of the kernel ('seccomp filtering') and is useful for enforcing a +minimal sandboxing environment. Note that the execve, exit, +exit_group, getrlimit, rt_sigreturn, +sigreturn system calls and the system calls for querying time and sleeping are implicitly +whitelisted and do not need to be listed explicitly. This option may be specified more than once, in which case +the filter masks are merged. If the empty string is assigned, the filter is reset, all prior assignments will +have no effect. This does not affect commands prefixed with C<+>. Note that on systems supporting multiple ABIs (such as x86/x86-64) it is recommended to turn off alternative ABIs for services, so that they cannot be used to circumvent the restrictions of this @@ -2302,30 +2216,21 @@ might be necessary to temporarily disable system call filters in order to simplify debugging of such failures. -If you specify both types of this option (i.e. -whitelisting and blacklisting), the first encountered will -take precedence and will dictate the default action -(termination or approval of a system call). Then the next -occurrences of this option will add or delete the listed -system calls from the set of the filtered system calls, -depending of its type and the default action. (For example, if -you have started with a whitelisting of -read and write, and -right after it add a blacklisting of -write, then write -will be removed from the set.) - -As the number of possible system -calls is large, predefined sets of system calls are provided. -A set starts with C<\@> character, followed by -name of the set. +If you specify both types of this option (i.e. whitelisting and blacklisting), the first encountered +will take precedence and will dictate the default action (termination or approval of a system call). Then the +next occurrences of this option will add or delete the listed system calls from the set of the filtered system +calls, depending of its type and the default action. (For example, if you have started with a whitelisting of +read and write, and right after it add a blacklisting of +write, then write will be removed from the set.) + +As the number of possible system calls is large, predefined sets of system calls are provided. A set +starts with C<\@> character, followed by name of the set. Currently predefined system call setsSetDescription\@aioAsynchronous I/O (L, L, and related calls)\@basic-ioSystem calls for basic I/O: reading, writing, seeking, file descriptor duplication and closing (L, L, and related calls)\@chownChanging file ownership (L, L, and related calls)\@clockSystem calls for changing the system clock (L, L, and related calls)\@cpu-emulationSystem calls for CPU emulation functionality (L and related calls)\@debugDebugging, performance monitoring and tracing functionality (L, L and related calls)\@file-systemFile system operations: opening, creating files and directories for read and write, renaming and removing them, reading file properties, or creating hard and symbolic links.\@io-eventEvent loop system calls (L, L, L, L and related calls)\@ipcPipes, SysV IPC, POSIX Message Queues and other IPC (L, L)\@keyringKernel keyring access (L and related calls)\@memlockLocking of memory into RAM (L, L and related calls)\@moduleLoading and unloading of kernel modules (L, L and related calls)\@mountMounting and unmounting of file systems (L, L, and related calls)\@network-ioSocket I/O (including local AF_UNIX): L, L\@obsoleteUnusual, obsolete or unimplemented (L, L, \x{2026})\@privilegedAll system calls which need super-user capabilities (L)\@processProcess control, execution, namespaceing operations (L, L, L, \x{2026}\@raw-ioRaw I/O port access (L, L, pciconfig_read(), \x{2026})\@rebootSystem calls for rebooting and reboot preparation (L, kexec(), \x{2026})\@resourcesSystem calls for changing resource limits, memory and scheduling parameters (L, L, \x{2026})\@setuidSystem calls for changing user ID and group ID credentials, (L, L, L, \x{2026})\@signalSystem calls for manipulating and handling process signals (L, L, \x{2026})\@swapSystem calls for enabling/disabling swap devices (L, L)\@syncSynchronizing files and memory to disk: (L, L, and related calls)\@timerSystem calls for scheduling operations by time (L, L, \x{2026}) -Note, that as new system calls are added to the kernel, additional system calls might be -added to the groups above. Contents of the sets may also change between systemd -versions. In addition, the list of system calls depends on the kernel version and -architecture for which systemd was compiled. Use -systemd-analyze\x{a0}syscall-filter to list the actual list of system calls in -each filter. +Note, that as new system calls are added to the kernel, additional system calls might be added to the groups +above. Contents of the sets may also change between systemd versions. In addition, the list of system calls +depends on the kernel version and architecture for which systemd was compiled. Use +systemd-analyze\x{a0}syscall-filter to list the actual list of system calls in each +filter. It is recommended to combine the file system namespacing related options with C, in order to prohibit the unit's processes to undo the @@ -2338,15 +2243,11 @@ }, 'SystemCallErrorNumber', { - 'description' => 'Takes an C error number -name to return when the system call filter configured with -C is triggered, instead of -terminating the process immediately. Takes an error name such -as C, C or -C. When this setting is not used, -or when the empty string is assigned, the process will be -terminated immediately when the filter is -triggered.', + 'description' => 'Takes an C error number (between 1 and 4095) or errno name such as +C, C or C, to return when the +system call filter configured with C is triggered, instead of terminating +the process immediately. When this setting is not used, or when the empty string is assigned, the process will +be terminated immediately when the filter is triggered.', 'type' => 'leaf', 'value_type' => 'uniline' }, @@ -2380,549 +2281,425 @@ 'type' => 'leaf', 'value_type' => 'uniline' }, - 'RestrictAddressFamilies', + 'Environment', { - 'description' => 'Restricts the set of socket address families accessible to the processes of this unit. Takes a -space-separated list of address family names to whitelist, such as C, -C or C. When prefixed with C<~> the -listed address families will be applied as blacklist, otherwise as whitelist. Note that this restricts access -to the L system call -only. Sockets passed into the process by other means (for example, by using socket activation with socket -units, see L) -are unaffected. Also, sockets created with socketpair() (which creates connected AF_UNIX -sockets only) are unaffected. Note that this option has no effect on 32-bit x86, s390, s390x, mips, mips-le, -ppc, ppc-le, pcc64, ppc64-le and is ignored (but works correctly on other ABIs, including x86-64). Note that on -systems supporting multiple ABIs (such as x86/x86-64) it is recommended to turn off alternative ABIs for -services, so that they cannot be used to circumvent the restrictions of this option. Specifically, it is -recommended to combine this option with C or similar. If -running in user mode, or in system mode, but without the C capability -(e.g. setting C), C is implied. By default, -no restrictions apply, all address families are accessible to processes. If assigned the empty string, any -previous address familiy restriction changes are undone. This setting does not affect commands prefixed with -C<+>. + 'cargo' => { + 'type' => 'leaf', + 'value_type' => 'uniline' + }, + 'description' => 'Sets environment variables for executed processes. Takes a space-separated list of variable +assignments. This option may be specified more than once, in which case all listed variables will be set. If +the same variable is set twice, the later setting will override the earlier setting. If the empty string is +assigned to this option, the list of environment variables is reset, all prior assignments have no +effect. Variable expansion is not performed inside the strings, however, specifier expansion is possible. The $ +character has no special meaning. If you need to assign a value containing spaces or the equals sign to a +variable, use double quotes (") for the assignment. -Use this option to limit exposure of processes to remote access, in particular via exotic and sensitive -network protocols, such as C. Note that in most cases, the local -C address family should be included in the configured whitelist as it is frequently -used for local communication, including for -L -logging.', - 'type' => 'leaf', - 'value_type' => 'uniline' - }, - 'RestrictNamespaces', - { - 'description' => "Restricts access to Linux namespace functionality for the processes of this unit. For details -about Linux namespaces, see -L. Either takes a -boolean argument, or a space-separated list of namespace type identifiers. If false (the default), no -restrictions on namespace creation and switching are made. If true, access to any kind of namespacing is -prohibited. Otherwise, a space-separated list of namespace type identifiers must be specified, consisting of -any combination of: C, C, C, -C, C, C and C. Any -namespace type listed is made accessible to the unit's processes, access to namespace types not listed is -prohibited (whitelisting). By prepending the list with a single tilde character (C<~>) the -effect may be inverted: only the listed namespace types will be made inaccessible, all unlisted ones are -permitted (blacklisting). If the empty string is assigned, the default namespace restrictions are applied, -which is equivalent to false. Internally, this setting limits access to the -L, -L and -L system calls, taking -the specified flags parameters into account. Note that \x{2014} if this option is used \x{2014} in addition to restricting -creation and switching of the specified types of namespaces (or all of them, if true) access to the -setns() system call with a zero flags parameter is prohibited. This setting is only -supported on x86, x86-64, mips, mips-le, mips64, mips64-le, mips64-n32, mips64-le-n32, ppc64, ppc64-le, -s390 and s390x, and enforces no restrictions on other architectures. If running in user -mode, or in system mode, but without the C capability (e.g. setting -C), C is implied. ", - 'type' => 'leaf', - 'value_type' => 'uniline' - }, - 'Personality', - { - 'choice' => [ - 'x86', - 'x86-64', - 'ppc', - 'ppc-le', - 'ppc64', - 'ppc64-le', - 's390', - 's390x' - ], - 'description' => 'Controls which kernel architecture L shall report, -when invoked by unit processes. Takes one of the architecture identifiers C, -C, C, C, C, -C, C or C. Which personality -architectures are supported depends on the system architecture. Usually the 64bit versions of the various -system architectures support their immediate 32bit personality architecture counterpart, but no others. For -example, C systems support the C and -C personalities but no others. The personality feature is useful when running 32-bit -services on a 64-bit host system. If not specified, the personality is left unmodified and thus reflects the -personality of the host system\'s kernel.', - 'type' => 'leaf', - 'value_type' => 'enum' - }, - 'LockPersonality', - { - 'description' => 'Takes a boolean argument. If set, locks down the L system -call so that the kernel execution domain may not be changed from the default or the personality selected with -C directive. This may be useful to improve security, because odd personality -emulations may be poorly tested and source of vulnerabilities. If running in user mode, or in system mode, but -without the C capability (e.g. setting C), -C is implied.', - 'type' => 'leaf', - 'value_type' => 'boolean', - 'write_as' => [ - 'no', - 'yes' - ] +Example: + + Environment="VAR1=word1 word2" VAR2=word3 "VAR3=$word 5 6" + +gives three variables C, +C, C +with the values C, +C, C<$word 5 6>. + +See L for details +about environment variables.', + 'type' => 'list' }, - 'KeyringMode', + 'EnvironmentFile', { - 'choice' => [ - 'inherit', - 'private', - 'shared' - ], - 'description' => 'Controls how the kernel session keyring is set up for the service (see L for -details on the session keyring). Takes one of C, C, -C. If set to C no special keyring setup is done, and the kernel\'s -default behaviour is applied. If C is used a new session keyring is allocated when a -service process is invoked, and it is not linked up with any user keyring. This is the recommended setting for -system services, as this ensures that multiple services running under the same system user ID (in particular -the root user) do not share their key material among each other. If C is used a new -session keyring is allocated as for C, but the user keyring of the user configured with -C is linked into it, so that keys assigned to the user may be requested by the unit\'s -processes. In this modes multiple units running processes under the same user ID may share key material. Unless -C is selected the unique invocation ID for the unit (see below) is added as a protected -key by the name C to the newly created session keyring. Defaults to -C for the system service manager and to C for the user service -manager.', - 'type' => 'leaf', - 'value_type' => 'enum' + 'cargo' => { + 'type' => 'leaf', + 'value_type' => 'uniline' + }, + 'description' => 'Similar to C but reads the environment variables from a text +file. The text file should contain new-line-separated variable assignments. Empty lines, lines without an +C<=> separator, or lines starting with ; or # will be ignored, which may be used for +commenting. A line ending with a backslash will be concatenated with the following one, allowing multiline +variable definitions. The parser strips leading and trailing whitespace from the values of assignments, unless +you use double quotes ("). + +The argument passed should be an absolute filename or wildcard expression, optionally prefixed with +C<->, which indicates that if the file does not exist, it will not be read and no error or +warning message is logged. This option may be specified more than once in which case all specified files are +read. If the empty string is assigned to this option, the list of file to read is reset, all prior assignments +have no effect. + +The files listed with this directive will be read shortly before the process is executed (more +specifically, after all processes from a previous unit state terminated. This means you can generate these +files in one unit state, and read it with this option in the next). + +Settings from these files override settings made with C. If the same +variable is set twice from these files, the files will be read in the order they are specified and the later +setting will override the earlier setting.', + 'type' => 'list' }, - 'RuntimeDirectory', + 'PassEnvironment', { - 'description' => 'These options take a whitespace-separated list of directory names. The specified directory -names must be relative, and may not include C<.> or C<..>. If set, one or more -directories by the specified names will be created (including their parents) below /run -(or C<$XDG_RUNTIME_DIR> for user services), /var/lib (or -C<$XDG_CONFIG_HOME> for user services), /var/cache (or -C<$XDG_CACHE_HOME> for user services), /var/log (or -C<$XDG_CONFIG_HOME>/log for user services), or /etc -(or C<$XDG_CONFIG_HOME> for user services), respectively, when the unit is started. - -In case of C the lowest subdirectories are removed when the unit is -stopped. It is possible to preserve the specified directories in this case if -C is configured to C or C -(see below). The directories specified with C, -C, C, -C are not removed when the unit is stopped. - -Except in case of C, the innermost specified directories will be -owned by the user and group specified in C and C. If the -specified directories already exist and their owning user or group do not match the configured ones, all files -and directories below the specified directories as well as the directories themselves will have their file -ownership recursively changed to match what is configured. As an optimization, if the specified directories are -already owned by the right user and group, files and directories below of them are left as-is, even if they do -not match what is requested. The innermost specified directories will have their access mode adjusted to the -what is specified in C, C, -C, C and -C. + 'cargo' => { + 'type' => 'leaf', + 'value_type' => 'uniline' + }, + 'description' => 'Pass environment variables set for the system service manager to executed processes. Takes a +space-separated list of variable names. This option may be specified more than once, in which case all listed +variables will be passed. If the empty string is assigned to this option, the list of environment variables to +pass is reset, all prior assignments have no effect. Variables specified that are not set for the system +manager will not be passed and will be silently ignored. Note that this option is only relevant for the system +service manager, as system services by default do not automatically inherit any environment variables set for +the service manager itself. However, in case of the user service manager all environment variables are passed +to the executed processes anyway, hence this option is without effect for the user service manager. -Except in case of C, these options imply -C for the specified paths. When combined with -C or C these paths always reside on the host and -are mounted from there into the unit\'s file system namespace. If C is used in -conjunction with C, C, -C and C, the behaviour of these options is -slightly altered: the directories are created below /run/private, -/var/lib/private, /var/cache/private and -/var/log/private, respectively, which are host directories made inaccessible to -unprivileged users, which ensures that access to these directories cannot be gained through dynamic user ID -recycling. Symbolic links are created to hide this difference in behaviour. Both from perspective of the host -and from inside the unit, the relevant directories hence always appear directly below -/run, /var/lib, /var/cache and -/var/log. +Variables set for invoked processes due to this setting are subject to being overridden by those +configured with C or C. -Use C to manage one or more runtime directories for the unit and bind -their lifetime to the daemon runtime. This is particularly useful for unprivileged daemons that cannot create -runtime directories in /run due to lack of privileges, and to make sure the runtime -directory is cleaned up automatically after use. For runtime directories that require more complex or different -configuration or lifetime guarantees, please consider using -L. +Example: -Example: if a system service unit has the following, + PassEnvironment=VAR1 VAR2 VAR3 - RuntimeDirectory=foo/bar baz +passes three variables C, +C, C +with the values set for those variables in PID1. -the service manager creates /run/foo (if it does not exist), /run/foo/bar, -and /run/baz. The directories /run/foo/bar and /run/baz -except /run/foo are owned by the user and group specified in C and -C, and removed when the service is stopped. -', - 'type' => 'leaf', - 'value_type' => 'uniline' +See L for details +about environment variables.', + 'type' => 'list' }, - 'StateDirectory', + 'UnsetEnvironment', { - 'description' => 'These options take a whitespace-separated list of directory names. The specified directory -names must be relative, and may not include C<.> or C<..>. If set, one or more -directories by the specified names will be created (including their parents) below /run -(or C<$XDG_RUNTIME_DIR> for user services), /var/lib (or -C<$XDG_CONFIG_HOME> for user services), /var/cache (or -C<$XDG_CACHE_HOME> for user services), /var/log (or -C<$XDG_CONFIG_HOME>/log for user services), or /etc -(or C<$XDG_CONFIG_HOME> for user services), respectively, when the unit is started. - -In case of C the lowest subdirectories are removed when the unit is -stopped. It is possible to preserve the specified directories in this case if -C is configured to C or C -(see below). The directories specified with C, -C, C, -C are not removed when the unit is stopped. - -Except in case of C, the innermost specified directories will be -owned by the user and group specified in C and C. If the -specified directories already exist and their owning user or group do not match the configured ones, all files -and directories below the specified directories as well as the directories themselves will have their file -ownership recursively changed to match what is configured. As an optimization, if the specified directories are -already owned by the right user and group, files and directories below of them are left as-is, even if they do -not match what is requested. The innermost specified directories will have their access mode adjusted to the -what is specified in C, C, -C, C and -C. - -Except in case of C, these options imply -C for the specified paths. When combined with -C or C these paths always reside on the host and -are mounted from there into the unit\'s file system namespace. If C is used in -conjunction with C, C, -C and C, the behaviour of these options is -slightly altered: the directories are created below /run/private, -/var/lib/private, /var/cache/private and -/var/log/private, respectively, which are host directories made inaccessible to -unprivileged users, which ensures that access to these directories cannot be gained through dynamic user ID -recycling. Symbolic links are created to hide this difference in behaviour. Both from perspective of the host -and from inside the unit, the relevant directories hence always appear directly below -/run, /var/lib, /var/cache and -/var/log. + 'cargo' => { + 'type' => 'leaf', + 'value_type' => 'uniline' + }, + 'description' => 'Explicitly unset environment variable assignments that would normally be passed from the +service manager to invoked processes of this unit. Takes a space-separated list of variable names or variable +assignments. This option may be specified more than once, in which case all listed variables/assignments will +be unset. If the empty string is assigned to this option, the list of environment variables/assignments to +unset is reset. If a variable assignment is specified (that is: a variable name, followed by +C<=>, followed by its value), then any environment variable matching this precise assignment is +removed. If a variable name is specified (that is a variable name without any following C<=> or +value), then any assignment matching the variable name, regardless of its value is removed. Note that the +effect of C is applied as final step when the environment list passed to +executed processes is compiled. That means it may undo assignments from any configuration source, including +assignments made through C or C, inherited from +the system manager\'s global set of environment variables, inherited via C, +set by the service manager itself (such as C<$NOTIFY_SOCKET> and such), or set by a PAM module +(in case C is used). -Use C to manage one or more runtime directories for the unit and bind -their lifetime to the daemon runtime. This is particularly useful for unprivileged daemons that cannot create -runtime directories in /run due to lack of privileges, and to make sure the runtime -directory is cleaned up automatically after use. For runtime directories that require more complex or different -configuration or lifetime guarantees, please consider using -L. +See L for details +about environment variables.', + 'type' => 'list' + }, + 'StandardInput', + { + 'choice' => [ + 'null', + 'tty', + 'tty-force', + 'tty-fail', + 'data', + 'socket' + ], + 'description' => "Controls where file descriptor 0 (STDIN) of the executed processes is connected to. Takes one +of C, C, C, C, +C, C, C or +C. + +If C is selected, standard input will be connected to /dev/null, +i.e. all read attempts by the process will result in immediate EOF. + +If C is selected, standard input is connected to a TTY (as configured by +C, see below) and the executed process becomes the controlling process of the +terminal. If the terminal is already being controlled by another process, the executed process waits until the +current controlling process releases the terminal. + +C is similar to C, but the executed process is forcefully and +immediately made the controlling process of the terminal, potentially removing previous controlling processes +from the terminal. + +C is similar to C, but if the terminal already has a +controlling process start-up of the executed process fails. + +The C option may be used to configure arbitrary textual or binary data to pass via +standard input to the executed process. The data to pass is configured via +C/C (see below). Note that the actual +file descriptor type passed (memory file, regular file, UNIX pipe, \x{2026}) might depend on the kernel and available +privileges. In any case, the file descriptor is read-only, and when read returns the specified data followed by +EOF. -Example: if a system service unit has the following, +The C option may be used to connect a specific file +system object to standard input. An absolute path following the C<:> character is expected, +which may refer to a regular file, a FIFO or special file. If an C socket in the +file system is specified, a stream socket is connected to it. The latter is useful for connecting standard +input of processes to arbitrary system services. + +The C option is valid in socket-activated services only, and requires the relevant +socket unit file (see +L for details) +to have C set, or to specify a single socket only. If this option is set, standard +input will be connected to the socket the service was activated from, which is primarily useful for +compatibility with daemons designed for use with the traditional L socket activation +daemon. - RuntimeDirectory=foo/bar baz +The C option connects standard input to a specific, +named file descriptor provided by a socket unit. The name may be specified as part of this option, following a +C<:> character (e.g. C). If no name is specified, the name +C is implied (i.e. C is equivalent to C). +At least one socket unit defining the specified name must be provided via the C +option, and the file descriptor name may differ from the name of its containing socket unit. If multiple +matches are found, the first one will be used. See C in +L for more +details about named file descriptors and their ordering. -the service manager creates /run/foo (if it does not exist), /run/foo/bar, -and /run/baz. The directories /run/foo/bar and /run/baz -except /run/foo are owned by the user and group specified in C and -C, and removed when the service is stopped. -', +This setting defaults to C.", 'type' => 'leaf', - 'value_type' => 'uniline' + 'value_type' => 'enum' }, - 'CacheDirectory', + 'StandardOutput', { - 'description' => 'These options take a whitespace-separated list of directory names. The specified directory -names must be relative, and may not include C<.> or C<..>. If set, one or more -directories by the specified names will be created (including their parents) below /run -(or C<$XDG_RUNTIME_DIR> for user services), /var/lib (or -C<$XDG_CONFIG_HOME> for user services), /var/cache (or -C<$XDG_CACHE_HOME> for user services), /var/log (or -C<$XDG_CONFIG_HOME>/log for user services), or /etc -(or C<$XDG_CONFIG_HOME> for user services), respectively, when the unit is started. - -In case of C the lowest subdirectories are removed when the unit is -stopped. It is possible to preserve the specified directories in this case if -C is configured to C or C -(see below). The directories specified with C, -C, C, -C are not removed when the unit is stopped. - -Except in case of C, the innermost specified directories will be -owned by the user and group specified in C and C. If the -specified directories already exist and their owning user or group do not match the configured ones, all files -and directories below the specified directories as well as the directories themselves will have their file -ownership recursively changed to match what is configured. As an optimization, if the specified directories are -already owned by the right user and group, files and directories below of them are left as-is, even if they do -not match what is requested. The innermost specified directories will have their access mode adjusted to the -what is specified in C, C, -C, C and -C. + 'choice' => [ + 'inherit', + 'null', + 'tty', + 'journal', + 'syslog', + 'kmsg', + 'journal+console', + 'syslog+console', + 'kmsg+console', + 'socket' + ], + 'description' => 'Controls where file descriptor 1 (STDOUT) of the executed processes is connected to. Takes one +of C, C, C, C, +C, C, C, +C, C, +C, C or +C. + +C duplicates the file descriptor of standard input for standard output. + +C connects standard output to /dev/null, i.e. everything written +to it will be lost. + +C connects standard output to a tty (as configured via C, +see below). If the TTY is used for output only, the executed process will not become the controlling process of +the terminal, and will not fail or wait for other processes to release the terminal. + +C connects standard output with the journal which is accessible via +L. Note that +everything that is written to syslog or kmsg (see below) is implicitly stored in the journal as well, the +specific two options listed below are hence supersets of this one. + +C connects standard output to the L system syslog +service, in addition to the journal. Note that the journal daemon is usually configured to forward everything +it receives to syslog anyway, in which case this option is no different from C. -Except in case of C, these options imply -C for the specified paths. When combined with -C or C these paths always reside on the host and -are mounted from there into the unit\'s file system namespace. If C is used in -conjunction with C, C, -C and C, the behaviour of these options is -slightly altered: the directories are created below /run/private, -/var/lib/private, /var/cache/private and -/var/log/private, respectively, which are host directories made inaccessible to -unprivileged users, which ensures that access to these directories cannot be gained through dynamic user ID -recycling. Symbolic links are created to hide this difference in behaviour. Both from perspective of the host -and from inside the unit, the relevant directories hence always appear directly below -/run, /var/lib, /var/cache and -/var/log. +C connects standard output with the kernel log buffer which is accessible via +L, +in addition to the journal. The journal daemon might be configured to send all logs to kmsg anyway, in which +case this option is no different from C. -Use C to manage one or more runtime directories for the unit and bind -their lifetime to the daemon runtime. This is particularly useful for unprivileged daemons that cannot create -runtime directories in /run due to lack of privileges, and to make sure the runtime -directory is cleaned up automatically after use. For runtime directories that require more complex or different -configuration or lifetime guarantees, please consider using -L. +C, C and C work +in a similar way as the three options above but copy the output to the system console as well. -Example: if a system service unit has the following, +The C option may be used to connect a specific file +system object to standard output. The semantics are similar to the same option of +C, see above. If standard input and output are directed to the same file +path, it is opened only once, for reading as well as writing and duplicated. This is particular useful when the +specified path refers to an C socket in the file system, as in that case only a +single stream connection is created for both input and output. + +C connects standard output to a socket acquired via socket activation. The +semantics are similar to the same option of C, see above. + +The C option connects standard output to a specific, +named file descriptor provided by a socket unit. A name may be specified as part of this option, following a +C<:> character (e.g. C). If no name is specified, the name +C is implied (i.e. C is equivalent to +C). At least one socket unit defining the specified name must be provided via the +C option, and the file descriptor name may differ from the name of its containing +socket unit. If multiple matches are found, the first one will be used. See +C in +L for more +details about named descriptors and their ordering. - RuntimeDirectory=foo/bar baz +If the standard output (or error output, see below) of a unit is connected to the journal, syslog or the +kernel log buffer, the unit will implicitly gain a dependency of type C on +systemd-journald.socket (also see the "Implicit Dependencies" section above). Also note +that in this case stdout (or stderr, see below) will be an C stream socket, and not +a pipe or FIFO that can be re-opened. This means when executing shell scripts the construct echo +"hello" > /dev/stderr for writing text to stderr will not work. To mitigate this use the construct +echo "hello" >&2 instead, which is mostly equivalent and avoids this pitfall. + +This setting defaults to the value set with C in +L, which +defaults to C. Note that setting this parameter might result in additional dependencies +to be added to the unit (see above).', + 'type' => 'leaf', + 'value_type' => 'enum' + }, + 'StandardError', + { + 'description' => 'Controls where file descriptor 2 (STDERR) of the executed processes is connected to. The +available options are identical to those of C, with some exceptions: if set to +C the file descriptor used for standard output is duplicated for standard error, while +C will use a default file descriptor name of +C. -the service manager creates /run/foo (if it does not exist), /run/foo/bar, -and /run/baz. The directories /run/foo/bar and /run/baz -except /run/foo are owned by the user and group specified in C and -C, and removed when the service is stopped. -', +This setting defaults to the value set with C in +L, which +defaults to C. Note that setting this parameter might result in additional dependencies +to be added to the unit (see above).', 'type' => 'leaf', 'value_type' => 'uniline' }, - 'LogsDirectory', + 'StandardInputText', { - 'description' => 'These options take a whitespace-separated list of directory names. The specified directory -names must be relative, and may not include C<.> or C<..>. If set, one or more -directories by the specified names will be created (including their parents) below /run -(or C<$XDG_RUNTIME_DIR> for user services), /var/lib (or -C<$XDG_CONFIG_HOME> for user services), /var/cache (or -C<$XDG_CACHE_HOME> for user services), /var/log (or -C<$XDG_CONFIG_HOME>/log for user services), or /etc -(or C<$XDG_CONFIG_HOME> for user services), respectively, when the unit is started. - -In case of C the lowest subdirectories are removed when the unit is -stopped. It is possible to preserve the specified directories in this case if -C is configured to C or C -(see below). The directories specified with C, -C, C, -C are not removed when the unit is stopped. - -Except in case of C, the innermost specified directories will be -owned by the user and group specified in C and C. If the -specified directories already exist and their owning user or group do not match the configured ones, all files -and directories below the specified directories as well as the directories themselves will have their file -ownership recursively changed to match what is configured. As an optimization, if the specified directories are -already owned by the right user and group, files and directories below of them are left as-is, even if they do -not match what is requested. The innermost specified directories will have their access mode adjusted to the -what is specified in C, C, -C, C and -C. + 'description' => 'Configures arbitrary textual or binary data to pass via file descriptor 0 (STDIN) to the +executed processes. These settings have no effect unless C is set to +C. Use this option to embed process input data directly in the unit file. -Except in case of C, these options imply -C for the specified paths. When combined with -C or C these paths always reside on the host and -are mounted from there into the unit\'s file system namespace. If C is used in -conjunction with C, C, -C and C, the behaviour of these options is -slightly altered: the directories are created below /run/private, -/var/lib/private, /var/cache/private and -/var/log/private, respectively, which are host directories made inaccessible to -unprivileged users, which ensures that access to these directories cannot be gained through dynamic user ID -recycling. Symbolic links are created to hide this difference in behaviour. Both from perspective of the host -and from inside the unit, the relevant directories hence always appear directly below -/run, /var/lib, /var/cache and -/var/log. - -Use C to manage one or more runtime directories for the unit and bind -their lifetime to the daemon runtime. This is particularly useful for unprivileged daemons that cannot create -runtime directories in /run due to lack of privileges, and to make sure the runtime -directory is cleaned up automatically after use. For runtime directories that require more complex or different -configuration or lifetime guarantees, please consider using -L. +C accepts arbitrary textual data. C-style escapes for special +characters as well as the usual C<%>-specifiers are resolved. Each time this setting is used +the the specified text is appended to the per-unit data buffer, followed by a newline character (thus every use +appends a new line to the end of the buffer). Note that leading and trailing whitespace of lines configured +with this option is removed. If an empty line is specified the buffer is cleared (hence, in order to insert an +empty line, add an additional C<\\n> to the end or beginning of a line). -Example: if a system service unit has the following, +C accepts arbitrary binary data, encoded in Base64. No escape sequences or specifiers are +resolved. Any whitespace in the encoded version is ignored during decoding. - RuntimeDirectory=foo/bar baz +Note that C and C operate on the +same data buffer, and may be mixed in order to configure both binary and textual data for the same input +stream. The textual or binary data is joined strictly in the order the settings appear in the unit +file. Assigning an empty string to either will reset the data buffer. -the service manager creates /run/foo (if it does not exist), /run/foo/bar, -and /run/baz. The directories /run/foo/bar and /run/baz -except /run/foo are owned by the user and group specified in C and -C, and removed when the service is stopped. -', +Please keep in mind that in order to maintain readability long unit file settings may be split into +multiple lines, by suffixing each line (except for the last) with a C<\\> character (see +L for +details). This is particularly useful for large data configured with these two options. Example:', 'type' => 'leaf', 'value_type' => 'uniline' }, - 'ConfigurationDirectory', + 'StandardInputData', { - 'description' => 'These options take a whitespace-separated list of directory names. The specified directory -names must be relative, and may not include C<.> or C<..>. If set, one or more -directories by the specified names will be created (including their parents) below /run -(or C<$XDG_RUNTIME_DIR> for user services), /var/lib (or -C<$XDG_CONFIG_HOME> for user services), /var/cache (or -C<$XDG_CACHE_HOME> for user services), /var/log (or -C<$XDG_CONFIG_HOME>/log for user services), or /etc -(or C<$XDG_CONFIG_HOME> for user services), respectively, when the unit is started. - -In case of C the lowest subdirectories are removed when the unit is -stopped. It is possible to preserve the specified directories in this case if -C is configured to C or C -(see below). The directories specified with C, -C, C, -C are not removed when the unit is stopped. - -Except in case of C, the innermost specified directories will be -owned by the user and group specified in C and C. If the -specified directories already exist and their owning user or group do not match the configured ones, all files -and directories below the specified directories as well as the directories themselves will have their file -ownership recursively changed to match what is configured. As an optimization, if the specified directories are -already owned by the right user and group, files and directories below of them are left as-is, even if they do -not match what is requested. The innermost specified directories will have their access mode adjusted to the -what is specified in C, C, -C, C and -C. - -Except in case of C, these options imply -C for the specified paths. When combined with -C or C these paths always reside on the host and -are mounted from there into the unit\'s file system namespace. If C is used in -conjunction with C, C, -C and C, the behaviour of these options is -slightly altered: the directories are created below /run/private, -/var/lib/private, /var/cache/private and -/var/log/private, respectively, which are host directories made inaccessible to -unprivileged users, which ensures that access to these directories cannot be gained through dynamic user ID -recycling. Symbolic links are created to hide this difference in behaviour. Both from perspective of the host -and from inside the unit, the relevant directories hence always appear directly below -/run, /var/lib, /var/cache and -/var/log. + 'description' => 'Configures arbitrary textual or binary data to pass via file descriptor 0 (STDIN) to the +executed processes. These settings have no effect unless C is set to +C. Use this option to embed process input data directly in the unit file. -Use C to manage one or more runtime directories for the unit and bind -their lifetime to the daemon runtime. This is particularly useful for unprivileged daemons that cannot create -runtime directories in /run due to lack of privileges, and to make sure the runtime -directory is cleaned up automatically after use. For runtime directories that require more complex or different -configuration or lifetime guarantees, please consider using -L. +C accepts arbitrary textual data. C-style escapes for special +characters as well as the usual C<%>-specifiers are resolved. Each time this setting is used +the the specified text is appended to the per-unit data buffer, followed by a newline character (thus every use +appends a new line to the end of the buffer). Note that leading and trailing whitespace of lines configured +with this option is removed. If an empty line is specified the buffer is cleared (hence, in order to insert an +empty line, add an additional C<\\n> to the end or beginning of a line). -Example: if a system service unit has the following, +C accepts arbitrary binary data, encoded in Base64. No escape sequences or specifiers are +resolved. Any whitespace in the encoded version is ignored during decoding. - RuntimeDirectory=foo/bar baz +Note that C and C operate on the +same data buffer, and may be mixed in order to configure both binary and textual data for the same input +stream. The textual or binary data is joined strictly in the order the settings appear in the unit +file. Assigning an empty string to either will reset the data buffer. -the service manager creates /run/foo (if it does not exist), /run/foo/bar, -and /run/baz. The directories /run/foo/bar and /run/baz -except /run/foo are owned by the user and group specified in C and -C, and removed when the service is stopped. -', +Please keep in mind that in order to maintain readability long unit file settings may be split into +multiple lines, by suffixing each line (except for the last) with a C<\\> character (see +L for +details). This is particularly useful for large data configured with these two options. Example:', 'type' => 'leaf', 'value_type' => 'uniline' }, - 'RuntimeDirectoryMode', + 'LogLevelMax', { - 'description' => 'Specifies the access mode of the directories specified in -C, C, C, -C, or C, respectively, as an octal number. -Defaults to C<0755>. See "Permissions" in -L -for a discussion of the meaning of permission bits. -', + 'description' => 'Configures filtering by log level of log messages generated by this unit. Takes a +syslog log level, one of C (lowest log level, only highest priority +messages), C, C, C, C, +C, C, C (highest log level, also lowest priority +messages). See L for +details. By default no filtering is applied (i.e. the default maximum log level is C). Use +this option to configure the logging system to drop log messages of a specific service above the specified +level. For example, set CC in order to turn off debug logging +of a particularly chatty unit. Note that the the configured level is applied to any log messages written by any +of the processes belonging to this unit, sent via any supported logging protocol. The filtering is applied +early in the logging pipeline, before any kind of further processing is done. Moreover, messages which pass +through this filter successfully might still be dropped by filters applied at a later stage in the logging +subsystem. For example, C configured in +L might +prohibit messages of higher log levels to be stored on disk, even though the per-unit +C permitted it to be processed.', 'type' => 'leaf', 'value_type' => 'uniline' }, - 'StateDirectoryMode', - { - 'description' => 'Specifies the access mode of the directories specified in -C, C, C, -C, or C, respectively, as an octal number. -Defaults to C<0755>. See "Permissions" in -L -for a discussion of the meaning of permission bits. -', + 'LogExtraFields', + { + 'description' => 'Configures additional log metadata fields to include in all log records generated by processes +associated with this unit. This setting takes one or more journal field assignments in the format +C separated by whitespace. See +L for +details on the journal field concept. Even though the underlying journal implementation permits binary field +values, this setting accepts only valid UTF-8 values. To include space characters in a journal field value, +enclose the assignment in double quotes ("). The usual specifiers are expanded in all assignments (see +below). Note that this setting is not only useful for attaching additional metadata to log records of a unit, +but given that all fields and values are indexed may also be used to implement cross-unit log record +matching. Assign an empty string to reset the list.', 'type' => 'leaf', 'value_type' => 'uniline' }, - 'CacheDirectoryMode', + 'SyslogIdentifier', { - 'description' => 'Specifies the access mode of the directories specified in -C, C, C, -C, or C, respectively, as an octal number. -Defaults to C<0755>. See "Permissions" in -L -for a discussion of the meaning of permission bits. -', + 'description' => 'Sets the process name ("syslog tag") to prefix log lines sent to the logging +system or the kernel log buffer with. If not set, defaults to the process name of the executed process. This +option is only useful when C or C are set to +C, C or C (or to the same settings in +combination with C<+console>) and only applies to log messages written to stdout or +stderr.', 'type' => 'leaf', 'value_type' => 'uniline' }, - 'LogsDirectoryMode', + 'SyslogFacility', { - 'description' => 'Specifies the access mode of the directories specified in -C, C, C, -C, or C, respectively, as an octal number. -Defaults to C<0755>. See "Permissions" in -L -for a discussion of the meaning of permission bits. -', + 'description' => 'Sets the syslog facility identifier to use when logging. One of +C, C, C, C, +C, C, C, C, +C, C, C, C, +C, C, C, C, +C, C, C or C. See +L +for details. This option is only useful when C or +C are set to C, C or +C (or to the same settings in combination with C<+console>), and only applies +to log messages written to stdout or stderr. Defaults to C.', 'type' => 'leaf', 'value_type' => 'uniline' }, - 'ConfigurationDirectoryMode', + 'SyslogLevel', { - 'description' => 'Specifies the access mode of the directories specified in -C, C, C, -C, or C, respectively, as an octal number. -Defaults to C<0755>. See "Permissions" in -L -for a discussion of the meaning of permission bits. -', + 'description' => 'The default syslog log level to use when logging to the logging system or +the kernel log buffer. One of C, C, C, +C, C, C, C, +C. See L for +details. This option is only useful when C or +C are set to C, C or +C (or to the same settings in combination with C<+console>), and only applies +to log messages written to stdout or stderr. Note that individual lines output by executed processes may be +prefixed with a different log level which can be used to override the default log level specified here. The +interpretation of these prefixes may be disabled with C, see below. For +details, see L. +Defaults to C.', 'type' => 'leaf', 'value_type' => 'uniline' }, - 'RuntimeDirectoryPreserve', - { - 'choice' => [ - 'no', - 'yes', - 'restart' - ], - 'description' => 'Takes a boolean argument or C. -If set to C (the default), the directories specified in C -are always removed when the service stops. If set to C the directories are preserved -when the service is both automatically and manually restarted. Here, the automatic restart means the operation -specified in C, and manual restart means the one triggered by -systemctl restart foo.service. If set to C, then the directories are not -removed when the service is stopped. Note that since the runtime directory /run is a mount -point of C, then for system services the directories specified in -C are removed when the system is rebooted. -', - 'replace' => { - '0' => 'no', - '1' => 'yes', - 'false' => 'no', - 'true' => 'yes' - }, - 'type' => 'leaf', - 'value_type' => 'enum' - }, - 'MemoryDenyWriteExecute', + 'SyslogLevelPrefix', { - 'description' => 'Takes a boolean argument. If set, attempts to create memory mappings that are writable and -executable at the same time, or to change existing memory mappings to become executable, or mapping shared -memory segments as executable are prohibited. Specifically, a system call filter is added that rejects -L system calls with both -C and C set, -L system calls with -C set and -L system calls with -C set. Note that this option is incompatible with programs and libraries that -generate program code dynamically at runtime, including JIT execution engines, executable stacks, and code -"trampoline" feature of various C compilers. This option improves service security, as it makes harder for -software exploits to change running code dynamically. Note that this feature is fully available on x86-64, and -partially on x86. Specifically, the shmat() protection is not available on x86. Note that -on systems supporting multiple ABIs (such as x86/x86-64) it is recommended to turn off alternative ABIs for -services, so that they cannot be used to circumvent the restrictions of this option. Specifically, it is -recommended to combine this option with C or similar. If -running in user mode, or in system mode, but without the C capability -(e.g. setting C), C is implied.', + 'description' => 'Takes a boolean argument. If true and C or +C are set to C, C or +C (or to the same settings in combination with C<+console>), log lines +written by the executed process that are prefixed with a log level will be processed with this log level set +but the prefix removed. If set to false, the interpretation of these prefixes is disabled and the logged lines +are passed on as-is. This only applies to log messages written to stdout or stderr. For details about this +prefixing see L. +Defaults to true.', 'type' => 'leaf', 'value_type' => 'boolean', 'write_as' => [ @@ -2930,25 +2707,69 @@ 'yes' ] }, - 'RestrictRealtime', + 'TTYPath', { - 'description' => 'Takes a boolean argument. If set, any attempts to enable realtime scheduling in a process of -the unit are refused. This restricts access to realtime task scheduling policies such as -C, C or C. See -L for details about -these scheduling policies. If running in user mode, or in system mode, but -without the C capability -(e.g. setting C), C -is implied. Realtime scheduling policies may be used to monopolize CPU time for longer periods -of time, and may hence be used to lock up or otherwise trigger Denial-of-Service situations on the system. It -is hence recommended to restrict access to realtime scheduling to the few programs that actually require -them. Defaults to off.', + 'description' => 'Sets the terminal device node to use if standard input, output, or error are connected to a TTY +(see above). Defaults to /dev/console.', 'type' => 'leaf', - 'value_type' => 'boolean', - 'write_as' => [ - 'no', - 'yes' - ] + 'value_type' => 'uniline' + }, + 'TTYReset', + { + 'description' => 'Reset the terminal device specified with C before and after +execution. Defaults to C.', + 'type' => 'leaf', + 'value_type' => 'uniline' + }, + 'TTYVHangup', + { + 'description' => 'Disconnect all clients which have opened the terminal device specified with +C before and after execution. Defaults to C.', + 'type' => 'leaf', + 'value_type' => 'uniline' + }, + 'TTYVTDisallocate', + { + 'description' => 'If the terminal device specified with C is a virtual console +terminal, try to deallocate the TTY before and after execution. This ensures that the screen and scrollback +buffer is cleared. Defaults to C.', + 'type' => 'leaf', + 'value_type' => 'uniline' + }, + 'UtmpIdentifier', + { + 'description' => 'Takes a four character identifier string for an L and wtmp entry +for this service. This should only be set for services such as getty implementations (such +as L) where utmp/wtmp +entries must be created and cleared before and after execution, or for services that shall be executed as if +they were run by a getty process (see below). If the configured string is longer than four +characters, it is truncated and the terminal four characters are used. This setting interprets %I style string +replacements. This setting is unset by default, i.e. no utmp/wtmp entries are created or cleaned up for this +service.', + 'type' => 'leaf', + 'value_type' => 'uniline' + }, + 'UtmpMode', + { + 'choice' => [ + 'init', + 'login', + 'user' + ], + 'description' => 'Takes one of C, C or C. If +C is set, controls which type of L/wtmp entries +for this service are generated. This setting has no effect unless C is set +too. If C is set, only an C entry is generated and the +invoked process must implement a getty-compatible utmp/wtmp logic. If +C is set, first an C entry, followed by a +C entry is generated. In this case, the invoked process must implement a +L-compatible +utmp/wtmp logic. If C is set, first an C entry, then a +C entry and finally a C entry is +generated. In this case, the invoked process may be any process that is suitable to be run as session +leader. Defaults to C.', + 'type' => 'leaf', + 'value_type' => 'enum' } ], 'generated_by' => 'parse-man.pl from systemd doc', diff -Nru libconfig-model-systemd-perl-0.235.1/lib/Config/Model/models/Systemd/Common/Kill.pl libconfig-model-systemd-perl-0.236.1/lib/Config/Model/models/Systemd/Common/Kill.pl --- libconfig-model-systemd-perl-0.235.1/lib/Config/Model/models/Systemd/Common/Kill.pl 2017-10-14 19:05:04.000000000 +0000 +++ libconfig-model-systemd-perl-0.236.1/lib/Config/Model/models/Systemd/Common/Kill.pl 2018-01-03 14:01:19.000000000 +0000 @@ -1,7 +1,7 @@ # # This file is part of Config-Model-Systemd # -# This software is Copyright (c) 2015-2017 by Dominique Dumont. +# This software is Copyright (c) 2015-2018 by Dominique Dumont. # # This is free software, licensed under: # diff -Nru libconfig-model-systemd-perl-0.235.1/lib/Config/Model/models/Systemd/Common/ResourceControl.pl libconfig-model-systemd-perl-0.236.1/lib/Config/Model/models/Systemd/Common/ResourceControl.pl --- libconfig-model-systemd-perl-0.235.1/lib/Config/Model/models/Systemd/Common/ResourceControl.pl 2017-10-14 19:05:04.000000000 +0000 +++ libconfig-model-systemd-perl-0.236.1/lib/Config/Model/models/Systemd/Common/ResourceControl.pl 2018-01-03 14:01:19.000000000 +0000 @@ -1,7 +1,7 @@ # # This file is part of Config-Model-Systemd # -# This software is Copyright (c) 2015-2017 by Dominique Dumont. +# This software is Copyright (c) 2015-2018 by Dominique Dumont. # # This is free software, licensed under: # @@ -601,13 +601,32 @@ }, 'Delegate', { - 'description' => 'Turns on delegation of further resource control -partitioning to processes of the unit. For unprivileged -services (i.e. those using the C -setting), this allows processes to create a subhierarchy -beneath its control group path. For privileged services and -scopes, this ensures the processes will have all control -group controllers enabled.', + 'description' => 'Turns on delegation of further resource control partitioning to processes of the unit. Units where this +is enabled may create and manage their own private subhierarchy of control groups below the control group of +the unit itself. For unprivileged services (i.e. those using the C setting) the unit\'s +control group will be made accessible to the relevant user. When enabled the service manager will refrain +from manipulating control groups or moving processes below the unit\'s control group, so that a clear concept +of ownership is established: the control group tree above the unit\'s control group (i.e. towards the root +control group) is owned and managed by the service manager of the host, while the control group tree below +the unit\'s control group is owned and managed by the unit itself. Takes either a boolean argument or a list +of control group controller names. If true, delegation is turned on, and all supported controllers are +enabled for the unit, making them available to the unit\'s processes for management. If false, delegation is +turned off entirely (and no additional controllers are enabled). If set to a list of controllers, delegation +is turned on, and the specified controllers are enabled for the unit. Note that additional controllers than +the ones specified might be made available as well, depending on configuration of the containing slice unit +or other units contained in it. Note that assigning the empty string will enable delegation, but reset the +list of controllers, all assignments prior to this will have no effect. Defaults to false. + +Note that controller delegation to less privileged code is only safe on the unified control group +hierarchy. Accordingly, access to the specified controllers will not be granted to unprivileged services on +the legacy hierarchy, even when requested. + +The following controller names may be specified: C, C, +C, C, C, C, +C. Not all of these controllers are available on all kernels however, and some are +specific to the unified hierarchy while others are specific to the legacy hierarchy. Also note that the +kernel might support further controllers, which aren\'t covered here yet as delegation is either not supported +at all for them or not defined cleanly.', 'type' => 'leaf', 'value_type' => 'uniline' }, diff -Nru libconfig-model-systemd-perl-0.235.1/lib/Config/Model/models/Systemd/CommonElements.pl libconfig-model-systemd-perl-0.236.1/lib/Config/Model/models/Systemd/CommonElements.pl --- libconfig-model-systemd-perl-0.235.1/lib/Config/Model/models/Systemd/CommonElements.pl 2017-10-14 19:05:04.000000000 +0000 +++ libconfig-model-systemd-perl-0.236.1/lib/Config/Model/models/Systemd/CommonElements.pl 2018-01-03 14:01:19.000000000 +0000 @@ -1,7 +1,7 @@ # # This file is part of Config-Model-Systemd # -# This software is Copyright (c) 2015-2017 by Dominique Dumont. +# This software is Copyright (c) 2015-2018 by Dominique Dumont. # # This is free software, licensed under: # diff -Nru libconfig-model-systemd-perl-0.235.1/lib/Config/Model/models/Systemd/Section/Install.pl libconfig-model-systemd-perl-0.236.1/lib/Config/Model/models/Systemd/Section/Install.pl --- libconfig-model-systemd-perl-0.235.1/lib/Config/Model/models/Systemd/Section/Install.pl 2017-10-14 19:05:04.000000000 +0000 +++ libconfig-model-systemd-perl-0.236.1/lib/Config/Model/models/Systemd/Section/Install.pl 2018-01-03 14:01:19.000000000 +0000 @@ -1,7 +1,7 @@ # # This file is part of Config-Model-Systemd # -# This software is Copyright (c) 2015-2017 by Dominique Dumont. +# This software is Copyright (c) 2015-2018 by Dominique Dumont. # # This is free software, licensed under: # diff -Nru libconfig-model-systemd-perl-0.235.1/lib/Config/Model/models/Systemd/Section/Service.pl libconfig-model-systemd-perl-0.236.1/lib/Config/Model/models/Systemd/Section/Service.pl --- libconfig-model-systemd-perl-0.235.1/lib/Config/Model/models/Systemd/Section/Service.pl 2017-10-14 19:05:04.000000000 +0000 +++ libconfig-model-systemd-perl-0.236.1/lib/Config/Model/models/Systemd/Section/Service.pl 2018-01-03 14:01:19.000000000 +0000 @@ -1,7 +1,7 @@ # # This file is part of Config-Model-Systemd # -# This software is Copyright (c) 2015-2017 by Dominique Dumont. +# This software is Copyright (c) 2015-2018 by Dominique Dumont. # # This is free software, licensed under: # @@ -370,7 +370,9 @@ start-up failed, for example because any of the commands specified in C, C or C failed (and weren\'t prefixed with C<->, see above) or timed out. Use C to invoke commands when a -service failed to start up correctly and is shut down again. +service failed to start up correctly and is shut down again. Also note that, service restart requests are +implemented as stop operations followed by start operations. This means that C and +C are executed during a service restart operation. It is recommended to use this setting for commands that communicate with the service requesting clean termination. When the commands specified with this option are executed it should be assumed that the service is @@ -416,24 +418,32 @@ }, 'TimeoutStartSec', { - 'description' => 'Configures the time to wait for start-up. If a + 'description' => "Configures the time to wait for start-up. If a daemon service does not signal start-up completion within the configured time, the service will be considered failed and will be shut down again. Takes a unit-less value in seconds, -or a time span value such as "5min 20s". Pass +or a time span value such as \"5min 20s\". Pass C to disable the timeout logic. Defaults to C from the manager configuration file, except when C is used, in which case the timeout is disabled by default (see L). -', + +If a service of C sends C, this may cause +the start time to be extended beyond C. The first receipt of this message +must occur before C is exceeded, and once the start time has exended beyond +C, the service manager will allow the service to continue to start, provided +the service repeats C within the interval specified until the service +startup status is finished by C. (see +L). +", 'type' => 'leaf', 'value_type' => 'uniline' }, 'TimeoutStopSec', { - 'description' => 'Configures the time to wait for stop. If a + 'description' => "Configures the time to wait for stop. If a service is asked to stop, but does not terminate in the specified time, it will be terminated forcibly via C, and after another timeout of @@ -441,12 +451,19 @@ C in L). Takes a unit-less value in seconds, or a time span value such -as "5min 20s". Pass C to disable the +as \"5min 20s\". Pass C to disable the timeout logic. Defaults to C from the manager configuration file (see L). -', + +If a service of C sends C, this may cause +the stop time to be extended beyond C. The first receipt of this message +must occur before C is exceeded, and once the stop time has exended beyond +C, the service manager will allow the service to continue to stop, provided +the service repeats C within the interval specified, or terminates itself +(see L). +", 'type' => 'leaf', 'value_type' => 'uniline' }, @@ -461,11 +478,20 @@ }, 'RuntimeMaxSec', { - 'description' => 'Configures a maximum time for the service to run. If this is used and the service has been + 'description' => "Configures a maximum time for the service to run. If this is used and the service has been active for longer than the specified time it is terminated and put into a failure state. Note that this setting does not have any effect on C services, as they terminate immediately after activation completed. Pass C (the default) to configure no runtime -limit.', +limit. + +If a service of C sends C, this may cause +the runtime to be extended beyond C. The first receipt of this message +must occur before C is exceeded, and once the runtime has exended beyond +C, the service manager will allow the service to continue to run, provided +the service repeats C within the interval specified until the service +shutdown is acheived by C (or termination). (see +L). +", 'type' => 'leaf', 'value_type' => 'uniline' }, @@ -764,15 +790,6 @@ 'type' => 'leaf', 'value_type' => 'uniline' }, - 'FailureAction', - { - 'description' => 'Configure the action to take when the service enters a failed state. Takes the same values as -the unit setting C and executes the same actions (see -L). Defaults to -C. ', - 'type' => 'leaf', - 'value_type' => 'uniline' - }, 'FileDescriptorStoreMax', { 'description' => 'Configure how many file descriptors may be stored in the service manager for the service using diff -Nru libconfig-model-systemd-perl-0.235.1/lib/Config/Model/models/Systemd/Section/Service.pod libconfig-model-systemd-perl-0.236.1/lib/Config/Model/models/Systemd/Section/Service.pod --- libconfig-model-systemd-perl-0.235.1/lib/Config/Model/models/Systemd/Section/Service.pod 2017-10-14 19:05:04.000000000 +0000 +++ libconfig-model-systemd-perl-0.236.1/lib/Config/Model/models/Systemd/Section/Service.pod 2018-01-03 14:01:19.000000000 +0000 @@ -532,13 +532,32 @@ =head2 Delegate -Turns on delegation of further resource control -partitioning to processes of the unit. For unprivileged -services (i.e. those using the C -setting), this allows processes to create a subhierarchy -beneath its control group path. For privileged services and -scopes, this ensures the processes will have all control -group controllers enabled. I< Optional. Type uniline. > +Turns on delegation of further resource control partitioning to processes of the unit. Units where this +is enabled may create and manage their own private subhierarchy of control groups below the control group of +the unit itself. For unprivileged services (i.e. those using the C setting) the unit's +control group will be made accessible to the relevant user. When enabled the service manager will refrain +from manipulating control groups or moving processes below the unit's control group, so that a clear concept +of ownership is established: the control group tree above the unit's control group (i.e. towards the root +control group) is owned and managed by the service manager of the host, while the control group tree below +the unit's control group is owned and managed by the unit itself. Takes either a boolean argument or a list +of control group controller names. If true, delegation is turned on, and all supported controllers are +enabled for the unit, making them available to the unit's processes for management. If false, delegation is +turned off entirely (and no additional controllers are enabled). If set to a list of controllers, delegation +is turned on, and the specified controllers are enabled for the unit. Note that additional controllers than +the ones specified might be made available as well, depending on configuration of the containing slice unit +or other units contained in it. Note that assigning the empty string will enable delegation, but reset the +list of controllers, all assignments prior to this will have no effect. Defaults to false. + +Note that controller delegation to less privileged code is only safe on the unified control group +hierarchy. Accordingly, access to the specified controllers will not be granted to unprivileged services on +the legacy hierarchy, even when requested. + +The following controller names may be specified: C, C, +C, C, C, C, +C. Not all of these controllers are available on all kernels however, and some are +specific to the unified hierarchy while others are specific to the legacy hierarchy. Also note that the +kernel might support further controllers, which aren't covered here yet as delegation is either not supported +at all for them or not defined cleanly. I< Optional. Type uniline. > =head2 CPUShares @@ -764,11 +783,55 @@ the service with a private, minimal version of /dev/, combine this option with C. I< Optional. Type boolean. > +=head2 BindPaths + +Configures unit-specific bind mounts. A bind mount makes a particular file or directory +available at an additional place in the unit's view of the file system. Any bind mounts created with this +option are specific to the unit, and are not visible in the host's mount table. This option expects a +whitespace separated list of bind mount definitions. Each definition consists of a colon-separated triple of +source path, destination path and option string, where the latter two are optional. If only a source path is +specified the source and destination is taken to be the same. The option string may be either +C or C for configuring a recursive or non-recursive bind +mount. If the destination path is omitted, the option string must be omitted too. + +C creates regular writable bind mounts (unless the source file system mount +is already marked read-only), while C creates read-only bind mounts. These +settings may be used more than once, each usage appends to the unit's list of bind mounts. If the empty string +is assigned to either of these two options the entire list of bind mounts defined prior to this is reset. Note +that in this case both read-only and regular bind mounts are reset, regardless which of the two settings is +used. + +This option is particularly useful when C/C +is used. In this case the source path refers to a path on the host file system, while the destination path +refers to a path below the root directory of the unit. I< Optional. Type list of uniline. > + +=head2 BindReadOnlyPaths + +Configures unit-specific bind mounts. A bind mount makes a particular file or directory +available at an additional place in the unit's view of the file system. Any bind mounts created with this +option are specific to the unit, and are not visible in the host's mount table. This option expects a +whitespace separated list of bind mount definitions. Each definition consists of a colon-separated triple of +source path, destination path and option string, where the latter two are optional. If only a source path is +specified the source and destination is taken to be the same. The option string may be either +C or C for configuring a recursive or non-recursive bind +mount. If the destination path is omitted, the option string must be omitted too. + +C creates regular writable bind mounts (unless the source file system mount +is already marked read-only), while C creates read-only bind mounts. These +settings may be used more than once, each usage appends to the unit's list of bind mounts. If the empty string +is assigned to either of these two options the entire list of bind mounts defined prior to this is reset. Note +that in this case both read-only and regular bind mounts are reset, regardless which of the two settings is +used. + +This option is particularly useful when C/C +is used. In this case the source path refers to a path on the host file system, while the destination path +refers to a path below the root directory of the unit. I< Optional. Type list of uniline. > + =head2 User Set the UNIX user or group that the processes are executed as, respectively. Takes a single -user or group name, or a numeric ID as argument. For system services (services run by the system service manager, -i.e. managed by PID 1) and for user services of the root user (services managed by root's instance of +user or group name, or a numeric ID as argument. For system services (services run by the system service +manager, i.e. managed by PID 1) and for user services of the root user (services managed by root's instance of systemd --user), the default is C, but C may be used to specify a different user. For user services of any other user, switching user identity is not permitted, hence the only valid setting is the same user the user's service manager is running as. If no group @@ -793,8 +856,8 @@ =head2 Group Set the UNIX user or group that the processes are executed as, respectively. Takes a single -user or group name, or a numeric ID as argument. For system services (services run by the system service manager, -i.e. managed by PID 1) and for user services of the root user (services managed by root's instance of +user or group name, or a numeric ID as argument. For system services (services run by the system service +manager, i.e. managed by PID 1) and for user services of the root user (services managed by root's instance of systemd --user), the default is C, but C may be used to specify a different user. For user services of any other user, switching user identity is not permitted, hence the only valid setting is the same user the user's service manager is running as. If no group @@ -828,7 +891,10 @@ enabled for a unit, the name of the dynamic user/group is implicitly derived from the unit name. If the unit name without the type suffix qualifies as valid user name it is used directly, otherwise a name incorporating a hash of it is used. If a statically allocated user or group of the configured name already exists, it is used -and no dynamic user/group is allocated. Dynamic users/groups are allocated from the UID/GID range +and no dynamic user/group is allocated. Note that if C is specified and the static group +with the name exists, then it is required that the static user with the name already exists. Similarly, if +C is specified and the static user with the name exists, then it is required that the +static group with the name already exists. Dynamic users/groups are allocated from the UID/GID range 61184…65519. It is recommended to avoid this range for regular system or login users. At any point in time each UID/GID from this range is only assigned to zero or one dynamically allocated users/groups in use. However, UID/GIDs are recycled after a unit is terminated. Care should be taken that any processes running @@ -852,505 +918,137 @@ =head2 SupplementaryGroups -Sets the supplementary Unix groups the -processes are executed as. This takes a space-separated list -of group names or IDs. This option may be specified more than -once, in which case all listed groups are set as supplementary -groups. When the empty string is assigned, the list of -supplementary groups is reset, and all assignments prior to -this one will have no effect. In any way, this option does not -override, but extends the list of supplementary groups -configured in the system group database for the -user. This does not affect commands prefixed with C<+>. I< Optional. Type list of uniline. > - -=head2 RemoveIPC - -Takes a boolean parameter. If set, all System V and POSIX IPC objects owned by the user and -group the processes of this unit are run as are removed when the unit is stopped. This setting only has an -effect if at least one of C, C and -C are used. It has no effect on IPC objects owned by the root user. Specifically, -this removes System V semaphores, as well as System V and POSIX shared memory segments and message queues. If -multiple units use the same user or group the IPC objects are removed when the last of these units is -stopped. This setting is implied if C is set. I< Optional. Type boolean. > - -=head2 Nice - -Sets the default nice level (scheduling -priority) for executed processes. Takes an integer between -20 -(highest priority) and 19 (lowest priority). See -L -for details. I< Optional. Type integer. > - -=head2 OOMScoreAdjust - -Sets the adjustment level for the -Out-Of-Memory killer for executed processes. Takes an integer -between -1000 (to disable OOM killing for this process) and -1000 (to make killing of this process under memory pressure -very likely). See proc.txt -for details. I< Optional. Type integer. > - -=head2 IOSchedulingClass - -Sets the I/O scheduling class for executed -processes. Takes an integer between 0 and 3 or one of the -strings C, C, -C or C. See -L -for details. I< Optional. Type enum. choice: '0', '1', '2', '3', 'none', 'realtime', 'best-effort', 'idle'. > - -=head2 IOSchedulingPriority - -Sets the I/O scheduling priority for executed -processes. Takes an integer between 0 (highest priority) and 7 -(lowest priority). The available priorities depend on the -selected I/O scheduling class (see above). See -L -for details. I< Optional. Type integer. > - -=head2 CPUSchedulingPolicy - -Sets the CPU scheduling policy for executed -processes. Takes one of -C, -C, -C, -C or -C. See -L -for details. I< Optional. Type enum. choice: 'other', 'batch', 'idle', 'fifo', 'rr'. > - -=head2 CPUSchedulingPriority - -Sets the CPU scheduling priority for executed -processes. The available priority range depends on the -selected CPU scheduling policy (see above). For real-time -scheduling policies an integer between 1 (lowest priority) and -99 (highest priority) can be used. See -L -for details. I< Optional. Type uniline. > - -=head2 CPUSchedulingResetOnFork - -Takes a boolean argument. If true, elevated -CPU scheduling priorities and policies will be reset when the -executed processes fork, and can hence not leak into child -processes. See -L -for details. Defaults to false. I< Optional. Type boolean. > - -=head2 CPUAffinity - -Controls the CPU affinity of the executed -processes. Takes a list of CPU indices or ranges separated by -either whitespace or commas. CPU ranges are specified by the -lower and upper CPU indices separated by a dash. -This option may be specified more than once, in which case the -specified CPU affinity masks are merged. If the empty string -is assigned, the mask is reset, all assignments prior to this -will have no effect. See -L -for details. I< Optional. Type list of uniline. > - -=head2 UMask - -Controls the file mode creation mask. Takes an -access mode in octal notation. See -L -for details. Defaults to 0022. I< Optional. Type uniline. > - -=head2 Environment - -Sets environment variables for executed -processes. Takes a space-separated list of variable -assignments. This option may be specified more than once, in -which case all listed variables will be set. If the same -variable is set twice, the later setting will override the -earlier setting. If the empty string is assigned to this -option, the list of environment variables is reset, all prior -assignments have no effect. Variable expansion is not -performed inside the strings, however, specifier expansion is -possible. The $ character has no special meaning. If you need -to assign a value containing spaces or the equals sign to a variable, use double -quotes (") for the assignment. - -Example: - - Environment="VAR1=word1 word2" VAR2=word3 "VAR3=$word 5 6" - -gives three variables C, -C, C -with the values C, -C, C<$word 5 6>. - -See -L -for details about environment variables. I< Optional. Type list of uniline. > - -=head2 EnvironmentFile - -Similar to C but -reads the environment variables from a text file. The text -file should contain new-line-separated variable assignments. -Empty lines, lines without an C<=> separator, -or lines starting with ; or # will be ignored, -which may be used for commenting. A line ending with a -backslash will be concatenated with the following one, -allowing multiline variable definitions. The parser strips -leading and trailing whitespace from the values of -assignments, unless you use double quotes ("). - -The argument passed should be an absolute filename or -wildcard expression, optionally prefixed with -C<->, which indicates that if the file does -not exist, it will not be read and no error or warning message -is logged. This option may be specified more than once in -which case all specified files are read. If the empty string -is assigned to this option, the list of file to read is reset, -all prior assignments have no effect. - -The files listed with this directive will be read -shortly before the process is executed (more specifically, -after all processes from a previous unit state terminated. -This means you can generate these files in one unit state, and -read it with this option in the next). - -Settings from these -files override settings made with -C. If the same variable is set -twice from these files, the files will be read in the order -they are specified and the later setting will override the -earlier setting. I< Optional. Type list of uniline. > - -=head2 PassEnvironment - -Pass environment variables set for the system service manager to executed processes. Takes a -space-separated list of variable names. This option may be specified more than once, in which case all listed -variables will be passed. If the empty string is assigned to this option, the list of environment variables to -pass is reset, all prior assignments have no effect. Variables specified that are not set for the system -manager will not be passed and will be silently ignored. Note that this option is only relevant for the system -service manager, as system services by default do not automatically inherit any environment variables set for -the service manager itself. However, in case of the user service manager all environment variables are passed -to the executed processes anyway, hence this option is without effect for the user service manager. - -Variables set for invoked processes due to this setting are subject to being overridden by those -configured with C or C. - -Example: - - PassEnvironment=VAR1 VAR2 VAR3 - -passes three variables C, -C, C -with the values set for those variables in PID1. - -See -L -for details about environment variables. I< Optional. Type list of uniline. > - -=head2 UnsetEnvironment - -Explicitly unset environment variable assignments that would normally be passed from the -service manager to invoked processes of this unit. Takes a space-separated list of variable names or variable -assignments. This option may be specified more than once, in which case all listed variables/assignments will -be unset. If the empty string is assigned to this option, the list of environment variables/assignments to -unset is reset. If a variable assignment is specified (that is: a variable name, followed by -C<=>, followed by its value), then any environment variable matching this precise assignment is -removed. If a variable name is specified (that is a variable name without any following C<=> or -value), then any assignment matching the variable name, regardless of its value is removed. Note that the -effect of C is applied as final step when the environment list passed to -executed processes is compiled. That means it may undo assignments from any configuration source, including -assignments made through C or C, inherited from -the system manager's global set of environment variables, inherited via C, -set by the service manager itself (such as C<$NOTIFY_SOCKET> and such), or set by a PAM module -(in case C is used). - -See -L -for details about environment variables. I< Optional. Type list of uniline. > - -=head2 StandardInput - -Controls where file descriptor 0 (STDIN) of -the executed processes is connected to. Takes one of -C, -C, -C, -C, -C or -C. - -If C is selected, standard input -will be connected to /dev/null, i.e. all -read attempts by the process will result in immediate -EOF. - -If C is selected, standard input is -connected to a TTY (as configured by -C, see below) and the executed -process becomes the controlling process of the terminal. If -the terminal is already being controlled by another process, -the executed process waits until the current controlling -process releases the terminal. - -C is similar to -C, but the executed process is forcefully -and immediately made the controlling process of the terminal, -potentially removing previous controlling processes from the -terminal. - -C is similar to -C but if the terminal already has a -controlling process start-up of the executed process -fails. - -The C option is only valid in -socket-activated services, and only when the socket -configuration file (see -L -for details) specifies a single socket only. If this option is -set, standard input will be connected to the socket the -service was activated from, which is primarily useful for -compatibility with daemons designed for use with the -traditional -L -daemon. - -The C option connects -the input stream to a single file descriptor provided by a socket unit. -A custom named file descriptor can be specified as part of this option, -after a C<:> (e.g. C). -If no name is specified, C is assumed -(i.e. C is equivalent to C). -At least one socket unit defining such name must be explicitly provided via the -C option, and file descriptor name may differ -from the name of its containing socket unit. -If multiple matches are found, the first one will be used. -See C in -L -for more details about named descriptors and ordering. - -This setting defaults to -C. I< Optional. Type enum. choice: 'null', 'tty', 'tty-force', 'tty-fail', 'socket', 'fd'. > - -=head2 StandardOutput - -Controls where file descriptor 1 (STDOUT) of -the executed processes is connected to. Takes one of -C, -C, -C, -C, -C, -C, -C, -C, -C, -C or -C. - -C duplicates the file descriptor -of standard input for standard output. - -C connects standard output to -/dev/null, i.e. everything written to it -will be lost. - -C connects standard output to a tty -(as configured via C, see below). If -the TTY is used for output only, the executed process will not -become the controlling process of the terminal, and will not -fail or wait for other processes to release the -terminal. - -C connects standard output with -the journal which is accessible via -L. -Note that everything that is written to syslog or kmsg (see -below) is implicitly stored in the journal as well, the -specific two options listed below are hence supersets of this -one. - -C connects standard output to the -L -system syslog service, in addition to the journal. Note that -the journal daemon is usually configured to forward everything -it receives to syslog anyway, in which case this option is no -different from C. +Sets the supplementary Unix groups the processes are executed as. This takes a space-separated +list of group names or IDs. This option may be specified more than once, in which case all listed groups are +set as supplementary groups. When the empty string is assigned, the list of supplementary groups is reset, and +all assignments prior to this one will have no effect. In any way, this option does not override, but extends +the list of supplementary groups configured in the system group database for the user. This does not affect +commands prefixed with C<+>. I< Optional. Type list of uniline. > -C connects standard output with the -kernel log buffer which is accessible via -L, -in addition to the journal. The journal daemon might be -configured to send all logs to kmsg anyway, in which case this -option is no different from C. - -C, -C and -C work in a similar way as the -three options above but copy the output to the system console -as well. - -C connects standard output to a -socket acquired via socket activation. The semantics are -similar to the same option of -C. - -The C option connects -the output stream to a single file descriptor provided by a socket unit. -A custom named file descriptor can be specified as part of this option, -after a C<:> (e.g. C). -If no name is specified, C is assumed -(i.e. C is equivalent to C). -At least one socket unit defining such name must be explicitly provided via the -C option, and file descriptor name may differ -from the name of its containing socket unit. -If multiple matches are found, the first one will be used. -See C in -L -for more details about named descriptors and ordering. +=head2 PAMName -If the standard output (or error output, see below) of a unit is connected to the journal, syslog or the -kernel log buffer, the unit will implicitly gain a dependency of type C on -systemd-journald.socket (also see the "Implicit Dependencies" section above). +Sets the PAM service name to set up a session as. If set, the executed process will be +registered as a PAM session under the specified service name. This is only useful in conjunction with the +C setting, and is otherwise ignored. If not set, no PAM session will be opened for the +executed processes. See L for +details. -This setting defaults to the value set with -C in -L, -which defaults to C. Note that setting -this parameter might result in additional dependencies to be -added to the unit (see above). I< Optional. Type enum. choice: 'inherit', 'null', 'tty', 'journal', 'syslog', 'kmsg', 'journal+console', 'syslog+console', 'kmsg+console', 'socket', 'fd'. > +Note that for each unit making use of this option a PAM session handler process will be maintained as +part of the unit and stays around as long as the unit is active, to ensure that appropriate actions can be +taken when the unit and hence the PAM session terminates. This process is named C<(sd-pam)> and +is an immediate child process of the unit's main process. -=head2 StandardError +Note that when this option is used for a unit it is very likely (depending on PAM configuration) that the +main unit process will be migrated to its own session scope unit when it is activated. This process will hence +be associated with two units: the unit it was originally started from (and for which +C was configured), and the session scope unit. Any child processes of that process +will however be associated with the session scope unit only. This has implications when used in combination +with CC, as these child processes will not be able to affect +changes in the original unit through notification messages. These messages will be considered belonging to the +session scope unit and not the original unit. It is hence not recommended to use C in +combination with CC. I< Optional. Type uniline. > -Controls where file descriptor 2 (STDERR) of -the executed processes is connected to. The available options -are identical to those of C, -with some exceptions: if set to C the -file descriptor used for standard output is duplicated for -standard error, while C operates on the error -stream and will look by default for a descriptor named -C. +=head2 CapabilityBoundingSet -This setting defaults to the value set with -C in -L, -which defaults to C. Note that setting -this parameter might result in additional dependencies to be -added to the unit (see above). I< Optional. Type uniline. > +Controls which capabilities to include in the capability bounding set for the executed +process. See L for +details. Takes a whitespace-separated list of capability names, e.g. C, +C, C. Capabilities listed will be +included in the bounding set, all others are removed. If the list of capabilities is prefixed with +C<~>, all but the listed capabilities will be included, the effect of the assignment +inverted. Note that this option also affects the respective capabilities in the effective, permitted and +inheritable capability sets. If this option is not used, the capability bounding set is not modified on process +execution, hence no limits on the capabilities of the process are enforced. This option may appear more than +once, in which case the bounding sets are merged by C, or by C if +the lines are prefixed with C<~> (see below). If the empty string is assigned to this option, +the bounding set is reset to the empty capability set, and all prior settings have no effect. If set to +C<~> (without any further argument), the bounding set is reset to the full set of available +capabilities, also undoing any previous settings. This does not affect commands prefixed with +C<+>. -=head2 TTYPath +Example: if a unit has the following, -Sets the terminal device node to use if -standard input, output, or error are connected to a TTY (see -above). Defaults to -/dev/console. I< Optional. Type uniline. > + CapabilityBoundingSet=CAP_A CAP_B + CapabilityBoundingSet=CAP_B CAP_C -=head2 TTYReset +then C, C, and C are set. +If the second line is prefixed with C<~>, e.g., -Reset the terminal device specified with -C before and after execution. -Defaults to C. I< Optional. Type uniline. > + CapabilityBoundingSet=CAP_A CAP_B + CapabilityBoundingSet=~CAP_B CAP_C -=head2 TTYVHangup +then, only C is set. I< Optional. Type uniline. > -Disconnect all clients which have opened the -terminal device specified with C -before and after execution. Defaults to -C. I< Optional. Type uniline. > +=head2 AmbientCapabilities -=head2 TTYVTDisallocate +Controls which capabilities to include in the ambient capability set for the executed +process. Takes a whitespace-separated list of capability names, e.g. C, +C, C. This option may appear more than +once in which case the ambient capability sets are merged (see the above examples in +C). If the list of capabilities is prefixed with C<~>, +all but the listed capabilities will be included, the effect of the assignment inverted. If the empty string is +assigned to this option, the ambient capability set is reset to the empty capability set, and all prior +settings have no effect. If set to C<~> (without any further argument), the ambient capability +set is reset to the full set of available capabilities, also undoing any previous settings. Note that adding +capabilities to ambient capability set adds them to the process's inherited capability set. + +Ambient capability sets are useful if you want to execute a process as a non-privileged user but still want to +give it some capabilities. Note that in this case option C is automatically added +to C to retain the capabilities over the user +change. C does not affect commands prefixed with +C<+>. I< Optional. Type uniline. > -If the terminal device specified with -C is a virtual console terminal, try -to deallocate the TTY before and after execution. This ensures -that the screen and scrollback buffer is cleared. Defaults to -C. I< Optional. Type uniline. > +=head2 NoNewPrivileges -=head2 SyslogIdentifier +Takes a boolean argument. If true, ensures that the service process and all its children can +never gain new privileges through execve() (e.g. via setuid or setgid bits, or filesystem +capabilities). This is the simplest and most effective way to ensure that a process and its children can never +elevate privileges again. Defaults to false, but certain settings force C, +ignoring the value of this setting. This is the case when C, +C, C, +C, C, +C, C, +C, or C are specified. Also see +No New Privileges +Flag. I< Optional. Type boolean. > -Sets the process name to prefix log lines sent -to the logging system or the kernel log buffer with. If not -set, defaults to the process name of the executed process. -This option is only useful when -C or -C are set to -C, C or -C (or to the same settings in combination -with C<+console>). I< Optional. Type uniline. > +=head2 SecureBits -=head2 SyslogFacility +Controls the secure bits set for the executed process. Takes a space-separated combination of +options from the following list: C, C, +C, C, C, and +C. This option may appear more than once, in which case the secure bits are +ORed. If the empty string is assigned to this option, the bits are reset to 0. This does not affect commands +prefixed with C<+>. See L for +details. I< Optional. Type uniline. > -Sets the syslog facility to use when logging -to syslog. One of C, -C, C, -C, C, -C, C, -C, C, -C, C, -C, C, -C, C, -C, C, -C, C or -C. See -L -for details. This option is only useful when -C or -C are set to -C. Defaults to -C. I< Optional. Type uniline. > +=head2 SELinuxContext -=head2 SyslogLevel +Set the SELinux security context of the executed process. If set, this will override the +automated domain transition. However, the policy still needs to authorize the transition. This directive is +ignored if SELinux is disabled. If prefixed by C<->, all errors will be ignored. This does not +affect commands prefixed with C<+>. See L for +details. I< Optional. Type uniline. > -The default syslog level to use when logging to -syslog or the kernel log buffer. One of -C, -C, -C, -C, -C, -C, -C, -C. See -L -for details. This option is only useful when -C or -C are set to -C or C. Note that -individual lines output by the daemon might be prefixed with a -different log level which can be used to override the default -log level specified here. The interpretation of these prefixes -may be disabled with C, -see below. For details, see -L. -Defaults to -C. I< Optional. Type uniline. > +=head2 AppArmorProfile -=head2 SyslogLevelPrefix +Takes a profile name as argument. The process executed by the unit will switch to this profile +when started. Profiles must already be loaded in the kernel, or the unit will fail. This result in a non +operation if AppArmor is not enabled. If prefixed by C<->, all errors will be ignored. This +does not affect commands prefixed with C<+>. I< Optional. Type uniline. > -Takes a boolean argument. If true and -C or -C are set to -C, C or -C, log lines written by the executed -process that are prefixed with a log level will be passed on -to syslog with this log level set but the prefix removed. If -set to false, the interpretation of these prefixes is disabled -and the logged lines are passed on as-is. For details about -this prefixing see -L. -Defaults to true. I< Optional. Type boolean. > +=head2 SmackProcessLabel -=head2 TimerSlackNSec +Takes a C security label as argument. The process executed by the unit +will be started under this label and SMACK will decide whether the process is allowed to run or not, based on +it. The process will continue to run under the label specified here unless the executable has its own +C label, in which case the process will transition to run under that label. When not +specified, the label that systemd is running under is used. This directive is ignored if SMACK is +disabled. -Sets the timer slack in nanoseconds for the -executed processes. The timer slack controls the accuracy of -wake-ups triggered by timers. See -L -for more information. Note that in contrast to most other time -span definitions this parameter takes an integer value in -nano-seconds if no unit is specified. The usual time units are -understood too. I< Optional. Type uniline. > +The value may be prefixed by C<->, in which case all errors will be ignored. An empty +value may be specified to unset previous assignments. This does not affect commands prefixed with +C<+>. I< Optional. Type uniline. > =head2 LimitCPU @@ -1358,10 +1056,10 @@ L for details on the resource limit concept. Resource limits may be specified in two formats: either as single value to set a specific soft and hard limit to the same value, or as colon-separated pair C to set -both limits individually (e.g. C). Use the string C -to configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base -1024) may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time -values, the usual time units ms, s, min, h and so on may be used (see +both limits individually (e.g. C). Use the string C to +configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base 1024) +may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time values, +the usual time units ms, s, min, h and so on may be used (see L for details). Note that if no time unit is specified for C the default unit of seconds is implied, while for C the default unit of microseconds is implied. Also, note @@ -1372,19 +1070,14 @@ prefixed like this the value is understood as raw resource limit parameter in the range 0..40 (with 0 being equivalent to 1). -Note that most process resource limits configured with -these options are per-process, and processes may fork in order -to acquire a new set of resources that are accounted -independently of the original process, and may thus escape -limits set. Also note that C is not -implemented on Linux, and setting it has no effect. Often it -is advisable to prefer the resource controls listed in +Note that most process resource limits configured with these options are per-process, and processes may +fork in order to acquire a new set of resources that are accounted independently of the original process, and +may thus escape limits set. Also note that C is not implemented on Linux, and +setting it has no effect. Often it is advisable to prefer the resource controls listed in L -over these per-process limits, as they apply to services as a -whole, may be altered dynamically at runtime, and are -generally more expressive. For example, -C is a more powerful (and -working) replacement for C. +over these per-process limits, as they apply to services as a whole, may be altered dynamically at runtime, and +are generally more expressive. For example, C is a more powerful (and working) +replacement for C. For system units these resource limits may be chosen freely. For user units however (i.e. units run by a per-user instance of @@ -1403,10 +1096,10 @@ L for details on the resource limit concept. Resource limits may be specified in two formats: either as single value to set a specific soft and hard limit to the same value, or as colon-separated pair C to set -both limits individually (e.g. C). Use the string C -to configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base -1024) may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time -values, the usual time units ms, s, min, h and so on may be used (see +both limits individually (e.g. C). Use the string C to +configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base 1024) +may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time values, +the usual time units ms, s, min, h and so on may be used (see L for details). Note that if no time unit is specified for C the default unit of seconds is implied, while for C the default unit of microseconds is implied. Also, note @@ -1417,19 +1110,14 @@ prefixed like this the value is understood as raw resource limit parameter in the range 0..40 (with 0 being equivalent to 1). -Note that most process resource limits configured with -these options are per-process, and processes may fork in order -to acquire a new set of resources that are accounted -independently of the original process, and may thus escape -limits set. Also note that C is not -implemented on Linux, and setting it has no effect. Often it -is advisable to prefer the resource controls listed in +Note that most process resource limits configured with these options are per-process, and processes may +fork in order to acquire a new set of resources that are accounted independently of the original process, and +may thus escape limits set. Also note that C is not implemented on Linux, and +setting it has no effect. Often it is advisable to prefer the resource controls listed in L -over these per-process limits, as they apply to services as a -whole, may be altered dynamically at runtime, and are -generally more expressive. For example, -C is a more powerful (and -working) replacement for C. +over these per-process limits, as they apply to services as a whole, may be altered dynamically at runtime, and +are generally more expressive. For example, C is a more powerful (and working) +replacement for C. For system units these resource limits may be chosen freely. For user units however (i.e. units run by a per-user instance of @@ -1448,10 +1136,10 @@ L for details on the resource limit concept. Resource limits may be specified in two formats: either as single value to set a specific soft and hard limit to the same value, or as colon-separated pair C to set -both limits individually (e.g. C). Use the string C -to configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base -1024) may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time -values, the usual time units ms, s, min, h and so on may be used (see +both limits individually (e.g. C). Use the string C to +configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base 1024) +may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time values, +the usual time units ms, s, min, h and so on may be used (see L for details). Note that if no time unit is specified for C the default unit of seconds is implied, while for C the default unit of microseconds is implied. Also, note @@ -1462,19 +1150,14 @@ prefixed like this the value is understood as raw resource limit parameter in the range 0..40 (with 0 being equivalent to 1). -Note that most process resource limits configured with -these options are per-process, and processes may fork in order -to acquire a new set of resources that are accounted -independently of the original process, and may thus escape -limits set. Also note that C is not -implemented on Linux, and setting it has no effect. Often it -is advisable to prefer the resource controls listed in +Note that most process resource limits configured with these options are per-process, and processes may +fork in order to acquire a new set of resources that are accounted independently of the original process, and +may thus escape limits set. Also note that C is not implemented on Linux, and +setting it has no effect. Often it is advisable to prefer the resource controls listed in L -over these per-process limits, as they apply to services as a -whole, may be altered dynamically at runtime, and are -generally more expressive. For example, -C is a more powerful (and -working) replacement for C. +over these per-process limits, as they apply to services as a whole, may be altered dynamically at runtime, and +are generally more expressive. For example, C is a more powerful (and working) +replacement for C. For system units these resource limits may be chosen freely. For user units however (i.e. units run by a per-user instance of @@ -1493,10 +1176,10 @@ L for details on the resource limit concept. Resource limits may be specified in two formats: either as single value to set a specific soft and hard limit to the same value, or as colon-separated pair C to set -both limits individually (e.g. C). Use the string C -to configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base -1024) may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time -values, the usual time units ms, s, min, h and so on may be used (see +both limits individually (e.g. C). Use the string C to +configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base 1024) +may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time values, +the usual time units ms, s, min, h and so on may be used (see L for details). Note that if no time unit is specified for C the default unit of seconds is implied, while for C the default unit of microseconds is implied. Also, note @@ -1507,19 +1190,14 @@ prefixed like this the value is understood as raw resource limit parameter in the range 0..40 (with 0 being equivalent to 1). -Note that most process resource limits configured with -these options are per-process, and processes may fork in order -to acquire a new set of resources that are accounted -independently of the original process, and may thus escape -limits set. Also note that C is not -implemented on Linux, and setting it has no effect. Often it -is advisable to prefer the resource controls listed in +Note that most process resource limits configured with these options are per-process, and processes may +fork in order to acquire a new set of resources that are accounted independently of the original process, and +may thus escape limits set. Also note that C is not implemented on Linux, and +setting it has no effect. Often it is advisable to prefer the resource controls listed in L -over these per-process limits, as they apply to services as a -whole, may be altered dynamically at runtime, and are -generally more expressive. For example, -C is a more powerful (and -working) replacement for C. +over these per-process limits, as they apply to services as a whole, may be altered dynamically at runtime, and +are generally more expressive. For example, C is a more powerful (and working) +replacement for C. For system units these resource limits may be chosen freely. For user units however (i.e. units run by a per-user instance of @@ -1538,10 +1216,10 @@ L for details on the resource limit concept. Resource limits may be specified in two formats: either as single value to set a specific soft and hard limit to the same value, or as colon-separated pair C to set -both limits individually (e.g. C). Use the string C -to configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base -1024) may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time -values, the usual time units ms, s, min, h and so on may be used (see +both limits individually (e.g. C). Use the string C to +configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base 1024) +may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time values, +the usual time units ms, s, min, h and so on may be used (see L for details). Note that if no time unit is specified for C the default unit of seconds is implied, while for C the default unit of microseconds is implied. Also, note @@ -1552,19 +1230,14 @@ prefixed like this the value is understood as raw resource limit parameter in the range 0..40 (with 0 being equivalent to 1). -Note that most process resource limits configured with -these options are per-process, and processes may fork in order -to acquire a new set of resources that are accounted -independently of the original process, and may thus escape -limits set. Also note that C is not -implemented on Linux, and setting it has no effect. Often it -is advisable to prefer the resource controls listed in +Note that most process resource limits configured with these options are per-process, and processes may +fork in order to acquire a new set of resources that are accounted independently of the original process, and +may thus escape limits set. Also note that C is not implemented on Linux, and +setting it has no effect. Often it is advisable to prefer the resource controls listed in L -over these per-process limits, as they apply to services as a -whole, may be altered dynamically at runtime, and are -generally more expressive. For example, -C is a more powerful (and -working) replacement for C. +over these per-process limits, as they apply to services as a whole, may be altered dynamically at runtime, and +are generally more expressive. For example, C is a more powerful (and working) +replacement for C. For system units these resource limits may be chosen freely. For user units however (i.e. units run by a per-user instance of @@ -1583,10 +1256,10 @@ L for details on the resource limit concept. Resource limits may be specified in two formats: either as single value to set a specific soft and hard limit to the same value, or as colon-separated pair C to set -both limits individually (e.g. C). Use the string C -to configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base -1024) may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time -values, the usual time units ms, s, min, h and so on may be used (see +both limits individually (e.g. C). Use the string C to +configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base 1024) +may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time values, +the usual time units ms, s, min, h and so on may be used (see L for details). Note that if no time unit is specified for C the default unit of seconds is implied, while for C the default unit of microseconds is implied. Also, note @@ -1597,19 +1270,14 @@ prefixed like this the value is understood as raw resource limit parameter in the range 0..40 (with 0 being equivalent to 1). -Note that most process resource limits configured with -these options are per-process, and processes may fork in order -to acquire a new set of resources that are accounted -independently of the original process, and may thus escape -limits set. Also note that C is not -implemented on Linux, and setting it has no effect. Often it -is advisable to prefer the resource controls listed in +Note that most process resource limits configured with these options are per-process, and processes may +fork in order to acquire a new set of resources that are accounted independently of the original process, and +may thus escape limits set. Also note that C is not implemented on Linux, and +setting it has no effect. Often it is advisable to prefer the resource controls listed in L -over these per-process limits, as they apply to services as a -whole, may be altered dynamically at runtime, and are -generally more expressive. For example, -C is a more powerful (and -working) replacement for C. +over these per-process limits, as they apply to services as a whole, may be altered dynamically at runtime, and +are generally more expressive. For example, C is a more powerful (and working) +replacement for C. For system units these resource limits may be chosen freely. For user units however (i.e. units run by a per-user instance of @@ -1628,10 +1296,10 @@ L for details on the resource limit concept. Resource limits may be specified in two formats: either as single value to set a specific soft and hard limit to the same value, or as colon-separated pair C to set -both limits individually (e.g. C). Use the string C -to configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base -1024) may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time -values, the usual time units ms, s, min, h and so on may be used (see +both limits individually (e.g. C). Use the string C to +configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base 1024) +may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time values, +the usual time units ms, s, min, h and so on may be used (see L for details). Note that if no time unit is specified for C the default unit of seconds is implied, while for C the default unit of microseconds is implied. Also, note @@ -1642,19 +1310,14 @@ prefixed like this the value is understood as raw resource limit parameter in the range 0..40 (with 0 being equivalent to 1). -Note that most process resource limits configured with -these options are per-process, and processes may fork in order -to acquire a new set of resources that are accounted -independently of the original process, and may thus escape -limits set. Also note that C is not -implemented on Linux, and setting it has no effect. Often it -is advisable to prefer the resource controls listed in +Note that most process resource limits configured with these options are per-process, and processes may +fork in order to acquire a new set of resources that are accounted independently of the original process, and +may thus escape limits set. Also note that C is not implemented on Linux, and +setting it has no effect. Often it is advisable to prefer the resource controls listed in L -over these per-process limits, as they apply to services as a -whole, may be altered dynamically at runtime, and are -generally more expressive. For example, -C is a more powerful (and -working) replacement for C. +over these per-process limits, as they apply to services as a whole, may be altered dynamically at runtime, and +are generally more expressive. For example, C is a more powerful (and working) +replacement for C. For system units these resource limits may be chosen freely. For user units however (i.e. units run by a per-user instance of @@ -1673,10 +1336,10 @@ L for details on the resource limit concept. Resource limits may be specified in two formats: either as single value to set a specific soft and hard limit to the same value, or as colon-separated pair C to set -both limits individually (e.g. C). Use the string C -to configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base -1024) may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time -values, the usual time units ms, s, min, h and so on may be used (see +both limits individually (e.g. C). Use the string C to +configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base 1024) +may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time values, +the usual time units ms, s, min, h and so on may be used (see L for details). Note that if no time unit is specified for C the default unit of seconds is implied, while for C the default unit of microseconds is implied. Also, note @@ -1687,19 +1350,14 @@ prefixed like this the value is understood as raw resource limit parameter in the range 0..40 (with 0 being equivalent to 1). -Note that most process resource limits configured with -these options are per-process, and processes may fork in order -to acquire a new set of resources that are accounted -independently of the original process, and may thus escape -limits set. Also note that C is not -implemented on Linux, and setting it has no effect. Often it -is advisable to prefer the resource controls listed in +Note that most process resource limits configured with these options are per-process, and processes may +fork in order to acquire a new set of resources that are accounted independently of the original process, and +may thus escape limits set. Also note that C is not implemented on Linux, and +setting it has no effect. Often it is advisable to prefer the resource controls listed in L -over these per-process limits, as they apply to services as a -whole, may be altered dynamically at runtime, and are -generally more expressive. For example, -C is a more powerful (and -working) replacement for C. +over these per-process limits, as they apply to services as a whole, may be altered dynamically at runtime, and +are generally more expressive. For example, C is a more powerful (and working) +replacement for C. For system units these resource limits may be chosen freely. For user units however (i.e. units run by a per-user instance of @@ -1718,10 +1376,10 @@ L for details on the resource limit concept. Resource limits may be specified in two formats: either as single value to set a specific soft and hard limit to the same value, or as colon-separated pair C to set -both limits individually (e.g. C). Use the string C -to configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base -1024) may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time -values, the usual time units ms, s, min, h and so on may be used (see +both limits individually (e.g. C). Use the string C to +configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base 1024) +may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time values, +the usual time units ms, s, min, h and so on may be used (see L for details). Note that if no time unit is specified for C the default unit of seconds is implied, while for C the default unit of microseconds is implied. Also, note @@ -1732,19 +1390,14 @@ prefixed like this the value is understood as raw resource limit parameter in the range 0..40 (with 0 being equivalent to 1). -Note that most process resource limits configured with -these options are per-process, and processes may fork in order -to acquire a new set of resources that are accounted -independently of the original process, and may thus escape -limits set. Also note that C is not -implemented on Linux, and setting it has no effect. Often it -is advisable to prefer the resource controls listed in +Note that most process resource limits configured with these options are per-process, and processes may +fork in order to acquire a new set of resources that are accounted independently of the original process, and +may thus escape limits set. Also note that C is not implemented on Linux, and +setting it has no effect. Often it is advisable to prefer the resource controls listed in L -over these per-process limits, as they apply to services as a -whole, may be altered dynamically at runtime, and are -generally more expressive. For example, -C is a more powerful (and -working) replacement for C. +over these per-process limits, as they apply to services as a whole, may be altered dynamically at runtime, and +are generally more expressive. For example, C is a more powerful (and working) +replacement for C. For system units these resource limits may be chosen freely. For user units however (i.e. units run by a per-user instance of @@ -1763,10 +1416,10 @@ L for details on the resource limit concept. Resource limits may be specified in two formats: either as single value to set a specific soft and hard limit to the same value, or as colon-separated pair C to set -both limits individually (e.g. C). Use the string C -to configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base -1024) may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time -values, the usual time units ms, s, min, h and so on may be used (see +both limits individually (e.g. C). Use the string C to +configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base 1024) +may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time values, +the usual time units ms, s, min, h and so on may be used (see L for details). Note that if no time unit is specified for C the default unit of seconds is implied, while for C the default unit of microseconds is implied. Also, note @@ -1777,19 +1430,14 @@ prefixed like this the value is understood as raw resource limit parameter in the range 0..40 (with 0 being equivalent to 1). -Note that most process resource limits configured with -these options are per-process, and processes may fork in order -to acquire a new set of resources that are accounted -independently of the original process, and may thus escape -limits set. Also note that C is not -implemented on Linux, and setting it has no effect. Often it -is advisable to prefer the resource controls listed in +Note that most process resource limits configured with these options are per-process, and processes may +fork in order to acquire a new set of resources that are accounted independently of the original process, and +may thus escape limits set. Also note that C is not implemented on Linux, and +setting it has no effect. Often it is advisable to prefer the resource controls listed in L -over these per-process limits, as they apply to services as a -whole, may be altered dynamically at runtime, and are -generally more expressive. For example, -C is a more powerful (and -working) replacement for C. +over these per-process limits, as they apply to services as a whole, may be altered dynamically at runtime, and +are generally more expressive. For example, C is a more powerful (and working) +replacement for C. For system units these resource limits may be chosen freely. For user units however (i.e. units run by a per-user instance of @@ -1808,10 +1456,10 @@ L for details on the resource limit concept. Resource limits may be specified in two formats: either as single value to set a specific soft and hard limit to the same value, or as colon-separated pair C to set -both limits individually (e.g. C). Use the string C -to configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base -1024) may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time -values, the usual time units ms, s, min, h and so on may be used (see +both limits individually (e.g. C). Use the string C to +configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base 1024) +may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time values, +the usual time units ms, s, min, h and so on may be used (see L for details). Note that if no time unit is specified for C the default unit of seconds is implied, while for C the default unit of microseconds is implied. Also, note @@ -1822,19 +1470,14 @@ prefixed like this the value is understood as raw resource limit parameter in the range 0..40 (with 0 being equivalent to 1). -Note that most process resource limits configured with -these options are per-process, and processes may fork in order -to acquire a new set of resources that are accounted -independently of the original process, and may thus escape -limits set. Also note that C is not -implemented on Linux, and setting it has no effect. Often it -is advisable to prefer the resource controls listed in +Note that most process resource limits configured with these options are per-process, and processes may +fork in order to acquire a new set of resources that are accounted independently of the original process, and +may thus escape limits set. Also note that C is not implemented on Linux, and +setting it has no effect. Often it is advisable to prefer the resource controls listed in L -over these per-process limits, as they apply to services as a -whole, may be altered dynamically at runtime, and are -generally more expressive. For example, -C is a more powerful (and -working) replacement for C. +over these per-process limits, as they apply to services as a whole, may be altered dynamically at runtime, and +are generally more expressive. For example, C is a more powerful (and working) +replacement for C. For system units these resource limits may be chosen freely. For user units however (i.e. units run by a per-user instance of @@ -1853,10 +1496,10 @@ L for details on the resource limit concept. Resource limits may be specified in two formats: either as single value to set a specific soft and hard limit to the same value, or as colon-separated pair C to set -both limits individually (e.g. C). Use the string C -to configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base -1024) may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time -values, the usual time units ms, s, min, h and so on may be used (see +both limits individually (e.g. C). Use the string C to +configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base 1024) +may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time values, +the usual time units ms, s, min, h and so on may be used (see L for details). Note that if no time unit is specified for C the default unit of seconds is implied, while for C the default unit of microseconds is implied. Also, note @@ -1867,19 +1510,14 @@ prefixed like this the value is understood as raw resource limit parameter in the range 0..40 (with 0 being equivalent to 1). -Note that most process resource limits configured with -these options are per-process, and processes may fork in order -to acquire a new set of resources that are accounted -independently of the original process, and may thus escape -limits set. Also note that C is not -implemented on Linux, and setting it has no effect. Often it -is advisable to prefer the resource controls listed in +Note that most process resource limits configured with these options are per-process, and processes may +fork in order to acquire a new set of resources that are accounted independently of the original process, and +may thus escape limits set. Also note that C is not implemented on Linux, and +setting it has no effect. Often it is advisable to prefer the resource controls listed in L -over these per-process limits, as they apply to services as a -whole, may be altered dynamically at runtime, and are -generally more expressive. For example, -C is a more powerful (and -working) replacement for C. +over these per-process limits, as they apply to services as a whole, may be altered dynamically at runtime, and +are generally more expressive. For example, C is a more powerful (and working) +replacement for C. For system units these resource limits may be chosen freely. For user units however (i.e. units run by a per-user instance of @@ -1898,10 +1536,10 @@ L for details on the resource limit concept. Resource limits may be specified in two formats: either as single value to set a specific soft and hard limit to the same value, or as colon-separated pair C to set -both limits individually (e.g. C). Use the string C -to configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base -1024) may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time -values, the usual time units ms, s, min, h and so on may be used (see +both limits individually (e.g. C). Use the string C to +configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base 1024) +may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time values, +the usual time units ms, s, min, h and so on may be used (see L for details). Note that if no time unit is specified for C the default unit of seconds is implied, while for C the default unit of microseconds is implied. Also, note @@ -1912,19 +1550,14 @@ prefixed like this the value is understood as raw resource limit parameter in the range 0..40 (with 0 being equivalent to 1). -Note that most process resource limits configured with -these options are per-process, and processes may fork in order -to acquire a new set of resources that are accounted -independently of the original process, and may thus escape -limits set. Also note that C is not -implemented on Linux, and setting it has no effect. Often it -is advisable to prefer the resource controls listed in +Note that most process resource limits configured with these options are per-process, and processes may +fork in order to acquire a new set of resources that are accounted independently of the original process, and +may thus escape limits set. Also note that C is not implemented on Linux, and +setting it has no effect. Often it is advisable to prefer the resource controls listed in L -over these per-process limits, as they apply to services as a -whole, may be altered dynamically at runtime, and are -generally more expressive. For example, -C is a more powerful (and -working) replacement for C. +over these per-process limits, as they apply to services as a whole, may be altered dynamically at runtime, and +are generally more expressive. For example, C is a more powerful (and working) +replacement for C. For system units these resource limits may be chosen freely. For user units however (i.e. units run by a per-user instance of @@ -1943,10 +1576,10 @@ L for details on the resource limit concept. Resource limits may be specified in two formats: either as single value to set a specific soft and hard limit to the same value, or as colon-separated pair C to set -both limits individually (e.g. C). Use the string C -to configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base -1024) may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time -values, the usual time units ms, s, min, h and so on may be used (see +both limits individually (e.g. C). Use the string C to +configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base 1024) +may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time values, +the usual time units ms, s, min, h and so on may be used (see L for details). Note that if no time unit is specified for C the default unit of seconds is implied, while for C the default unit of microseconds is implied. Also, note @@ -1957,19 +1590,14 @@ prefixed like this the value is understood as raw resource limit parameter in the range 0..40 (with 0 being equivalent to 1). -Note that most process resource limits configured with -these options are per-process, and processes may fork in order -to acquire a new set of resources that are accounted -independently of the original process, and may thus escape -limits set. Also note that C is not -implemented on Linux, and setting it has no effect. Often it -is advisable to prefer the resource controls listed in +Note that most process resource limits configured with these options are per-process, and processes may +fork in order to acquire a new set of resources that are accounted independently of the original process, and +may thus escape limits set. Also note that C is not implemented on Linux, and +setting it has no effect. Often it is advisable to prefer the resource controls listed in L -over these per-process limits, as they apply to services as a -whole, may be altered dynamically at runtime, and are -generally more expressive. For example, -C is a more powerful (and -working) replacement for C. +over these per-process limits, as they apply to services as a whole, may be altered dynamically at runtime, and +are generally more expressive. For example, C is a more powerful (and working) +replacement for C. For system units these resource limits may be chosen freely. For user units however (i.e. units run by a per-user instance of @@ -1988,10 +1616,10 @@ L for details on the resource limit concept. Resource limits may be specified in two formats: either as single value to set a specific soft and hard limit to the same value, or as colon-separated pair C to set -both limits individually (e.g. C). Use the string C -to configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base -1024) may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time -values, the usual time units ms, s, min, h and so on may be used (see +both limits individually (e.g. C). Use the string C to +configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base 1024) +may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time values, +the usual time units ms, s, min, h and so on may be used (see L for details). Note that if no time unit is specified for C the default unit of seconds is implied, while for C the default unit of microseconds is implied. Also, note @@ -2002,19 +1630,14 @@ prefixed like this the value is understood as raw resource limit parameter in the range 0..40 (with 0 being equivalent to 1). -Note that most process resource limits configured with -these options are per-process, and processes may fork in order -to acquire a new set of resources that are accounted -independently of the original process, and may thus escape -limits set. Also note that C is not -implemented on Linux, and setting it has no effect. Often it -is advisable to prefer the resource controls listed in +Note that most process resource limits configured with these options are per-process, and processes may +fork in order to acquire a new set of resources that are accounted independently of the original process, and +may thus escape limits set. Also note that C is not implemented on Linux, and +setting it has no effect. Often it is advisable to prefer the resource controls listed in L -over these per-process limits, as they apply to services as a -whole, may be altered dynamically at runtime, and are -generally more expressive. For example, -C is a more powerful (and -working) replacement for C. +over these per-process limits, as they apply to services as a whole, may be altered dynamically at runtime, and +are generally more expressive. For example, C is a more powerful (and working) +replacement for C. For system units these resource limits may be chosen freely. For user units however (i.e. units run by a per-user instance of @@ -2033,10 +1656,10 @@ L for details on the resource limit concept. Resource limits may be specified in two formats: either as single value to set a specific soft and hard limit to the same value, or as colon-separated pair C to set -both limits individually (e.g. C). Use the string C -to configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base -1024) may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time -values, the usual time units ms, s, min, h and so on may be used (see +both limits individually (e.g. C). Use the string C to +configure no limit on a specific resource. The multiplicative suffixes K, M, G, T, P and E (to the base 1024) +may be used for resource limits measured in bytes (e.g. LimitAS=16G). For the limits referring to time values, +the usual time units ms, s, min, h and so on may be used (see L for details). Note that if no time unit is specified for C the default unit of seconds is implied, while for C the default unit of microseconds is implied. Also, note @@ -2047,19 +1670,14 @@ prefixed like this the value is understood as raw resource limit parameter in the range 0..40 (with 0 being equivalent to 1). -Note that most process resource limits configured with -these options are per-process, and processes may fork in order -to acquire a new set of resources that are accounted -independently of the original process, and may thus escape -limits set. Also note that C is not -implemented on Linux, and setting it has no effect. Often it -is advisable to prefer the resource controls listed in +Note that most process resource limits configured with these options are per-process, and processes may +fork in order to acquire a new set of resources that are accounted independently of the original process, and +may thus escape limits set. Also note that C is not implemented on Linux, and +setting it has no effect. Often it is advisable to prefer the resource controls listed in L -over these per-process limits, as they apply to services as a -whole, may be altered dynamically at runtime, and are -generally more expressive. For example, -C is a more powerful (and -working) replacement for C. +over these per-process limits, as they apply to services as a whole, may be altered dynamically at runtime, and +are generally more expressive. For example, C is a more powerful (and working) +replacement for C. For system units these resource limits may be chosen freely. For user units however (i.e. units run by a per-user instance of @@ -2072,96 +1690,492 @@ if not configured there – the kernel or per-user defaults, as defined by the OS (the latter only for user services, see above). I< Optional. Type uniline. > -=head2 PAMName - -Sets the PAM service name to set up a session as. If set, the executed process will be -registered as a PAM session under the specified service name. This is only useful in conjunction with the -C setting, and is otherwise ignored. If not set, no PAM session will be opened for the -executed processes. See L for -details. - -Note that for each unit making use of this option a PAM session handler process will be maintained as -part of the unit and stays around as long as the unit is active, to ensure that appropriate actions can be -taken when the unit and hence the PAM session terminates. This process is named C<(sd-pam)> and -is an immediate child process of the unit's main process. +=head2 UMask -Note that when this option is used for a unit it is very likely (depending on PAM configuration) that the -main unit process will be migrated to its own session scope unit when it is activated. This process will hence -be associated with two units: the unit it was originally started from (and for which -C was configured), and the session scope unit. Any child processes of that process -will however be associated with the session scope unit only. This has implications when used in combination -with CC, as these child processes will not be able to affect -changes in the original unit through notification messages. These messages will be considered belonging to the -session scope unit and not the original unit. It is hence not recommended to use C in -combination with CC. I< Optional. Type uniline. > +Controls the file mode creation mask. Takes an access mode in octal notation. See +L for details. Defaults +to 0022. I< Optional. Type uniline. > -=head2 CapabilityBoundingSet +=head2 KeyringMode -Controls which capabilities to include in the capability bounding set for the executed -process. See L for -details. Takes a whitespace-separated list of capability names, e.g. C, -C, C. Capabilities listed will be -included in the bounding set, all others are removed. If the list of capabilities is prefixed with -C<~>, all but the listed capabilities will be included, the effect of the assignment -inverted. Note that this option also affects the respective capabilities in the effective, permitted and -inheritable capability sets. If this option is not used, the capability bounding set is not modified on process -execution, hence no limits on the capabilities of the process are enforced. This option may appear more than -once, in which case the bounding sets are merged by C, or by C -if the lines are prefixed with C<~> (see below). If the empty string is assigned -to this option, the bounding set is reset to the empty capability set, and all prior settings have no effect. -If set to C<~> (without any further argument), the bounding set is reset to the full set of available -capabilities, also undoing any previous settings. This does not affect commands prefixed with -C<+>. +Controls how the kernel session keyring is set up for the service (see L for +details on the session keyring). Takes one of C, C, +C. If set to C no special keyring setup is done, and the kernel's +default behaviour is applied. If C is used a new session keyring is allocated when a +service process is invoked, and it is not linked up with any user keyring. This is the recommended setting for +system services, as this ensures that multiple services running under the same system user ID (in particular +the root user) do not share their key material among each other. If C is used a new +session keyring is allocated as for C, but the user keyring of the user configured with +C is linked into it, so that keys assigned to the user may be requested by the unit's +processes. In this modes multiple units running processes under the same user ID may share key material. Unless +C is selected the unique invocation ID for the unit (see below) is added as a protected +key by the name C to the newly created session keyring. Defaults to +C for the system service manager and to C for the user service +manager. I< Optional. Type enum. choice: 'inherit', 'private', 'shared'. > -Example: if a unit has the following, +=head2 OOMScoreAdjust - CapabilityBoundingSet=CAP_A CAP_B - CapabilityBoundingSet=CAP_B CAP_C +Sets the adjustment level for the Out-Of-Memory killer for executed processes. Takes an integer +between -1000 (to disable OOM killing for this process) and 1000 (to make killing of this process under memory +pressure very likely). See proc.txt for +details. I< Optional. Type integer. > -then C, C, and C are set. -If the second line is prefixed with C<~>, e.g., +=head2 TimerSlackNSec - CapabilityBoundingSet=CAP_A CAP_B - CapabilityBoundingSet=~CAP_B CAP_C +Sets the timer slack in nanoseconds for the executed processes. The timer slack controls the +accuracy of wake-ups triggered by timers. See +L for more +information. Note that in contrast to most other time span definitions this parameter takes an integer value in +nano-seconds if no unit is specified. The usual time units are understood too. I< Optional. Type uniline. > -then, only C is set. I< Optional. Type uniline. > +=head2 Personality -=head2 AmbientCapabilities +Controls which kernel architecture L shall report, +when invoked by unit processes. Takes one of the architecture identifiers C, +C, C, C, C, +C, C or C. Which personality +architectures are supported depends on the system architecture. Usually the 64bit versions of the various +system architectures support their immediate 32bit personality architecture counterpart, but no others. For +example, C systems support the C and +C personalities but no others. The personality feature is useful when running 32-bit +services on a 64-bit host system. If not specified, the personality is left unmodified and thus reflects the +personality of the host system's kernel. I< Optional. Type enum. choice: 'x86', 'x86-64', 'ppc', 'ppc-le', 'ppc64', 'ppc64-le', 's390', 's390x'. > -Controls which capabilities to include in the ambient capability set for the executed -process. Takes a whitespace-separated list of capability names, e.g. C, -C, C. This option may appear more than -once in which case the ambient capability sets are merged (see the above examples in -C). If the list of capabilities is prefixed with -C<~>, all but the listed capabilities will be included, the effect of the assignment -inverted. If the empty string is assigned to this option, the ambient capability set is reset to the empty -capability set, and all prior settings have no effect. If set to C<~> (without any further -argument), the ambient capability set is reset to the full set of available capabilities, also undoing any -previous settings. Note that adding capabilities to ambient capability set adds them to the process's inherited -capability set. - - Ambient capability sets are useful if you want to execute a process as a -non-privileged user but still want to give it some capabilities. Note that in this case option -C is automatically added to C to retain the -capabilities over the user change. C does not affect commands prefixed -with C<+>. I< Optional. Type uniline. > +=head2 IgnoreSIGPIPE -=head2 SecureBits +Takes a boolean argument. If true, causes C to be ignored in the +executed process. Defaults to true because C generally is useful only in shell +pipelines. I< Optional. Type boolean. > + +=head2 Nice + +Sets the default nice level (scheduling priority) for executed processes. Takes an integer +between -20 (highest priority) and 19 (lowest priority). See +L for +details. I< Optional. Type integer. > + +=head2 CPUSchedulingPolicy + +Sets the CPU scheduling policy for executed processes. Takes one of C, +C, C, C or C. See +L for +details. I< Optional. Type enum. choice: 'other', 'batch', 'idle', 'fifo', 'rr'. > + +=head2 CPUSchedulingPriority + +Sets the CPU scheduling priority for executed processes. The available priority range depends +on the selected CPU scheduling policy (see above). For real-time scheduling policies an integer between 1 +(lowest priority) and 99 (highest priority) can be used. See +L for +details. I< Optional. Type uniline. > + +=head2 CPUSchedulingResetOnFork + +Takes a boolean argument. If true, elevated CPU scheduling priorities and policies will be +reset when the executed processes fork, and can hence not leak into child processes. See +L for +details. Defaults to false. I< Optional. Type boolean. > + +=head2 CPUAffinity + +Controls the CPU affinity of the executed processes. Takes a list of CPU indices or ranges +separated by either whitespace or commas. CPU ranges are specified by the lower and upper CPU indices separated +by a dash. This option may be specified more than once, in which case the specified CPU affinity masks are +merged. If the empty string is assigned, the mask is reset, all assignments prior to this will have no +effect. See +L for +details. I< Optional. Type list of uniline. > + +=head2 IOSchedulingClass + +Sets the I/O scheduling class for executed processes. Takes an integer between 0 and 3 or one +of the strings C, C, C or +C. See +L for +details. I< Optional. Type enum. choice: '0', '1', '2', '3', 'none', 'realtime', 'best-effort', 'idle'. > + +=head2 IOSchedulingPriority + +Sets the I/O scheduling priority for executed processes. Takes an integer between 0 (highest +priority) and 7 (lowest priority). The available priorities depend on the selected I/O scheduling class (see +above). See L for +details. I< Optional. Type integer. > + +=head2 ProtectSystem + +Takes a boolean argument or the special values C or +C. If true, mounts the /usr and /boot +directories read-only for processes invoked by this unit. If set to C, the +/etc directory is mounted read-only, too. If set to C the entire +file system hierarchy is mounted read-only, except for the API file system subtrees /dev, +/proc and /sys (protect these directories using +C, C, +C). This setting ensures that any modification of the vendor-supplied +operating system (and optionally its configuration, and local mounts) is prohibited for the service. It is +recommended to enable this setting for all long-running services, unless they are involved with system updates +or need to modify the operating system in other ways. If this option is used, +C may be used to exclude specific directories from being made read-only. This +setting is implied if C is set. For this setting the same restrictions regarding +mount propagation and privileges apply as for C and related calls, see +below. Defaults to off. I< Optional. Type enum. choice: 'no', 'yes', 'full', 'strict'. > + +=head2 ProtectHome + +Takes a boolean argument or C. If true, the directories +/home, /root and /run/user are made inaccessible +and empty for processes invoked by this unit. If set to C, the three directories are +made read-only instead. It is recommended to enable this setting for all long-running services (in particular +network-facing ones), to ensure they cannot get access to private user data, unless the services actually +require access to the user's private data. This setting is implied if C is +set. For this setting the same restrictions regarding mount propagation and privileges apply as for +C and related calls, see below. I< Optional. Type enum. choice: 'no', 'yes', 'read-only'. > + +=head2 RuntimeDirectory + +These options take a whitespace-separated list of directory names. The specified directory +names must be relative, and may not include C<.> or C<..>. If set, one or more +directories by the specified names will be created (including their parents) below /run +(or C<$XDG_RUNTIME_DIR> for user services), /var/lib (or +C<$XDG_CONFIG_HOME> for user services), /var/cache (or +C<$XDG_CACHE_HOME> for user services), /var/log (or +C<$XDG_CONFIG_HOME>/log for user services), or /etc +(or C<$XDG_CONFIG_HOME> for user services), respectively, when the unit is started. + +In case of C the lowest subdirectories are removed when the unit is +stopped. It is possible to preserve the specified directories in this case if +C is configured to C or C +(see below). The directories specified with C, +C, C, +C are not removed when the unit is stopped. + +Except in case of C, the innermost specified directories will be +owned by the user and group specified in C and C. If the +specified directories already exist and their owning user or group do not match the configured ones, all files +and directories below the specified directories as well as the directories themselves will have their file +ownership recursively changed to match what is configured. As an optimization, if the specified directories are +already owned by the right user and group, files and directories below of them are left as-is, even if they do +not match what is requested. The innermost specified directories will have their access mode adjusted to the +what is specified in C, C, +C, C and +C. + +These options imply C for the specified paths. When combined with +C or C these paths always reside on the host and +are mounted from there into the unit's file system namespace. + +If C is used in conjunction with C, +C and C is slightly altered: the directories +are created below /var/lib/private, /var/cache/private and +/var/log/private, respectively, which are host directories made inaccessible to +unprivileged users, which ensures that access to these directories cannot be gained through dynamic user ID +recycling. Symbolic links are created to hide this difference in behaviour. Both from perspective of the host +and from inside the unit, the relevant directories hence always appear directly below +/var/lib, /var/cache and /var/log. + +Use C to manage one or more runtime directories for the unit and bind +their lifetime to the daemon runtime. This is particularly useful for unprivileged daemons that cannot create +runtime directories in /run due to lack of privileges, and to make sure the runtime +directory is cleaned up automatically after use. For runtime directories that require more complex or different +configuration or lifetime guarantees, please consider using +L. + +Example: if a system service unit has the following, + + RuntimeDirectory=foo/bar baz + +the service manager creates /run/foo (if it does not exist), +/run/foo/bar, and /run/baz. The directories +/run/foo/bar and /run/baz except /run/foo are +owned by the user and group specified in C and C, and removed +when the service is stopped. I< Optional. Type uniline. > + +=head2 StateDirectory + +These options take a whitespace-separated list of directory names. The specified directory +names must be relative, and may not include C<.> or C<..>. If set, one or more +directories by the specified names will be created (including their parents) below /run +(or C<$XDG_RUNTIME_DIR> for user services), /var/lib (or +C<$XDG_CONFIG_HOME> for user services), /var/cache (or +C<$XDG_CACHE_HOME> for user services), /var/log (or +C<$XDG_CONFIG_HOME>/log for user services), or /etc +(or C<$XDG_CONFIG_HOME> for user services), respectively, when the unit is started. + +In case of C the lowest subdirectories are removed when the unit is +stopped. It is possible to preserve the specified directories in this case if +C is configured to C or C +(see below). The directories specified with C, +C, C, +C are not removed when the unit is stopped. + +Except in case of C, the innermost specified directories will be +owned by the user and group specified in C and C. If the +specified directories already exist and their owning user or group do not match the configured ones, all files +and directories below the specified directories as well as the directories themselves will have their file +ownership recursively changed to match what is configured. As an optimization, if the specified directories are +already owned by the right user and group, files and directories below of them are left as-is, even if they do +not match what is requested. The innermost specified directories will have their access mode adjusted to the +what is specified in C, C, +C, C and +C. + +These options imply C for the specified paths. When combined with +C or C these paths always reside on the host and +are mounted from there into the unit's file system namespace. + +If C is used in conjunction with C, +C and C is slightly altered: the directories +are created below /var/lib/private, /var/cache/private and +/var/log/private, respectively, which are host directories made inaccessible to +unprivileged users, which ensures that access to these directories cannot be gained through dynamic user ID +recycling. Symbolic links are created to hide this difference in behaviour. Both from perspective of the host +and from inside the unit, the relevant directories hence always appear directly below +/var/lib, /var/cache and /var/log. + +Use C to manage one or more runtime directories for the unit and bind +their lifetime to the daemon runtime. This is particularly useful for unprivileged daemons that cannot create +runtime directories in /run due to lack of privileges, and to make sure the runtime +directory is cleaned up automatically after use. For runtime directories that require more complex or different +configuration or lifetime guarantees, please consider using +L. + +Example: if a system service unit has the following, + + RuntimeDirectory=foo/bar baz + +the service manager creates /run/foo (if it does not exist), +/run/foo/bar, and /run/baz. The directories +/run/foo/bar and /run/baz except /run/foo are +owned by the user and group specified in C and C, and removed +when the service is stopped. I< Optional. Type uniline. > + +=head2 CacheDirectory + +These options take a whitespace-separated list of directory names. The specified directory +names must be relative, and may not include C<.> or C<..>. If set, one or more +directories by the specified names will be created (including their parents) below /run +(or C<$XDG_RUNTIME_DIR> for user services), /var/lib (or +C<$XDG_CONFIG_HOME> for user services), /var/cache (or +C<$XDG_CACHE_HOME> for user services), /var/log (or +C<$XDG_CONFIG_HOME>/log for user services), or /etc +(or C<$XDG_CONFIG_HOME> for user services), respectively, when the unit is started. + +In case of C the lowest subdirectories are removed when the unit is +stopped. It is possible to preserve the specified directories in this case if +C is configured to C or C +(see below). The directories specified with C, +C, C, +C are not removed when the unit is stopped. + +Except in case of C, the innermost specified directories will be +owned by the user and group specified in C and C. If the +specified directories already exist and their owning user or group do not match the configured ones, all files +and directories below the specified directories as well as the directories themselves will have their file +ownership recursively changed to match what is configured. As an optimization, if the specified directories are +already owned by the right user and group, files and directories below of them are left as-is, even if they do +not match what is requested. The innermost specified directories will have their access mode adjusted to the +what is specified in C, C, +C, C and +C. + +These options imply C for the specified paths. When combined with +C or C these paths always reside on the host and +are mounted from there into the unit's file system namespace. + +If C is used in conjunction with C, +C and C is slightly altered: the directories +are created below /var/lib/private, /var/cache/private and +/var/log/private, respectively, which are host directories made inaccessible to +unprivileged users, which ensures that access to these directories cannot be gained through dynamic user ID +recycling. Symbolic links are created to hide this difference in behaviour. Both from perspective of the host +and from inside the unit, the relevant directories hence always appear directly below +/var/lib, /var/cache and /var/log. + +Use C to manage one or more runtime directories for the unit and bind +their lifetime to the daemon runtime. This is particularly useful for unprivileged daemons that cannot create +runtime directories in /run due to lack of privileges, and to make sure the runtime +directory is cleaned up automatically after use. For runtime directories that require more complex or different +configuration or lifetime guarantees, please consider using +L. + +Example: if a system service unit has the following, + + RuntimeDirectory=foo/bar baz + +the service manager creates /run/foo (if it does not exist), +/run/foo/bar, and /run/baz. The directories +/run/foo/bar and /run/baz except /run/foo are +owned by the user and group specified in C and C, and removed +when the service is stopped. I< Optional. Type uniline. > + +=head2 LogsDirectory + +These options take a whitespace-separated list of directory names. The specified directory +names must be relative, and may not include C<.> or C<..>. If set, one or more +directories by the specified names will be created (including their parents) below /run +(or C<$XDG_RUNTIME_DIR> for user services), /var/lib (or +C<$XDG_CONFIG_HOME> for user services), /var/cache (or +C<$XDG_CACHE_HOME> for user services), /var/log (or +C<$XDG_CONFIG_HOME>/log for user services), or /etc +(or C<$XDG_CONFIG_HOME> for user services), respectively, when the unit is started. + +In case of C the lowest subdirectories are removed when the unit is +stopped. It is possible to preserve the specified directories in this case if +C is configured to C or C +(see below). The directories specified with C, +C, C, +C are not removed when the unit is stopped. + +Except in case of C, the innermost specified directories will be +owned by the user and group specified in C and C. If the +specified directories already exist and their owning user or group do not match the configured ones, all files +and directories below the specified directories as well as the directories themselves will have their file +ownership recursively changed to match what is configured. As an optimization, if the specified directories are +already owned by the right user and group, files and directories below of them are left as-is, even if they do +not match what is requested. The innermost specified directories will have their access mode adjusted to the +what is specified in C, C, +C, C and +C. + +These options imply C for the specified paths. When combined with +C or C these paths always reside on the host and +are mounted from there into the unit's file system namespace. + +If C is used in conjunction with C, +C and C is slightly altered: the directories +are created below /var/lib/private, /var/cache/private and +/var/log/private, respectively, which are host directories made inaccessible to +unprivileged users, which ensures that access to these directories cannot be gained through dynamic user ID +recycling. Symbolic links are created to hide this difference in behaviour. Both from perspective of the host +and from inside the unit, the relevant directories hence always appear directly below +/var/lib, /var/cache and /var/log. + +Use C to manage one or more runtime directories for the unit and bind +their lifetime to the daemon runtime. This is particularly useful for unprivileged daemons that cannot create +runtime directories in /run due to lack of privileges, and to make sure the runtime +directory is cleaned up automatically after use. For runtime directories that require more complex or different +configuration or lifetime guarantees, please consider using +L. + +Example: if a system service unit has the following, + + RuntimeDirectory=foo/bar baz + +the service manager creates /run/foo (if it does not exist), +/run/foo/bar, and /run/baz. The directories +/run/foo/bar and /run/baz except /run/foo are +owned by the user and group specified in C and C, and removed +when the service is stopped. I< Optional. Type uniline. > + +=head2 ConfigurationDirectory + +These options take a whitespace-separated list of directory names. The specified directory +names must be relative, and may not include C<.> or C<..>. If set, one or more +directories by the specified names will be created (including their parents) below /run +(or C<$XDG_RUNTIME_DIR> for user services), /var/lib (or +C<$XDG_CONFIG_HOME> for user services), /var/cache (or +C<$XDG_CACHE_HOME> for user services), /var/log (or +C<$XDG_CONFIG_HOME>/log for user services), or /etc +(or C<$XDG_CONFIG_HOME> for user services), respectively, when the unit is started. + +In case of C the lowest subdirectories are removed when the unit is +stopped. It is possible to preserve the specified directories in this case if +C is configured to C or C +(see below). The directories specified with C, +C, C, +C are not removed when the unit is stopped. + +Except in case of C, the innermost specified directories will be +owned by the user and group specified in C and C. If the +specified directories already exist and their owning user or group do not match the configured ones, all files +and directories below the specified directories as well as the directories themselves will have their file +ownership recursively changed to match what is configured. As an optimization, if the specified directories are +already owned by the right user and group, files and directories below of them are left as-is, even if they do +not match what is requested. The innermost specified directories will have their access mode adjusted to the +what is specified in C, C, +C, C and +C. + +These options imply C for the specified paths. When combined with +C or C these paths always reside on the host and +are mounted from there into the unit's file system namespace. + +If C is used in conjunction with C, +C and C is slightly altered: the directories +are created below /var/lib/private, /var/cache/private and +/var/log/private, respectively, which are host directories made inaccessible to +unprivileged users, which ensures that access to these directories cannot be gained through dynamic user ID +recycling. Symbolic links are created to hide this difference in behaviour. Both from perspective of the host +and from inside the unit, the relevant directories hence always appear directly below +/var/lib, /var/cache and /var/log. + +Use C to manage one or more runtime directories for the unit and bind +their lifetime to the daemon runtime. This is particularly useful for unprivileged daemons that cannot create +runtime directories in /run due to lack of privileges, and to make sure the runtime +directory is cleaned up automatically after use. For runtime directories that require more complex or different +configuration or lifetime guarantees, please consider using +L. + +Example: if a system service unit has the following, + + RuntimeDirectory=foo/bar baz + +the service manager creates /run/foo (if it does not exist), +/run/foo/bar, and /run/baz. The directories +/run/foo/bar and /run/baz except /run/foo are +owned by the user and group specified in C and C, and removed +when the service is stopped. I< Optional. Type uniline. > + +=head2 RuntimeDirectoryMode + +Specifies the access mode of the directories specified in C, +C, C, C, or +C, respectively, as an octal number. Defaults to +C<0755>. See "Permissions" in L for a +discussion of the meaning of permission bits. I< Optional. Type uniline. > + +=head2 StateDirectoryMode + +Specifies the access mode of the directories specified in C, +C, C, C, or +C, respectively, as an octal number. Defaults to +C<0755>. See "Permissions" in L for a +discussion of the meaning of permission bits. I< Optional. Type uniline. > + +=head2 CacheDirectoryMode + +Specifies the access mode of the directories specified in C, +C, C, C, or +C, respectively, as an octal number. Defaults to +C<0755>. See "Permissions" in L for a +discussion of the meaning of permission bits. I< Optional. Type uniline. > + +=head2 LogsDirectoryMode + +Specifies the access mode of the directories specified in C, +C, C, C, or +C, respectively, as an octal number. Defaults to +C<0755>. See "Permissions" in L for a +discussion of the meaning of permission bits. I< Optional. Type uniline. > + +=head2 ConfigurationDirectoryMode + +Specifies the access mode of the directories specified in C, +C, C, C, or +C, respectively, as an octal number. Defaults to +C<0755>. See "Permissions" in L for a +discussion of the meaning of permission bits. I< Optional. Type uniline. > + +=head2 RuntimeDirectoryPreserve -Controls the secure bits set for the executed -process. Takes a space-separated combination of options from -the following list: -C, -C, -C, -C, -C, and -C. -This option may appear more than once, in which case the secure -bits are ORed. If the empty string is assigned to this option, -the bits are reset to 0. This does not affect commands prefixed with C<+>. -See L -for details. I< Optional. Type uniline. > +Takes a boolean argument or C. If set to C (the +default), the directories specified in C are always removed when the service +stops. If set to C the directories are preserved when the service is both automatically +and manually restarted. Here, the automatic restart means the operation specified in +C, and manual restart means the one triggered by systemctl restart +foo.service. If set to C, then the directories are not removed when the service is +stopped. Note that since the runtime directory /run is a mount point of +C, then for system services the directories specified in +C are removed when the system is rebooted. I< Optional. Type enum. choice: 'no', 'yes', 'restart'. > =head2 ReadWritePaths @@ -2277,50 +2291,6 @@ C or C. I< Optional. Type list of uniline. > -=head2 BindPaths - -Configures unit-specific bind mounts. A bind mount makes a particular file or directory -available at an additional place in the unit's view of the file system. Any bind mounts created with this -option are specific to the unit, and are not visible in the host's mount table. This option expects a -whitespace separated list of bind mount definitions. Each definition consists of a colon-separated triple of -source path, destination path and option string, where the latter two are optional. If only a source path is -specified the source and destination is taken to be the same. The option string may be either -C or C for configuring a recursive or non-recursive bind -mount. If the destination path is omitted, the option string must be omitted too. - -C creates regular writable bind mounts (unless the source file system mount -is already marked read-only), while C creates read-only bind mounts. These -settings may be used more than once, each usage appends to the unit's list of bind mounts. If the empty string -is assigned to either of these two options the entire list of bind mounts defined prior to this is reset. Note -that in this case both read-only and regular bind mounts are reset, regardless which of the two settings is -used. - -This option is particularly useful when C/C -is used. In this case the source path refers to a path on the host file system, while the destination path -refers to a path below the root directory of the unit. I< Optional. Type list of uniline. > - -=head2 BindReadOnlyPaths - -Configures unit-specific bind mounts. A bind mount makes a particular file or directory -available at an additional place in the unit's view of the file system. Any bind mounts created with this -option are specific to the unit, and are not visible in the host's mount table. This option expects a -whitespace separated list of bind mount definitions. Each definition consists of a colon-separated triple of -source path, destination path and option string, where the latter two are optional. If only a source path is -specified the source and destination is taken to be the same. The option string may be either -C or C for configuring a recursive or non-recursive bind -mount. If the destination path is omitted, the option string must be omitted too. - -C creates regular writable bind mounts (unless the source file system mount -is already marked read-only), while C creates read-only bind mounts. These -settings may be used more than once, each usage appends to the unit's list of bind mounts. If the empty string -is assigned to either of these two options the entire list of bind mounts defined prior to this is reset. Note -that in this case both read-only and regular bind mounts are reset, regardless which of the two settings is -used. - -This option is particularly useful when C/C -is used. In this case the source path refers to a path on the host file system, while the destination path -refers to a path below the root directory of the unit. I< Optional. Type list of uniline. > - =head2 PrivateTmp Takes a boolean argument. If true, sets up a new file system namespace for the executed @@ -2340,58 +2310,52 @@ L is added. -Note that the implementation of this setting might be impossible (for example if mount namespaces -are not available), and the unit should be written in a way that does not solely rely on this setting for +Note that the implementation of this setting might be impossible (for example if mount namespaces are not +available), and the unit should be written in a way that does not solely rely on this setting for security. I< Optional. Type boolean. > =head2 PrivateDevices Takes a boolean argument. If true, sets up a new /dev mount for the executed processes and only adds API pseudo devices such as /dev/null, -/dev/zero or -/dev/random (as well as the pseudo TTY subsystem) to it, but no physical devices such as -/dev/sda, system memory /dev/mem, system ports -/dev/port and others. This is useful to securely turn off physical device access by the -executed process. Defaults to false. Enabling this option will install a system call filter to block low-level -I/O system calls that are grouped in the C<@raw-io> set, will also remove -C and C from the capability bounding set for -the unit (see above), and set C (see +/dev/zero or /dev/random (as well as the pseudo TTY subsystem) to it, +but no physical devices such as /dev/sda, system memory /dev/mem, +system ports /dev/port and others. This is useful to securely turn off physical device +access by the executed process. Defaults to false. Enabling this option will install a system call filter to +block low-level I/O system calls that are grouped in the C<@raw-io> set, will also remove +C and C from the capability bounding set for the +unit (see above), and set C (see L for details). Note that using this setting will disconnect propagation of mounts from the service to the host (propagation in the opposite direction continues to work). This means that this setting may not be used for -services which shall be able to install mount points in the main mount namespace. The new /dev -will be mounted read-only and 'noexec'. The latter may break old programs which try to set up executable memory by -using L of -/dev/zero instead of using C. For this setting the same restrictions -regarding mount propagation and privileges apply as for C and related calls, see above. -If turned on and if running in user mode, or in system mode, but without the C -capability (e.g. setting C), C is implied. +services which shall be able to install mount points in the main mount namespace. The new +/dev will be mounted read-only and 'noexec'. The latter may break old programs which try +to set up executable memory by using +L of +/dev/zero instead of using C. For this setting the same +restrictions regarding mount propagation and privileges apply as for C and +related calls, see above. If turned on and if running in user mode, or in system mode, but without the +C capability (e.g. setting C), +C is implied. -Note that the implementation of this setting might be impossible (for example if mount namespaces -are not available), and the unit should be written in a way that does not solely rely on this setting for +Note that the implementation of this setting might be impossible (for example if mount namespaces are not +available), and the unit should be written in a way that does not solely rely on this setting for security. I< Optional. Type boolean. > =head2 PrivateNetwork -Takes a boolean argument. If true, sets up a -new network namespace for the executed processes and -configures only the loopback network device -C inside it. No other network devices will -be available to the executed process. This is useful to -turn off network access by the executed process. -Defaults to false. It is possible to run two or more units -within the same private network namespace by using the -C directive, see -L -for details. Note that this option will disconnect all socket -families from the host, this includes AF_NETLINK and AF_UNIX. -The latter has the effect that AF_UNIX sockets in the abstract -socket namespace will become unavailable to the processes -(however, those located in the file system will continue to be -accessible). +Takes a boolean argument. If true, sets up a new network namespace for the executed processes +and configures only the loopback network device C inside it. No other network devices will +be available to the executed process. This is useful to turn off network access by the executed process. +Defaults to false. It is possible to run two or more units within the same private network namespace by using +the C directive, see +L for +details. Note that this option will disconnect all socket families from the host, this includes AF_NETLINK and +AF_UNIX. The latter has the effect that AF_UNIX sockets in the abstract socket namespace will become +unavailable to the processes (however, those located in the file system will continue to be accessible). -Note that the implementation of this setting might be impossible (for example if network namespaces -are not available), and the unit should be written in a way that does not solely rely on this setting for +Note that the implementation of this setting might be impossible (for example if network namespaces are +not available), and the unit should be written in a way that does not solely rely on this setting for security. I< Optional. Type boolean. > =head2 PrivateUsers @@ -2409,43 +2373,14 @@ such as C will affect only the latter, and there's no way to acquire additional capabilities in the host's user namespace. Defaults to off. -This setting is particularly useful in conjunction with -C/C, as the need to synchronize the user and group -databases in the root directory and on the host is reduced, as the only users and groups who need to be matched -are C, C and the unit's own user and group. - -Note that the implementation of this setting might be impossible (for example if user namespaces -are not available), and the unit should be written in a way that does not solely rely on this setting for -security. I< Optional. Type boolean. > - -=head2 ProtectSystem - -Takes a boolean argument or the special values C or -C. If true, mounts the /usr and /boot -directories read-only for processes invoked by this unit. If set to C, the -/etc directory is mounted read-only, too. If set to C the entire -file system hierarchy is mounted read-only, except for the API file system subtrees /dev, -/proc and /sys (protect these directories using -C, C, -C). This setting ensures that any modification of the vendor-supplied -operating system (and optionally its configuration, and local mounts) is prohibited for the service. It is -recommended to enable this setting for all long-running services, unless they are involved with system updates -or need to modify the operating system in other ways. If this option is used, -C may be used to exclude specific directories from being made read-only. This -setting is implied if C is set. For this setting the same restrictions regarding -mount propagation and privileges apply as for C and related calls, see -above. Defaults to off. I< Optional. Type enum. choice: 'no', 'yes', 'full', 'strict'. > - -=head2 ProtectHome - -Takes a boolean argument or C. If true, the directories -/home, /root and /run/user are made inaccessible -and empty for processes invoked by this unit. If set to C, the three directories are -made read-only instead. It is recommended to enable this setting for all long-running services (in particular -network-facing ones), to ensure they cannot get access to private user data, unless the services actually -require access to the user's private data. This setting is implied if C is -set. For this setting the same restrictions regarding mount propagation and privileges apply as for -C and related calls, see above. I< Optional. Type enum. choice: 'no', 'yes', 'read-only'. > +This setting is particularly useful in conjunction with +C/C, as the need to synchronize the user and group +databases in the root directory and on the host is reduced, as the only users and groups who need to be matched +are C, C and the unit's own user and group. + +Note that the implementation of this setting might be impossible (for example if user namespaces are not +available), and the unit should be written in a way that does not solely rely on this setting for +security. I< Optional. Type boolean. > =head2 ProtectKernelTunables @@ -2468,24 +2403,19 @@ =head2 ProtectKernelModules -Takes a boolean argument. If true, explicit module loading will -be denied. This allows to turn off module load and unload operations on modular -kernels. It is recommended to turn this on for most services that do not need special -file systems or extra kernel modules to work. Default to off. Enabling this option -removes C from the capability bounding set for -the unit, and installs a system call filter to block module system calls, -also /usr/lib/modules is made inaccessible. For this -setting the same restrictions regarding mount propagation and privileges -apply as for C and related calls, see above. -Note that limited automatic module loading due to user configuration or kernel -mapping tables might still happen as side effect of requested user operations, +Takes a boolean argument. If true, explicit module loading will be denied. This allows to turn +off module load and unload operations on modular kernels. It is recommended to turn this on for most services +that do not need special file systems or extra kernel modules to work. Defaults to off. Enabling this option +removes C from the capability bounding set for the unit, and installs a +system call filter to block module system calls, also /usr/lib/modules is made +inaccessible. For this setting the same restrictions regarding mount propagation and privileges apply as for +C and related calls, see above. Note that limited automatic module loading due +to user configuration or kernel mapping tables might still happen as side effect of requested user operations, both privileged and unprivileged. To disable module auto-load feature please see LC mechanism and -/proc/sys/kernel/modules_disabled documentation. -If turned on and if running in user mode, or in system mode, but without the C -capability (e.g. setting C), C -is implied. -I< Optional. Type boolean. > +/proc/sys/kernel/modules_disabled documentation. If turned on and if running in user +mode, or in system mode, but without the C capability (e.g. setting +C), C is implied. I< Optional. Type boolean. > =head2 ProtectControlGroups @@ -2494,129 +2424,136 @@ unit. Except for container managers no services should require write access to the control groups hierarchies; it is hence recommended to turn this on for most services. For this setting the same restrictions regarding mount propagation and privileges apply as for C and related calls, see -above. Defaults to off. If C is set, C is -implied. I< Optional. Type boolean. > - -=head2 MountFlags - -Takes a mount propagation flag: C, C or -C, which control whether mounts in the file system namespace set up for this unit's -processes will receive or propagate mounts and unmounts. See L for -details. Defaults to C. Use C to ensure that mounts and unmounts -are propagated from systemd's namespace to the service's namespace and vice versa. Use C -to run processes so that none of their mounts and unmounts will propagate to the host. Use C -to also ensure that no mounts and unmounts from the host will propagate into the unit processes' namespace. -If this is set to C or C, any mounts created by spawned processes -will be unmounted after the completion of the current command line of C, -C, C, -and C. Note that -C means that file systems mounted on the host might stay mounted continuously in the -unit's namespace, and thus keep the device busy. Note that the file system namespace related options -(C, C, C, -C, C, -C, C, -C, C) require that mount and unmount -propagation from the unit's file system namespace is disabled, and hence downgrade C to -C. I< Optional. Type uniline. > +above. Defaults to off. If C is set, C +is implied. I< Optional. Type boolean. > -=head2 UtmpIdentifier +=head2 RestrictAddressFamilies -Takes a four character identifier string for -an L -and wtmp entry for this service. This should only be -set for services such as getty -implementations (such as L) -where utmp/wtmp entries must be created and cleared before and -after execution, or for services that shall be executed as if -they were run by a getty process (see -below). If the configured string is longer than four -characters, it is truncated and the terminal four characters -are used. This setting interprets %I style string -replacements. This setting is unset by default, i.e. no -utmp/wtmp entries are created or cleaned up for this -service. I< Optional. Type uniline. > +Restricts the set of socket address families accessible to the processes of this unit. Takes a +space-separated list of address family names to whitelist, such as C, +C or C. When prefixed with C<~> the +listed address families will be applied as blacklist, otherwise as whitelist. Note that this restricts access +to the L system call +only. Sockets passed into the process by other means (for example, by using socket activation with socket +units, see L) +are unaffected. Also, sockets created with socketpair() (which creates connected AF_UNIX +sockets only) are unaffected. Note that this option has no effect on 32-bit x86, s390, s390x, mips, mips-le, +ppc, ppc-le, pcc64, ppc64-le and is ignored (but works correctly on other ABIs, including x86-64). Note that on +systems supporting multiple ABIs (such as x86/x86-64) it is recommended to turn off alternative ABIs for +services, so that they cannot be used to circumvent the restrictions of this option. Specifically, it is +recommended to combine this option with C or similar. If +running in user mode, or in system mode, but without the C capability +(e.g. setting C), C is implied. By default, +no restrictions apply, all address families are accessible to processes. If assigned the empty string, any +previous address familiy restriction changes are undone. This setting does not affect commands prefixed with +C<+>. -=head2 UtmpMode +Use this option to limit exposure of processes to remote access, in particular via exotic and sensitive +network protocols, such as C. Note that in most cases, the local +C address family should be included in the configured whitelist as it is frequently +used for local communication, including for +L +logging. I< Optional. Type uniline. > -Takes one of C, -C or C. If -C is set, controls which -type of L/wtmp -entries for this service are generated. This setting has no -effect unless C is set -too. If C is set, only an -C entry is generated and the -invoked process must implement a -getty-compatible utmp/wtmp logic. If -C is set, first an -C entry, followed by a -C entry is generated. In -this case, the invoked process must implement a L-compatible -utmp/wtmp logic. If C is set, first an -C entry, then a -C entry and finally a -C entry is generated. In this -case, the invoked process may be any process that is suitable -to be run as session leader. Defaults to -C. I< Optional. Type enum. choice: 'init', 'login', 'user'. > +=head2 RestrictNamespaces -=head2 SELinuxContext +Restricts access to Linux namespace functionality for the processes of this unit. For details +about Linux namespaces, see L. Either +takes a boolean argument, or a space-separated list of namespace type identifiers. If false (the default), no +restrictions on namespace creation and switching are made. If true, access to any kind of namespacing is +prohibited. Otherwise, a space-separated list of namespace type identifiers must be specified, consisting of +any combination of: C, C, C, +C, C, C and C. Any +namespace type listed is made accessible to the unit's processes, access to namespace types not listed is +prohibited (whitelisting). By prepending the list with a single tilde character (C<~>) the +effect may be inverted: only the listed namespace types will be made inaccessible, all unlisted ones are +permitted (blacklisting). If the empty string is assigned, the default namespace restrictions are applied, +which is equivalent to false. Internally, this setting limits access to the +L, +L and +L system calls, taking +the specified flags parameters into account. Note that — if this option is used — in addition to restricting +creation and switching of the specified types of namespaces (or all of them, if true) access to the +setns() system call with a zero flags parameter is prohibited. This setting is only +supported on x86, x86-64, mips, mips-le, mips64, mips64-le, mips64-n32, mips64-le-n32, ppc64, ppc64-le, s390 +and s390x, and enforces no restrictions on other architectures. If running in user mode, or in system mode, but +without the C capability (e.g. setting C), +C is implied. I< Optional. Type uniline. > -Set the SELinux security context of the -executed process. If set, this will override the automated -domain transition. However, the policy still needs to -authorize the transition. This directive is ignored if SELinux -is disabled. If prefixed by C<->, all errors -will be ignored. This does not affect commands prefixed with C<+>. -See L -for details. I< Optional. Type uniline. > +=head2 LockPersonality -=head2 AppArmorProfile +Takes a boolean argument. If set, locks down the L system +call so that the kernel execution domain may not be changed from the default or the personality selected with +C directive. This may be useful to improve security, because odd personality +emulations may be poorly tested and source of vulnerabilities. If running in user mode, or in system mode, but +without the C capability (e.g. setting C), +C is implied. I< Optional. Type boolean. > -Takes a profile name as argument. The process -executed by the unit will switch to this profile when started. -Profiles must already be loaded in the kernel, or the unit -will fail. This result in a non operation if AppArmor is not -enabled. If prefixed by C<->, all errors will -be ignored. This does not affect commands prefixed with C<+>. I< Optional. Type uniline. > +=head2 MemoryDenyWriteExecute -=head2 SmackProcessLabel +Takes a boolean argument. If set, attempts to create memory mappings that are writable and +executable at the same time, or to change existing memory mappings to become executable, or mapping shared +memory segments as executable are prohibited. Specifically, a system call filter is added that rejects +L system calls with both +C and C set, +L or +L system calls +with C set and +L system calls with +C set. Note that this option is incompatible with programs and libraries that +generate program code dynamically at runtime, including JIT execution engines, executable stacks, and code +"trampoline" feature of various C compilers. This option improves service security, as it makes harder for +software exploits to change running code dynamically. Note that this feature is fully available on x86-64, and +partially on x86. Specifically, the shmat() protection is not available on x86. Note that +on systems supporting multiple ABIs (such as x86/x86-64) it is recommended to turn off alternative ABIs for +services, so that they cannot be used to circumvent the restrictions of this option. Specifically, it is +recommended to combine this option with C or similar. If +running in user mode, or in system mode, but without the C capability +(e.g. setting C), C is implied. I< Optional. Type boolean. > -Takes a C security -label as argument. The process executed by the unit will be -started under this label and SMACK will decide whether the -process is allowed to run or not, based on it. The process -will continue to run under the label specified here unless the -executable has its own C label, in -which case the process will transition to run under that -label. When not specified, the label that systemd is running -under is used. This directive is ignored if SMACK is -disabled. +=head2 RestrictRealtime -The value may be prefixed by C<->, in -which case all errors will be ignored. An empty value may be -specified to unset previous assignments. This does not affect -commands prefixed with C<+>. I< Optional. Type uniline. > +Takes a boolean argument. If set, any attempts to enable realtime scheduling in a process of +the unit are refused. This restricts access to realtime task scheduling policies such as +C, C or C. See +L +for details about these scheduling policies. If running in user mode, or in system mode, but without the +C capability (e.g. setting C), +C is implied. Realtime scheduling policies may be used to monopolize CPU +time for longer periods of time, and may hence be used to lock up or otherwise trigger Denial-of-Service +situations on the system. It is hence recommended to restrict access to realtime scheduling to the few programs +that actually require them. Defaults to off. I< Optional. Type boolean. > -=head2 IgnoreSIGPIPE +=head2 RemoveIPC -Takes a boolean argument. If true, causes -C to be ignored in the executed -process. Defaults to true because C -generally is useful only in shell pipelines. I< Optional. Type boolean. > +Takes a boolean parameter. If set, all System V and POSIX IPC objects owned by the user and +group the processes of this unit are run as are removed when the unit is stopped. This setting only has an +effect if at least one of C, C and +C are used. It has no effect on IPC objects owned by the root user. Specifically, +this removes System V semaphores, as well as System V and POSIX shared memory segments and message queues. If +multiple units use the same user or group the IPC objects are removed when the last of these units is +stopped. This setting is implied if C is set. I< Optional. Type boolean. > -=head2 NoNewPrivileges +=head2 MountFlags -Takes a boolean argument. If true, ensures that the service process and all its children can -never gain new privileges through execve() (e.g. via setuid or setgid bits, or filesystem -capabilities). This is the simplest and most effective way to ensure that a process and its children can never -elevate privileges again. Defaults to false, but certain settings force -C, ignoring the value of this setting. This is the case when -C, C, -C, C, -C, C, -C, C, or -C are specified. I< Optional. Type boolean. > +Takes a mount propagation flag: C, C or +C, which control whether mounts in the file system namespace set up for this unit's +processes will receive or propagate mounts and unmounts. See L for +details. Defaults to C. Use C to ensure that mounts and unmounts +are propagated from systemd's namespace to the service's namespace and vice versa. Use C +to run processes so that none of their mounts and unmounts will propagate to the host. Use +C to also ensure that no mounts and unmounts from the host will propagate into the unit +processes' namespace. If this is set to C or C, any mounts created +by spawned processes will be unmounted after the completion of the current command line of +C, C, C, and +C. Note that C means that file systems mounted on the host +might stay mounted continuously in the unit's namespace, and thus keep the device busy. Note that the file +system namespace related options (C, C, +C, C, C, +C, C, +C, C) require that mount and unmount +propagation from the unit's file system namespace is disabled, and hence downgrade C to +C. I< Optional. Type uniline. > =head2 SystemCallFilter @@ -2624,16 +2561,20 @@ executed by the unit processes except for the listed ones will result in immediate process termination with the C signal (whitelisting). If the first character of the list is C<~>, the effect is inverted: only the listed system calls will result in immediate process termination -(blacklisting). If running in user mode, or in system mode, but without the C -capability (e.g. setting C), C is -implied. This feature makes use of the Secure Computing Mode 2 interfaces of the kernel ('seccomp filtering') -and is useful for enforcing a minimal sandboxing environment. Note that the execve, -exit, exit_group, getrlimit, -rt_sigreturn, sigreturn system calls and the system calls for -querying time and sleeping are implicitly whitelisted and do not need to be listed explicitly. This option may -be specified more than once, in which case the filter masks are merged. If the empty string is assigned, the -filter is reset, all prior assignments will have no effect. This does not affect commands prefixed with -C<+>. +(blacklisting). Blacklisted system calls and system call groups may optionally be suffixed with a colon +(C<:>) and C error number (between 0 and 4095) or errno name such as +C, C or C. This value will be +returned when a blacklisted system call is triggered, instead of terminating the processes immediately. This +value takes precedence over the one given in C. If running in user +mode, or in system mode, but without the C capability (e.g. setting +C), C is implied. This feature makes use of +the Secure Computing Mode 2 interfaces of the kernel ('seccomp filtering') and is useful for enforcing a +minimal sandboxing environment. Note that the execve, exit, +exit_group, getrlimit, rt_sigreturn, +sigreturn system calls and the system calls for querying time and sleeping are implicitly +whitelisted and do not need to be listed explicitly. This option may be specified more than once, in which case +the filter masks are merged. If the empty string is assigned, the filter is reset, all prior assignments will +have no effect. This does not affect commands prefixed with C<+>. Note that on systems supporting multiple ABIs (such as x86/x86-64) it is recommended to turn off alternative ABIs for services, so that they cannot be used to circumvent the restrictions of this @@ -2648,30 +2589,21 @@ might be necessary to temporarily disable system call filters in order to simplify debugging of such failures. -If you specify both types of this option (i.e. -whitelisting and blacklisting), the first encountered will -take precedence and will dictate the default action -(termination or approval of a system call). Then the next -occurrences of this option will add or delete the listed -system calls from the set of the filtered system calls, -depending of its type and the default action. (For example, if -you have started with a whitelisting of -read and write, and -right after it add a blacklisting of -write, then write -will be removed from the set.) - -As the number of possible system -calls is large, predefined sets of system calls are provided. -A set starts with C<@> character, followed by -name of the set. +If you specify both types of this option (i.e. whitelisting and blacklisting), the first encountered +will take precedence and will dictate the default action (termination or approval of a system call). Then the +next occurrences of this option will add or delete the listed system calls from the set of the filtered system +calls, depending of its type and the default action. (For example, if you have started with a whitelisting of +read and write, and right after it add a blacklisting of +write, then write will be removed from the set.) + +As the number of possible system calls is large, predefined sets of system calls are provided. A set +starts with C<@> character, followed by name of the set. Currently predefined system call setsSetDescription@aioAsynchronous I/O (L, L, and related calls)@basic-ioSystem calls for basic I/O: reading, writing, seeking, file descriptor duplication and closing (L, L, and related calls)@chownChanging file ownership (L, L, and related calls)@clockSystem calls for changing the system clock (L, L, and related calls)@cpu-emulationSystem calls for CPU emulation functionality (L and related calls)@debugDebugging, performance monitoring and tracing functionality (L, L and related calls)@file-systemFile system operations: opening, creating files and directories for read and write, renaming and removing them, reading file properties, or creating hard and symbolic links.@io-eventEvent loop system calls (L, L, L, L and related calls)@ipcPipes, SysV IPC, POSIX Message Queues and other IPC (L, L)@keyringKernel keyring access (L and related calls)@memlockLocking of memory into RAM (L, L and related calls)@moduleLoading and unloading of kernel modules (L, L and related calls)@mountMounting and unmounting of file systems (L, L, and related calls)@network-ioSocket I/O (including local AF_UNIX): L, L@obsoleteUnusual, obsolete or unimplemented (L, L, …)@privilegedAll system calls which need super-user capabilities (L)@processProcess control, execution, namespaceing operations (L, L, L, …@raw-ioRaw I/O port access (L, L, pciconfig_read(), …)@rebootSystem calls for rebooting and reboot preparation (L, kexec(), …)@resourcesSystem calls for changing resource limits, memory and scheduling parameters (L, L, …)@setuidSystem calls for changing user ID and group ID credentials, (L, L, L, …)@signalSystem calls for manipulating and handling process signals (L, L, …)@swapSystem calls for enabling/disabling swap devices (L, L)@syncSynchronizing files and memory to disk: (L, L, and related calls)@timerSystem calls for scheduling operations by time (L, L, …) -Note, that as new system calls are added to the kernel, additional system calls might be -added to the groups above. Contents of the sets may also change between systemd -versions. In addition, the list of system calls depends on the kernel version and -architecture for which systemd was compiled. Use -systemd-analyze syscall-filter to list the actual list of system calls in -each filter. +Note, that as new system calls are added to the kernel, additional system calls might be added to the groups +above. Contents of the sets may also change between systemd versions. In addition, the list of system calls +depends on the kernel version and architecture for which systemd was compiled. Use +systemd-analyze syscall-filter to list the actual list of system calls in each +filter. It is recommended to combine the file system namespacing related options with C, in order to prohibit the unit's processes to undo the @@ -2683,15 +2615,11 @@ =head2 SystemCallErrorNumber -Takes an C error number -name to return when the system call filter configured with -C is triggered, instead of -terminating the process immediately. Takes an error name such -as C, C or -C. When this setting is not used, -or when the empty string is assigned, the process will be -terminated immediately when the filter is -triggered. I< Optional. Type uniline. > +Takes an C error number (between 1 and 4095) or errno name such as +C, C or C, to return when the +system call filter configured with C is triggered, instead of terminating +the process immediately. When this setting is not used, or when the empty string is assigned, the process will +be terminated immediately when the filter is triggered. I< Optional. Type uniline. > =head2 SystemCallArchitectures @@ -2721,501 +2649,412 @@ L for details. I< Optional. Type uniline. > -=head2 RestrictAddressFamilies - -Restricts the set of socket address families accessible to the processes of this unit. Takes a -space-separated list of address family names to whitelist, such as C, -C or C. When prefixed with C<~> the -listed address families will be applied as blacklist, otherwise as whitelist. Note that this restricts access -to the L system call -only. Sockets passed into the process by other means (for example, by using socket activation with socket -units, see L) -are unaffected. Also, sockets created with socketpair() (which creates connected AF_UNIX -sockets only) are unaffected. Note that this option has no effect on 32-bit x86, s390, s390x, mips, mips-le, -ppc, ppc-le, pcc64, ppc64-le and is ignored (but works correctly on other ABIs, including x86-64). Note that on -systems supporting multiple ABIs (such as x86/x86-64) it is recommended to turn off alternative ABIs for -services, so that they cannot be used to circumvent the restrictions of this option. Specifically, it is -recommended to combine this option with C or similar. If -running in user mode, or in system mode, but without the C capability -(e.g. setting C), C is implied. By default, -no restrictions apply, all address families are accessible to processes. If assigned the empty string, any -previous address familiy restriction changes are undone. This setting does not affect commands prefixed with -C<+>. - -Use this option to limit exposure of processes to remote access, in particular via exotic and sensitive -network protocols, such as C. Note that in most cases, the local -C address family should be included in the configured whitelist as it is frequently -used for local communication, including for -L -logging. I< Optional. Type uniline. > - -=head2 RestrictNamespaces - -Restricts access to Linux namespace functionality for the processes of this unit. For details -about Linux namespaces, see -L. Either takes a -boolean argument, or a space-separated list of namespace type identifiers. If false (the default), no -restrictions on namespace creation and switching are made. If true, access to any kind of namespacing is -prohibited. Otherwise, a space-separated list of namespace type identifiers must be specified, consisting of -any combination of: C, C, C, -C, C, C and C. Any -namespace type listed is made accessible to the unit's processes, access to namespace types not listed is -prohibited (whitelisting). By prepending the list with a single tilde character (C<~>) the -effect may be inverted: only the listed namespace types will be made inaccessible, all unlisted ones are -permitted (blacklisting). If the empty string is assigned, the default namespace restrictions are applied, -which is equivalent to false. Internally, this setting limits access to the -L, -L and -L system calls, taking -the specified flags parameters into account. Note that — if this option is used — in addition to restricting -creation and switching of the specified types of namespaces (or all of them, if true) access to the -setns() system call with a zero flags parameter is prohibited. This setting is only -supported on x86, x86-64, mips, mips-le, mips64, mips64-le, mips64-n32, mips64-le-n32, ppc64, ppc64-le, -s390 and s390x, and enforces no restrictions on other architectures. If running in user -mode, or in system mode, but without the C capability (e.g. setting -C), C is implied. I< Optional. Type uniline. > - -=head2 Personality - -Controls which kernel architecture L shall report, -when invoked by unit processes. Takes one of the architecture identifiers C, -C, C, C, C, -C, C or C. Which personality -architectures are supported depends on the system architecture. Usually the 64bit versions of the various -system architectures support their immediate 32bit personality architecture counterpart, but no others. For -example, C systems support the C and -C personalities but no others. The personality feature is useful when running 32-bit -services on a 64-bit host system. If not specified, the personality is left unmodified and thus reflects the -personality of the host system's kernel. I< Optional. Type enum. choice: 'x86', 'x86-64', 'ppc', 'ppc-le', 'ppc64', 'ppc64-le', 's390', 's390x'. > - -=head2 LockPersonality - -Takes a boolean argument. If set, locks down the L system -call so that the kernel execution domain may not be changed from the default or the personality selected with -C directive. This may be useful to improve security, because odd personality -emulations may be poorly tested and source of vulnerabilities. If running in user mode, or in system mode, but -without the C capability (e.g. setting C), -C is implied. I< Optional. Type boolean. > - -=head2 KeyringMode - -Controls how the kernel session keyring is set up for the service (see L for -details on the session keyring). Takes one of C, C, -C. If set to C no special keyring setup is done, and the kernel's -default behaviour is applied. If C is used a new session keyring is allocated when a -service process is invoked, and it is not linked up with any user keyring. This is the recommended setting for -system services, as this ensures that multiple services running under the same system user ID (in particular -the root user) do not share their key material among each other. If C is used a new -session keyring is allocated as for C, but the user keyring of the user configured with -C is linked into it, so that keys assigned to the user may be requested by the unit's -processes. In this modes multiple units running processes under the same user ID may share key material. Unless -C is selected the unique invocation ID for the unit (see below) is added as a protected -key by the name C to the newly created session keyring. Defaults to -C for the system service manager and to C for the user service -manager. I< Optional. Type enum. choice: 'inherit', 'private', 'shared'. > - -=head2 RuntimeDirectory - -These options take a whitespace-separated list of directory names. The specified directory -names must be relative, and may not include C<.> or C<..>. If set, one or more -directories by the specified names will be created (including their parents) below /run -(or C<$XDG_RUNTIME_DIR> for user services), /var/lib (or -C<$XDG_CONFIG_HOME> for user services), /var/cache (or -C<$XDG_CACHE_HOME> for user services), /var/log (or -C<$XDG_CONFIG_HOME>/log for user services), or /etc -(or C<$XDG_CONFIG_HOME> for user services), respectively, when the unit is started. - -In case of C the lowest subdirectories are removed when the unit is -stopped. It is possible to preserve the specified directories in this case if -C is configured to C or C -(see below). The directories specified with C, -C, C, -C are not removed when the unit is stopped. - -Except in case of C, the innermost specified directories will be -owned by the user and group specified in C and C. If the -specified directories already exist and their owning user or group do not match the configured ones, all files -and directories below the specified directories as well as the directories themselves will have their file -ownership recursively changed to match what is configured. As an optimization, if the specified directories are -already owned by the right user and group, files and directories below of them are left as-is, even if they do -not match what is requested. The innermost specified directories will have their access mode adjusted to the -what is specified in C, C, -C, C and -C. +=head2 Environment -Except in case of C, these options imply -C for the specified paths. When combined with -C or C these paths always reside on the host and -are mounted from there into the unit's file system namespace. If C is used in -conjunction with C, C, -C and C, the behaviour of these options is -slightly altered: the directories are created below /run/private, -/var/lib/private, /var/cache/private and -/var/log/private, respectively, which are host directories made inaccessible to -unprivileged users, which ensures that access to these directories cannot be gained through dynamic user ID -recycling. Symbolic links are created to hide this difference in behaviour. Both from perspective of the host -and from inside the unit, the relevant directories hence always appear directly below -/run, /var/lib, /var/cache and -/var/log. +Sets environment variables for executed processes. Takes a space-separated list of variable +assignments. This option may be specified more than once, in which case all listed variables will be set. If +the same variable is set twice, the later setting will override the earlier setting. If the empty string is +assigned to this option, the list of environment variables is reset, all prior assignments have no +effect. Variable expansion is not performed inside the strings, however, specifier expansion is possible. The $ +character has no special meaning. If you need to assign a value containing spaces or the equals sign to a +variable, use double quotes (") for the assignment. -Use C to manage one or more runtime directories for the unit and bind -their lifetime to the daemon runtime. This is particularly useful for unprivileged daemons that cannot create -runtime directories in /run due to lack of privileges, and to make sure the runtime -directory is cleaned up automatically after use. For runtime directories that require more complex or different -configuration or lifetime guarantees, please consider using -L. +Example: -Example: if a system service unit has the following, + Environment="VAR1=word1 word2" VAR2=word3 "VAR3=$word 5 6" - RuntimeDirectory=foo/bar baz +gives three variables C, +C, C +with the values C, +C, C<$word 5 6>. -the service manager creates /run/foo (if it does not exist), /run/foo/bar, -and /run/baz. The directories /run/foo/bar and /run/baz -except /run/foo are owned by the user and group specified in C and -C, and removed when the service is stopped. -I< Optional. Type uniline. > +See L for details +about environment variables. I< Optional. Type list of uniline. > -=head2 StateDirectory +=head2 EnvironmentFile -These options take a whitespace-separated list of directory names. The specified directory -names must be relative, and may not include C<.> or C<..>. If set, one or more -directories by the specified names will be created (including their parents) below /run -(or C<$XDG_RUNTIME_DIR> for user services), /var/lib (or -C<$XDG_CONFIG_HOME> for user services), /var/cache (or -C<$XDG_CACHE_HOME> for user services), /var/log (or -C<$XDG_CONFIG_HOME>/log for user services), or /etc -(or C<$XDG_CONFIG_HOME> for user services), respectively, when the unit is started. +Similar to C but reads the environment variables from a text +file. The text file should contain new-line-separated variable assignments. Empty lines, lines without an +C<=> separator, or lines starting with ; or # will be ignored, which may be used for +commenting. A line ending with a backslash will be concatenated with the following one, allowing multiline +variable definitions. The parser strips leading and trailing whitespace from the values of assignments, unless +you use double quotes ("). + +The argument passed should be an absolute filename or wildcard expression, optionally prefixed with +C<->, which indicates that if the file does not exist, it will not be read and no error or +warning message is logged. This option may be specified more than once in which case all specified files are +read. If the empty string is assigned to this option, the list of file to read is reset, all prior assignments +have no effect. + +The files listed with this directive will be read shortly before the process is executed (more +specifically, after all processes from a previous unit state terminated. This means you can generate these +files in one unit state, and read it with this option in the next). + +Settings from these files override settings made with C. If the same +variable is set twice from these files, the files will be read in the order they are specified and the later +setting will override the earlier setting. I< Optional. Type list of uniline. > -In case of C the lowest subdirectories are removed when the unit is -stopped. It is possible to preserve the specified directories in this case if -C is configured to C or C -(see below). The directories specified with C, -C, C, -C are not removed when the unit is stopped. +=head2 PassEnvironment -Except in case of C, the innermost specified directories will be -owned by the user and group specified in C and C. If the -specified directories already exist and their owning user or group do not match the configured ones, all files -and directories below the specified directories as well as the directories themselves will have their file -ownership recursively changed to match what is configured. As an optimization, if the specified directories are -already owned by the right user and group, files and directories below of them are left as-is, even if they do -not match what is requested. The innermost specified directories will have their access mode adjusted to the -what is specified in C, C, -C, C and -C. +Pass environment variables set for the system service manager to executed processes. Takes a +space-separated list of variable names. This option may be specified more than once, in which case all listed +variables will be passed. If the empty string is assigned to this option, the list of environment variables to +pass is reset, all prior assignments have no effect. Variables specified that are not set for the system +manager will not be passed and will be silently ignored. Note that this option is only relevant for the system +service manager, as system services by default do not automatically inherit any environment variables set for +the service manager itself. However, in case of the user service manager all environment variables are passed +to the executed processes anyway, hence this option is without effect for the user service manager. -Except in case of C, these options imply -C for the specified paths. When combined with -C or C these paths always reside on the host and -are mounted from there into the unit's file system namespace. If C is used in -conjunction with C, C, -C and C, the behaviour of these options is -slightly altered: the directories are created below /run/private, -/var/lib/private, /var/cache/private and -/var/log/private, respectively, which are host directories made inaccessible to -unprivileged users, which ensures that access to these directories cannot be gained through dynamic user ID -recycling. Symbolic links are created to hide this difference in behaviour. Both from perspective of the host -and from inside the unit, the relevant directories hence always appear directly below -/run, /var/lib, /var/cache and -/var/log. +Variables set for invoked processes due to this setting are subject to being overridden by those +configured with C or C. -Use C to manage one or more runtime directories for the unit and bind -their lifetime to the daemon runtime. This is particularly useful for unprivileged daemons that cannot create -runtime directories in /run due to lack of privileges, and to make sure the runtime -directory is cleaned up automatically after use. For runtime directories that require more complex or different -configuration or lifetime guarantees, please consider using -L. +Example: -Example: if a system service unit has the following, + PassEnvironment=VAR1 VAR2 VAR3 - RuntimeDirectory=foo/bar baz +passes three variables C, +C, C +with the values set for those variables in PID1. -the service manager creates /run/foo (if it does not exist), /run/foo/bar, -and /run/baz. The directories /run/foo/bar and /run/baz -except /run/foo are owned by the user and group specified in C and -C, and removed when the service is stopped. -I< Optional. Type uniline. > +See L for details +about environment variables. I< Optional. Type list of uniline. > -=head2 CacheDirectory +=head2 UnsetEnvironment -These options take a whitespace-separated list of directory names. The specified directory -names must be relative, and may not include C<.> or C<..>. If set, one or more -directories by the specified names will be created (including their parents) below /run -(or C<$XDG_RUNTIME_DIR> for user services), /var/lib (or -C<$XDG_CONFIG_HOME> for user services), /var/cache (or -C<$XDG_CACHE_HOME> for user services), /var/log (or -C<$XDG_CONFIG_HOME>/log for user services), or /etc -(or C<$XDG_CONFIG_HOME> for user services), respectively, when the unit is started. +Explicitly unset environment variable assignments that would normally be passed from the +service manager to invoked processes of this unit. Takes a space-separated list of variable names or variable +assignments. This option may be specified more than once, in which case all listed variables/assignments will +be unset. If the empty string is assigned to this option, the list of environment variables/assignments to +unset is reset. If a variable assignment is specified (that is: a variable name, followed by +C<=>, followed by its value), then any environment variable matching this precise assignment is +removed. If a variable name is specified (that is a variable name without any following C<=> or +value), then any assignment matching the variable name, regardless of its value is removed. Note that the +effect of C is applied as final step when the environment list passed to +executed processes is compiled. That means it may undo assignments from any configuration source, including +assignments made through C or C, inherited from +the system manager's global set of environment variables, inherited via C, +set by the service manager itself (such as C<$NOTIFY_SOCKET> and such), or set by a PAM module +(in case C is used). -In case of C the lowest subdirectories are removed when the unit is -stopped. It is possible to preserve the specified directories in this case if -C is configured to C or C -(see below). The directories specified with C, -C, C, -C are not removed when the unit is stopped. +See L for details +about environment variables. I< Optional. Type list of uniline. > -Except in case of C, the innermost specified directories will be -owned by the user and group specified in C and C. If the -specified directories already exist and their owning user or group do not match the configured ones, all files -and directories below the specified directories as well as the directories themselves will have their file -ownership recursively changed to match what is configured. As an optimization, if the specified directories are -already owned by the right user and group, files and directories below of them are left as-is, even if they do -not match what is requested. The innermost specified directories will have their access mode adjusted to the -what is specified in C, C, -C, C and -C. +=head2 StandardInput -Except in case of C, these options imply -C for the specified paths. When combined with -C or C these paths always reside on the host and -are mounted from there into the unit's file system namespace. If C is used in -conjunction with C, C, -C and C, the behaviour of these options is -slightly altered: the directories are created below /run/private, -/var/lib/private, /var/cache/private and -/var/log/private, respectively, which are host directories made inaccessible to -unprivileged users, which ensures that access to these directories cannot be gained through dynamic user ID -recycling. Symbolic links are created to hide this difference in behaviour. Both from perspective of the host -and from inside the unit, the relevant directories hence always appear directly below -/run, /var/lib, /var/cache and -/var/log. +Controls where file descriptor 0 (STDIN) of the executed processes is connected to. Takes one +of C, C, C, C, +C, C, C or +C. + +If C is selected, standard input will be connected to /dev/null, +i.e. all read attempts by the process will result in immediate EOF. + +If C is selected, standard input is connected to a TTY (as configured by +C, see below) and the executed process becomes the controlling process of the +terminal. If the terminal is already being controlled by another process, the executed process waits until the +current controlling process releases the terminal. + +C is similar to C, but the executed process is forcefully and +immediately made the controlling process of the terminal, potentially removing previous controlling processes +from the terminal. + +C is similar to C, but if the terminal already has a +controlling process start-up of the executed process fails. + +The C option may be used to configure arbitrary textual or binary data to pass via +standard input to the executed process. The data to pass is configured via +C/C (see below). Note that the actual +file descriptor type passed (memory file, regular file, UNIX pipe, …) might depend on the kernel and available +privileges. In any case, the file descriptor is read-only, and when read returns the specified data followed by +EOF. -Use C to manage one or more runtime directories for the unit and bind -their lifetime to the daemon runtime. This is particularly useful for unprivileged daemons that cannot create -runtime directories in /run due to lack of privileges, and to make sure the runtime -directory is cleaned up automatically after use. For runtime directories that require more complex or different -configuration or lifetime guarantees, please consider using -L. +The C option may be used to connect a specific file +system object to standard input. An absolute path following the C<:> character is expected, +which may refer to a regular file, a FIFO or special file. If an C socket in the +file system is specified, a stream socket is connected to it. The latter is useful for connecting standard +input of processes to arbitrary system services. + +The C option is valid in socket-activated services only, and requires the relevant +socket unit file (see +L for details) +to have C set, or to specify a single socket only. If this option is set, standard +input will be connected to the socket the service was activated from, which is primarily useful for +compatibility with daemons designed for use with the traditional L socket activation +daemon. -Example: if a system service unit has the following, +The C option connects standard input to a specific, +named file descriptor provided by a socket unit. The name may be specified as part of this option, following a +C<:> character (e.g. C). If no name is specified, the name +C is implied (i.e. C is equivalent to C). +At least one socket unit defining the specified name must be provided via the C +option, and the file descriptor name may differ from the name of its containing socket unit. If multiple +matches are found, the first one will be used. See C in +L for more +details about named file descriptors and their ordering. - RuntimeDirectory=foo/bar baz +This setting defaults to C. I< Optional. Type enum. choice: 'null', 'tty', 'tty-force', 'tty-fail', 'data', 'socket'. > -the service manager creates /run/foo (if it does not exist), /run/foo/bar, -and /run/baz. The directories /run/foo/bar and /run/baz -except /run/foo are owned by the user and group specified in C and -C, and removed when the service is stopped. -I< Optional. Type uniline. > +=head2 StandardOutput -=head2 LogsDirectory +Controls where file descriptor 1 (STDOUT) of the executed processes is connected to. Takes one +of C, C, C, C, +C, C, C, +C, C, +C, C or +C. + +C duplicates the file descriptor of standard input for standard output. + +C connects standard output to /dev/null, i.e. everything written +to it will be lost. + +C connects standard output to a tty (as configured via C, +see below). If the TTY is used for output only, the executed process will not become the controlling process of +the terminal, and will not fail or wait for other processes to release the terminal. + +C connects standard output with the journal which is accessible via +L. Note that +everything that is written to syslog or kmsg (see below) is implicitly stored in the journal as well, the +specific two options listed below are hence supersets of this one. + +C connects standard output to the L system syslog +service, in addition to the journal. Note that the journal daemon is usually configured to forward everything +it receives to syslog anyway, in which case this option is no different from C. -These options take a whitespace-separated list of directory names. The specified directory -names must be relative, and may not include C<.> or C<..>. If set, one or more -directories by the specified names will be created (including their parents) below /run -(or C<$XDG_RUNTIME_DIR> for user services), /var/lib (or -C<$XDG_CONFIG_HOME> for user services), /var/cache (or -C<$XDG_CACHE_HOME> for user services), /var/log (or -C<$XDG_CONFIG_HOME>/log for user services), or /etc -(or C<$XDG_CONFIG_HOME> for user services), respectively, when the unit is started. +C connects standard output with the kernel log buffer which is accessible via +L, +in addition to the journal. The journal daemon might be configured to send all logs to kmsg anyway, in which +case this option is no different from C. -In case of C the lowest subdirectories are removed when the unit is -stopped. It is possible to preserve the specified directories in this case if -C is configured to C or C -(see below). The directories specified with C, -C, C, -C are not removed when the unit is stopped. +C, C and C work +in a similar way as the three options above but copy the output to the system console as well. -Except in case of C, the innermost specified directories will be -owned by the user and group specified in C and C. If the -specified directories already exist and their owning user or group do not match the configured ones, all files -and directories below the specified directories as well as the directories themselves will have their file -ownership recursively changed to match what is configured. As an optimization, if the specified directories are -already owned by the right user and group, files and directories below of them are left as-is, even if they do -not match what is requested. The innermost specified directories will have their access mode adjusted to the -what is specified in C, C, -C, C and -C. +The C option may be used to connect a specific file +system object to standard output. The semantics are similar to the same option of +C, see above. If standard input and output are directed to the same file +path, it is opened only once, for reading as well as writing and duplicated. This is particular useful when the +specified path refers to an C socket in the file system, as in that case only a +single stream connection is created for both input and output. + +C connects standard output to a socket acquired via socket activation. The +semantics are similar to the same option of C, see above. + +The C option connects standard output to a specific, +named file descriptor provided by a socket unit. A name may be specified as part of this option, following a +C<:> character (e.g. C). If no name is specified, the name +C is implied (i.e. C is equivalent to +C). At least one socket unit defining the specified name must be provided via the +C option, and the file descriptor name may differ from the name of its containing +socket unit. If multiple matches are found, the first one will be used. See +C in +L for more +details about named descriptors and their ordering. -Except in case of C, these options imply -C for the specified paths. When combined with -C or C these paths always reside on the host and -are mounted from there into the unit's file system namespace. If C is used in -conjunction with C, C, -C and C, the behaviour of these options is -slightly altered: the directories are created below /run/private, -/var/lib/private, /var/cache/private and -/var/log/private, respectively, which are host directories made inaccessible to -unprivileged users, which ensures that access to these directories cannot be gained through dynamic user ID -recycling. Symbolic links are created to hide this difference in behaviour. Both from perspective of the host -and from inside the unit, the relevant directories hence always appear directly below -/run, /var/lib, /var/cache and -/var/log. +If the standard output (or error output, see below) of a unit is connected to the journal, syslog or the +kernel log buffer, the unit will implicitly gain a dependency of type C on +systemd-journald.socket (also see the "Implicit Dependencies" section above). Also note +that in this case stdout (or stderr, see below) will be an C stream socket, and not +a pipe or FIFO that can be re-opened. This means when executing shell scripts the construct echo +"hello" > /dev/stderr for writing text to stderr will not work. To mitigate this use the construct +echo "hello" >&2 instead, which is mostly equivalent and avoids this pitfall. + +This setting defaults to the value set with C in +L, which +defaults to C. Note that setting this parameter might result in additional dependencies +to be added to the unit (see above). I< Optional. Type enum. choice: 'inherit', 'null', 'tty', 'journal', 'syslog', 'kmsg', 'journal+console', 'syslog+console', 'kmsg+console', 'socket'. > -Use C to manage one or more runtime directories for the unit and bind -their lifetime to the daemon runtime. This is particularly useful for unprivileged daemons that cannot create -runtime directories in /run due to lack of privileges, and to make sure the runtime -directory is cleaned up automatically after use. For runtime directories that require more complex or different -configuration or lifetime guarantees, please consider using -L. +=head2 StandardError -Example: if a system service unit has the following, +Controls where file descriptor 2 (STDERR) of the executed processes is connected to. The +available options are identical to those of C, with some exceptions: if set to +C the file descriptor used for standard output is duplicated for standard error, while +C will use a default file descriptor name of +C. - RuntimeDirectory=foo/bar baz +This setting defaults to the value set with C in +L, which +defaults to C. Note that setting this parameter might result in additional dependencies +to be added to the unit (see above). I< Optional. Type uniline. > + +=head2 StandardInputText + +Configures arbitrary textual or binary data to pass via file descriptor 0 (STDIN) to the +executed processes. These settings have no effect unless C is set to +C. Use this option to embed process input data directly in the unit file. + +C accepts arbitrary textual data. C-style escapes for special +characters as well as the usual C<%>-specifiers are resolved. Each time this setting is used +the the specified text is appended to the per-unit data buffer, followed by a newline character (thus every use +appends a new line to the end of the buffer). Note that leading and trailing whitespace of lines configured +with this option is removed. If an empty line is specified the buffer is cleared (hence, in order to insert an +empty line, add an additional C<\n> to the end or beginning of a line). + +C accepts arbitrary binary data, encoded in Base64. No escape sequences or specifiers are +resolved. Any whitespace in the encoded version is ignored during decoding. + +Note that C and C operate on the +same data buffer, and may be mixed in order to configure both binary and textual data for the same input +stream. The textual or binary data is joined strictly in the order the settings appear in the unit +file. Assigning an empty string to either will reset the data buffer. -the service manager creates /run/foo (if it does not exist), /run/foo/bar, -and /run/baz. The directories /run/foo/bar and /run/baz -except /run/foo are owned by the user and group specified in C and -C, and removed when the service is stopped. -I< Optional. Type uniline. > +Please keep in mind that in order to maintain readability long unit file settings may be split into +multiple lines, by suffixing each line (except for the last) with a C<\> character (see +L for +details). This is particularly useful for large data configured with these two options. Example: I< Optional. Type uniline. > -=head2 ConfigurationDirectory +=head2 StandardInputData -These options take a whitespace-separated list of directory names. The specified directory -names must be relative, and may not include C<.> or C<..>. If set, one or more -directories by the specified names will be created (including their parents) below /run -(or C<$XDG_RUNTIME_DIR> for user services), /var/lib (or -C<$XDG_CONFIG_HOME> for user services), /var/cache (or -C<$XDG_CACHE_HOME> for user services), /var/log (or -C<$XDG_CONFIG_HOME>/log for user services), or /etc -(or C<$XDG_CONFIG_HOME> for user services), respectively, when the unit is started. +Configures arbitrary textual or binary data to pass via file descriptor 0 (STDIN) to the +executed processes. These settings have no effect unless C is set to +C. Use this option to embed process input data directly in the unit file. + +C accepts arbitrary textual data. C-style escapes for special +characters as well as the usual C<%>-specifiers are resolved. Each time this setting is used +the the specified text is appended to the per-unit data buffer, followed by a newline character (thus every use +appends a new line to the end of the buffer). Note that leading and trailing whitespace of lines configured +with this option is removed. If an empty line is specified the buffer is cleared (hence, in order to insert an +empty line, add an additional C<\n> to the end or beginning of a line). + +C accepts arbitrary binary data, encoded in Base64. No escape sequences or specifiers are +resolved. Any whitespace in the encoded version is ignored during decoding. + +Note that C and C operate on the +same data buffer, and may be mixed in order to configure both binary and textual data for the same input +stream. The textual or binary data is joined strictly in the order the settings appear in the unit +file. Assigning an empty string to either will reset the data buffer. -In case of C the lowest subdirectories are removed when the unit is -stopped. It is possible to preserve the specified directories in this case if -C is configured to C or C -(see below). The directories specified with C, -C, C, -C are not removed when the unit is stopped. +Please keep in mind that in order to maintain readability long unit file settings may be split into +multiple lines, by suffixing each line (except for the last) with a C<\> character (see +L for +details). This is particularly useful for large data configured with these two options. Example: I< Optional. Type uniline. > -Except in case of C, the innermost specified directories will be -owned by the user and group specified in C and C. If the -specified directories already exist and their owning user or group do not match the configured ones, all files -and directories below the specified directories as well as the directories themselves will have their file -ownership recursively changed to match what is configured. As an optimization, if the specified directories are -already owned by the right user and group, files and directories below of them are left as-is, even if they do -not match what is requested. The innermost specified directories will have their access mode adjusted to the -what is specified in C, C, -C, C and -C. +=head2 LogLevelMax -Except in case of C, these options imply -C for the specified paths. When combined with -C or C these paths always reside on the host and -are mounted from there into the unit's file system namespace. If C is used in -conjunction with C, C, -C and C, the behaviour of these options is -slightly altered: the directories are created below /run/private, -/var/lib/private, /var/cache/private and -/var/log/private, respectively, which are host directories made inaccessible to -unprivileged users, which ensures that access to these directories cannot be gained through dynamic user ID -recycling. Symbolic links are created to hide this difference in behaviour. Both from perspective of the host -and from inside the unit, the relevant directories hence always appear directly below -/run, /var/lib, /var/cache and -/var/log. +Configures filtering by log level of log messages generated by this unit. Takes a +syslog log level, one of C (lowest log level, only highest priority +messages), C, C, C, C, +C, C, C (highest log level, also lowest priority +messages). See L for +details. By default no filtering is applied (i.e. the default maximum log level is C). Use +this option to configure the logging system to drop log messages of a specific service above the specified +level. For example, set CC in order to turn off debug logging +of a particularly chatty unit. Note that the the configured level is applied to any log messages written by any +of the processes belonging to this unit, sent via any supported logging protocol. The filtering is applied +early in the logging pipeline, before any kind of further processing is done. Moreover, messages which pass +through this filter successfully might still be dropped by filters applied at a later stage in the logging +subsystem. For example, C configured in +L might +prohibit messages of higher log levels to be stored on disk, even though the per-unit +C permitted it to be processed. I< Optional. Type uniline. > + +=head2 LogExtraFields + +Configures additional log metadata fields to include in all log records generated by processes +associated with this unit. This setting takes one or more journal field assignments in the format +C separated by whitespace. See +L for +details on the journal field concept. Even though the underlying journal implementation permits binary field +values, this setting accepts only valid UTF-8 values. To include space characters in a journal field value, +enclose the assignment in double quotes ("). The usual specifiers are expanded in all assignments (see +below). Note that this setting is not only useful for attaching additional metadata to log records of a unit, +but given that all fields and values are indexed may also be used to implement cross-unit log record +matching. Assign an empty string to reset the list. I< Optional. Type uniline. > -Use C to manage one or more runtime directories for the unit and bind -their lifetime to the daemon runtime. This is particularly useful for unprivileged daemons that cannot create -runtime directories in /run due to lack of privileges, and to make sure the runtime -directory is cleaned up automatically after use. For runtime directories that require more complex or different -configuration or lifetime guarantees, please consider using -L. +=head2 SyslogIdentifier -Example: if a system service unit has the following, +Sets the process name ("syslog tag") to prefix log lines sent to the logging +system or the kernel log buffer with. If not set, defaults to the process name of the executed process. This +option is only useful when C or C are set to +C, C or C (or to the same settings in +combination with C<+console>) and only applies to log messages written to stdout or +stderr. I< Optional. Type uniline. > - RuntimeDirectory=foo/bar baz +=head2 SyslogFacility -the service manager creates /run/foo (if it does not exist), /run/foo/bar, -and /run/baz. The directories /run/foo/bar and /run/baz -except /run/foo are owned by the user and group specified in C and -C, and removed when the service is stopped. -I< Optional. Type uniline. > +Sets the syslog facility identifier to use when logging. One of +C, C, C, C, +C, C, C, C, +C, C, C, C, +C, C, C, C, +C, C, C or C. See +L +for details. This option is only useful when C or +C are set to C, C or +C (or to the same settings in combination with C<+console>), and only applies +to log messages written to stdout or stderr. Defaults to C. I< Optional. Type uniline. > -=head2 RuntimeDirectoryMode +=head2 SyslogLevel -Specifies the access mode of the directories specified in -C, C, C, -C, or C, respectively, as an octal number. -Defaults to C<0755>. See "Permissions" in -L -for a discussion of the meaning of permission bits. -I< Optional. Type uniline. > +The default syslog log level to use when logging to the logging system or +the kernel log buffer. One of C, C, C, +C, C, C, C, +C. See L for +details. This option is only useful when C or +C are set to C, C or +C (or to the same settings in combination with C<+console>), and only applies +to log messages written to stdout or stderr. Note that individual lines output by executed processes may be +prefixed with a different log level which can be used to override the default log level specified here. The +interpretation of these prefixes may be disabled with C, see below. For +details, see L. +Defaults to C. I< Optional. Type uniline. > -=head2 StateDirectoryMode +=head2 SyslogLevelPrefix -Specifies the access mode of the directories specified in -C, C, C, -C, or C, respectively, as an octal number. -Defaults to C<0755>. See "Permissions" in -L -for a discussion of the meaning of permission bits. -I< Optional. Type uniline. > +Takes a boolean argument. If true and C or +C are set to C, C or +C (or to the same settings in combination with C<+console>), log lines +written by the executed process that are prefixed with a log level will be processed with this log level set +but the prefix removed. If set to false, the interpretation of these prefixes is disabled and the logged lines +are passed on as-is. This only applies to log messages written to stdout or stderr. For details about this +prefixing see L. +Defaults to true. I< Optional. Type boolean. > -=head2 CacheDirectoryMode +=head2 TTYPath -Specifies the access mode of the directories specified in -C, C, C, -C, or C, respectively, as an octal number. -Defaults to C<0755>. See "Permissions" in -L -for a discussion of the meaning of permission bits. -I< Optional. Type uniline. > +Sets the terminal device node to use if standard input, output, or error are connected to a TTY +(see above). Defaults to /dev/console. I< Optional. Type uniline. > -=head2 LogsDirectoryMode +=head2 TTYReset -Specifies the access mode of the directories specified in -C, C, C, -C, or C, respectively, as an octal number. -Defaults to C<0755>. See "Permissions" in -L -for a discussion of the meaning of permission bits. -I< Optional. Type uniline. > +Reset the terminal device specified with C before and after +execution. Defaults to C. I< Optional. Type uniline. > -=head2 ConfigurationDirectoryMode +=head2 TTYVHangup -Specifies the access mode of the directories specified in -C, C, C, -C, or C, respectively, as an octal number. -Defaults to C<0755>. See "Permissions" in -L -for a discussion of the meaning of permission bits. -I< Optional. Type uniline. > +Disconnect all clients which have opened the terminal device specified with +C before and after execution. Defaults to C. I< Optional. Type uniline. > -=head2 RuntimeDirectoryPreserve +=head2 TTYVTDisallocate -Takes a boolean argument or C. -If set to C (the default), the directories specified in C -are always removed when the service stops. If set to C the directories are preserved -when the service is both automatically and manually restarted. Here, the automatic restart means the operation -specified in C, and manual restart means the one triggered by -systemctl restart foo.service. If set to C, then the directories are not -removed when the service is stopped. Note that since the runtime directory /run is a mount -point of C, then for system services the directories specified in -C are removed when the system is rebooted. -I< Optional. Type enum. choice: 'no', 'yes', 'restart'. > +If the terminal device specified with C is a virtual console +terminal, try to deallocate the TTY before and after execution. This ensures that the screen and scrollback +buffer is cleared. Defaults to C. I< Optional. Type uniline. > -=head2 MemoryDenyWriteExecute +=head2 UtmpIdentifier -Takes a boolean argument. If set, attempts to create memory mappings that are writable and -executable at the same time, or to change existing memory mappings to become executable, or mapping shared -memory segments as executable are prohibited. Specifically, a system call filter is added that rejects -L system calls with both -C and C set, -L system calls with -C set and -L system calls with -C set. Note that this option is incompatible with programs and libraries that -generate program code dynamically at runtime, including JIT execution engines, executable stacks, and code -"trampoline" feature of various C compilers. This option improves service security, as it makes harder for -software exploits to change running code dynamically. Note that this feature is fully available on x86-64, and -partially on x86. Specifically, the shmat() protection is not available on x86. Note that -on systems supporting multiple ABIs (such as x86/x86-64) it is recommended to turn off alternative ABIs for -services, so that they cannot be used to circumvent the restrictions of this option. Specifically, it is -recommended to combine this option with C or similar. If -running in user mode, or in system mode, but without the C capability -(e.g. setting C), C is implied. I< Optional. Type boolean. > +Takes a four character identifier string for an L and wtmp entry +for this service. This should only be set for services such as getty implementations (such +as L) where utmp/wtmp +entries must be created and cleared before and after execution, or for services that shall be executed as if +they were run by a getty process (see below). If the configured string is longer than four +characters, it is truncated and the terminal four characters are used. This setting interprets %I style string +replacements. This setting is unset by default, i.e. no utmp/wtmp entries are created or cleaned up for this +service. I< Optional. Type uniline. > -=head2 RestrictRealtime +=head2 UtmpMode -Takes a boolean argument. If set, any attempts to enable realtime scheduling in a process of -the unit are refused. This restricts access to realtime task scheduling policies such as -C, C or C. See -L for details about -these scheduling policies. If running in user mode, or in system mode, but -without the C capability -(e.g. setting C), C -is implied. Realtime scheduling policies may be used to monopolize CPU time for longer periods -of time, and may hence be used to lock up or otherwise trigger Denial-of-Service situations on the system. It -is hence recommended to restrict access to realtime scheduling to the few programs that actually require -them. Defaults to off. I< Optional. Type boolean. > +Takes one of C, C or C. If +C is set, controls which type of L/wtmp entries +for this service are generated. This setting has no effect unless C is set +too. If C is set, only an C entry is generated and the +invoked process must implement a getty-compatible utmp/wtmp logic. If +C is set, first an C entry, followed by a +C entry is generated. In this case, the invoked process must implement a +L-compatible +utmp/wtmp logic. If C is set, first an C entry, then a +C entry and finally a C entry is +generated. In this case, the invoked process may be any process that is suitable to be run as session +leader. Defaults to C. I< Optional. Type enum. choice: 'init', 'login', 'user'. > =head2 KillMode @@ -3562,7 +3401,9 @@ start-up failed, for example because any of the commands specified in C, C or C failed (and weren't prefixed with C<->, see above) or timed out. Use C to invoke commands when a -service failed to start up correctly and is shut down again. +service failed to start up correctly and is shut down again. Also note that, service restart requests are +implemented as stop operations followed by start operations. This means that C and +C are executed during a service restart operation. It is recommended to use this setting for commands that communicate with the service requesting clean termination. When the commands specified with this option are executed it should be assumed that the service is @@ -3611,6 +3452,14 @@ C is used, in which case the timeout is disabled by default (see L). + +If a service of C sends C, this may cause +the start time to be extended beyond C. The first receipt of this message +must occur before C is exceeded, and once the start time has exended beyond +C, the service manager will allow the service to continue to start, provided +the service repeats C within the interval specified until the service +startup status is finished by C. (see +L). I< Optional. Type uniline. > =head2 TimeoutStopSec @@ -3628,6 +3477,13 @@ C from the manager configuration file (see L). + +If a service of C sends C, this may cause +the stop time to be extended beyond C. The first receipt of this message +must occur before C is exceeded, and once the stop time has exended beyond +C, the service manager will allow the service to continue to stop, provided +the service repeats C within the interval specified, or terminates itself +(see L). I< Optional. Type uniline. > =head2 TimeoutSec @@ -3643,7 +3499,16 @@ active for longer than the specified time it is terminated and put into a failure state. Note that this setting does not have any effect on C services, as they terminate immediately after activation completed. Pass C (the default) to configure no runtime -limit. I< Optional. Type uniline. > +limit. + +If a service of C sends C, this may cause +the runtime to be extended beyond C. The first receipt of this message +must occur before C is exceeded, and once the runtime has exended beyond +C, the service manager will allow the service to continue to run, provided +the service repeats C within the interval specified until the service +shutdown is acheived by C (or termination). (see +L). +I< Optional. Type uniline. > =head2 WatchdogSec @@ -3897,13 +3762,6 @@ prior uses of this setting will have no effect. I< Optional. Type uniline. > -=head2 FailureAction - -Configure the action to take when the service enters a failed state. Takes the same values as -the unit setting C and executes the same actions (see -L). Defaults to -C. I< Optional. Type uniline. > - =head2 FileDescriptorStoreMax Configure how many file descriptors may be stored in the service manager for the service using diff -Nru libconfig-model-systemd-perl-0.235.1/lib/Config/Model/models/Systemd/Section/Socket.pl libconfig-model-systemd-perl-0.236.1/lib/Config/Model/models/Systemd/Section/Socket.pl --- libconfig-model-systemd-perl-0.235.1/lib/Config/Model/models/Systemd/Section/Socket.pl 2017-10-14 19:05:04.000000000 +0000 +++ libconfig-model-systemd-perl-0.236.1/lib/Config/Model/models/Systemd/Section/Socket.pl 2018-01-03 14:01:19.000000000 +0000 @@ -1,7 +1,7 @@ # # This file is part of Config-Model-Systemd # -# This software is Copyright (c) 2015-2017 by Dominique Dumont. +# This software is Copyright (c) 2015-2018 by Dominique Dumont. # # This is free software, licensed under: # diff -Nru libconfig-model-systemd-perl-0.235.1/lib/Config/Model/models/Systemd/Section/Timer.pl libconfig-model-systemd-perl-0.236.1/lib/Config/Model/models/Systemd/Section/Timer.pl --- libconfig-model-systemd-perl-0.235.1/lib/Config/Model/models/Systemd/Section/Timer.pl 2017-10-14 19:05:04.000000000 +0000 +++ libconfig-model-systemd-perl-0.236.1/lib/Config/Model/models/Systemd/Section/Timer.pl 2018-01-03 14:01:19.000000000 +0000 @@ -1,7 +1,7 @@ # # This file is part of Config-Model-Systemd # -# This software is Copyright (c) 2015-2017 by Dominique Dumont. +# This software is Copyright (c) 2015-2018 by Dominique Dumont. # # This is free software, licensed under: # diff -Nru libconfig-model-systemd-perl-0.235.1/lib/Config/Model/models/Systemd/Section/Unit.pl libconfig-model-systemd-perl-0.236.1/lib/Config/Model/models/Systemd/Section/Unit.pl --- libconfig-model-systemd-perl-0.235.1/lib/Config/Model/models/Systemd/Section/Unit.pl 2017-10-14 19:05:04.000000000 +0000 +++ libconfig-model-systemd-perl-0.236.1/lib/Config/Model/models/Systemd/Section/Unit.pl 2018-01-03 14:01:19.000000000 +0000 @@ -1,7 +1,7 @@ # # This file is part of Config-Model-Systemd # -# This software is Copyright (c) 2015-2017 by Dominique Dumont. +# This software is Copyright (c) 2015-2018 by Dominique Dumont. # # This is free software, licensed under: # @@ -128,9 +128,7 @@ modify unit files. Each drop-in file must have appropriate section headers. Note that for instantiated units, this logic will first look for the instance C<.d/> subdirectory and read its C<.conf> files, followed by the template -C<.d/> subdirectory and the C<.conf> files there. Also note that -settings from the C<[Install]> section are not honored in drop-in unit files, -and have no effect. +C<.d/> subdirectory and the C<.conf> files there. In addition to /etc/systemd/system, the drop-in C<.d> directories for system services can be placed in /usr/lib/systemd/system or @@ -146,23 +144,6 @@ socket-based activation which make dependencies implicit, resulting in a both simpler and more flexible system. -Some unit names reflect paths existing in the file system -namespace. Example: a device unit -dev-sda.device refers to a device with the -device node /dev/sda in the -file system namespace. If this applies, a special way to escape -the path name is used, so that the result is usable as part of a -filename. Basically, given a path, \"/\" is replaced by \"-\", and all -other characters which are not ASCII alphanumerics are replaced by -C-style \"\\x2d\" escapes (except that \"_\" is never replaced and \".\" -is only replaced when it would be the first character in the -escaped path). The root directory \"/\" is encoded as single dash, -while otherwise the initial and ending \"/\" are removed from all -paths during transformation. This escaping is reversible. Properly -escaped paths can be generated using the -L -command. - Optionally, units may be instantiated from a template file at runtime. This allows creation of multiple units from a single configuration file. If @@ -255,8 +236,9 @@ }, 'description' => "Configures requirement dependencies on other units. If this unit gets activated, the units listed here will be activated as well. If one of the other units fails to activate, and an ordering dependency -C on the failing unit is set, this -unit will not be started. This option may be specified more than once or multiple space-separated units may be +C on the failing unit is set, this unit will not be started. Besides, with or without +specifying C, this unit will be deactivated if one of the other units get deactivated. +This option may be specified more than once or multiple space-separated units may be specified in one option in which case requirement dependencies for all listed names will be created. Note that requirement dependencies do not influence the order in which services are started or stopped. This has to be configured independently with the C or C options. If a unit @@ -290,7 +272,13 @@ 'description' => 'Similar to C. However, if the units listed here are not started already, they will not be started and the transaction will fail -immediately. ', +immediately. + +When C is used on +a.service, this dependency will show as +C in property listing of +b.service. C +dependency cannot be specified directly.', 'type' => 'list' }, 'Wants', @@ -334,7 +322,13 @@ enters inactive state, but also one that is bound to another unit that gets skipped due to a failed condition check (such as C, C, \x{2026} \x{2014} see below) will be stopped, should it be running. Hence, in many cases it is best to combine -C with C.", +C with C. + +When C is used on +a.service, this dependency will show as +C in property listing of +b.service. C +dependency cannot be specified directly.", 'type' => 'list' }, 'PartOf', @@ -348,7 +342,13 @@ restarting of units. When systemd stops or restarts the units listed here, the action is propagated to this unit. Note that this is a one-way dependency\x{a0}\x{2014} changes to this unit do not -affect the listed units. ", +affect the listed units. + +When C is used on +a.service, this dependency will show as +C in property listing of +b.service. C +dependency cannot be specified directly.", 'type' => 'list' }, 'Conflicts', @@ -636,6 +636,26 @@ 'yes' ] }, + 'CollectMode', + { + 'choice' => [ + 'inactive', + 'inactive-or-failed' + ], + 'description' => "Tweaks the \"garbage collection\" algorithm for this unit. Takes one of C +or C. If set to C the unit will be unloaded if it is +in the C state and is not referenced by clients, jobs or other units \x{2014} however it +is not unloaded if it is in the C state. In C mode, failed +units are not unloaded until the user invoked systemctl reset-failed on them to reset the +C state, or an equivalent command. This behaviour is altered if this option is set to +C: in this case the unit is unloaded even if the unit is in a +C state, and thus an explicitly resetting of the C state is +not necessary. Note that if this mode is used unit results (such as exit codes, exit signals, consumed +resources, \x{2026}) are flushed out immediately after the unit completed, except for what is stored in the logging +subsystem. Defaults to C.", + 'type' => 'leaf', + 'value_type' => 'enum' + }, 'JobTimeoutSec', { 'description' => 'When a job for this unit is queued, a time-out C may be @@ -722,49 +742,57 @@ }, 'StartLimitIntervalSec', { - 'description' => 'Configure unit start rate limiting. By default, units which are started more than 5 times -within 10 seconds are not permitted to start any more times until the 10 second interval ends. With these two -options, this rate limiting may be modified. Use C to configure the -checking interval (defaults to C in manager configuration file, -set to 0 to disable any kind of rate limiting). Use C to configure how many -starts per interval are allowed (defaults to C in manager -configuration file). These configuration options are particularly useful in conjunction with the service -setting C (see + 'description' => 'Configure unit start rate limiting. Units which are started more than +burst times within an interval time interval are not +permitted to start any more. Use C to configure the checking interval +(defaults to C in manager configuration file, set it to 0 to +disable any kind of rate limiting). Use C to configure how many starts per +interval are allowed (defaults to C in manager configuration +file). These configuration options are particularly useful in conjunction with the service setting +C (see L); however, they apply to all kinds of starts (including manual), not just those triggered by the C logic. Note that units which are configured for C and which reach the start limit are not attempted to be restarted anymore; however, they may still be restarted -manually at a later point, from which point on, the restart logic is again activated. Note that -systemctl reset-failed will cause the restart rate counter for a service to be flushed, -which is useful if the administrator wants to manually start a unit and the start limit interferes with -that. Note that this rate-limiting is enforced after any unit condition checks are executed, and hence unit -activations with failing conditions are not counted by this rate limiting. Slice, target, device and scope -units do not enforce this setting, as they are unit types whose activation may either never fail, or may -succeed only a single time.', +manually at a later point, after the interval has passed. From this point on, the +restart logic is activated again. Note that systemctl reset-failed will cause the restart +rate counter for a service to be flushed, which is useful if the administrator wants to manually start a unit +and the start limit interferes with that. Note that this rate-limiting is enforced after any unit condition +checks are executed, and hence unit activations with failing conditions do not count towards this rate +limit. This setting does not apply to slice, target, device, and scope units, since they are unit types whose +activation may either never fail, or may succeed only a single time. + +When a unit is unloaded due to the garbage collection logic (see above) its rate limit counters are +flushed out too. This means that configuring start rate limiting for a unit that is not referenced continously +has no effect.', 'type' => 'leaf', 'value_type' => 'uniline' }, 'StartLimitBurst', { - 'description' => 'Configure unit start rate limiting. By default, units which are started more than 5 times -within 10 seconds are not permitted to start any more times until the 10 second interval ends. With these two -options, this rate limiting may be modified. Use C to configure the -checking interval (defaults to C in manager configuration file, -set to 0 to disable any kind of rate limiting). Use C to configure how many -starts per interval are allowed (defaults to C in manager -configuration file). These configuration options are particularly useful in conjunction with the service -setting C (see + 'description' => 'Configure unit start rate limiting. Units which are started more than +burst times within an interval time interval are not +permitted to start any more. Use C to configure the checking interval +(defaults to C in manager configuration file, set it to 0 to +disable any kind of rate limiting). Use C to configure how many starts per +interval are allowed (defaults to C in manager configuration +file). These configuration options are particularly useful in conjunction with the service setting +C (see L); however, they apply to all kinds of starts (including manual), not just those triggered by the C logic. Note that units which are configured for C and which reach the start limit are not attempted to be restarted anymore; however, they may still be restarted -manually at a later point, from which point on, the restart logic is again activated. Note that -systemctl reset-failed will cause the restart rate counter for a service to be flushed, -which is useful if the administrator wants to manually start a unit and the start limit interferes with -that. Note that this rate-limiting is enforced after any unit condition checks are executed, and hence unit -activations with failing conditions are not counted by this rate limiting. Slice, target, device and scope -units do not enforce this setting, as they are unit types whose activation may either never fail, or may -succeed only a single time.', +manually at a later point, after the interval has passed. From this point on, the +restart logic is activated again. Note that systemctl reset-failed will cause the restart +rate counter for a service to be flushed, which is useful if the administrator wants to manually start a unit +and the start limit interferes with that. Note that this rate-limiting is enforced after any unit condition +checks are executed, and hence unit activations with failing conditions do not count towards this rate +limit. This setting does not apply to slice, target, device, and scope units, since they are unit types whose +activation may either never fail, or may succeed only a single time. + +When a unit is unloaded due to the garbage collection logic (see above) its rate limit counters are +flushed out too. This means that configuring start rate limiting for a unit that is not referenced continously +has no effect.', 'type' => 'leaf', 'value_type' => 'uniline' }, @@ -796,11 +824,31 @@ 'type' => 'leaf', 'value_type' => 'enum' }, + 'FailureAction', + { + 'description' => 'Configure the action to take when the unit stops and enters a failed state or inactive +state. Takes the same values as the setting C setting and executes the same +actions (see +L). Both options +default to C.', + 'type' => 'leaf', + 'value_type' => 'uniline' + }, + 'SuccessAction', + { + 'description' => 'Configure the action to take when the unit stops and enters a failed state or inactive +state. Takes the same values as the setting C setting and executes the same +actions (see +L). Both options +default to C.', + 'type' => 'leaf', + 'value_type' => 'uniline' + }, 'RebootArgument', { 'description' => 'Configure the optional argument for the L system call if -C or a service\'s C is a reboot action. This +C or C is a reboot action. This works just like the optional argument to systemctl reboot command.', 'type' => 'leaf', 'value_type' => 'uniline' @@ -1079,6 +1127,7 @@ system. Currently, the recognized values are C, C, +C, C, C and C. The test may be negated by diff -Nru libconfig-model-systemd-perl-0.235.1/lib/Config/Model/models/Systemd/Section/Unit.pod libconfig-model-systemd-perl-0.236.1/lib/Config/Model/models/Systemd/Section/Unit.pod --- libconfig-model-systemd-perl-0.235.1/lib/Config/Model/models/Systemd/Section/Unit.pod 2017-10-14 19:05:04.000000000 +0000 +++ libconfig-model-systemd-perl-0.236.1/lib/Config/Model/models/Systemd/Section/Unit.pod 2018-01-03 14:01:19.000000000 +0000 @@ -122,9 +122,7 @@ modify unit files. Each drop-in file must have appropriate section headers. Note that for instantiated units, this logic will first look for the instance C<.d/> subdirectory and read its C<.conf> files, followed by the template -C<.d/> subdirectory and the C<.conf> files there. Also note that -settings from the C<[Install]> section are not honored in drop-in unit files, -and have no effect. +C<.d/> subdirectory and the C<.conf> files there. In addition to /etc/systemd/system, the drop-in C<.d> directories for system services can be placed in /usr/lib/systemd/system or @@ -140,23 +138,6 @@ socket-based activation which make dependencies implicit, resulting in a both simpler and more flexible system. -Some unit names reflect paths existing in the file system -namespace. Example: a device unit -dev-sda.device refers to a device with the -device node /dev/sda in the -file system namespace. If this applies, a special way to escape -the path name is used, so that the result is usable as part of a -filename. Basically, given a path, "/" is replaced by "-", and all -other characters which are not ASCII alphanumerics are replaced by -C-style "\x2d" escapes (except that "_" is never replaced and "." -is only replaced when it would be the first character in the -escaped path). The root directory "/" is encoded as single dash, -while otherwise the initial and ending "/" are removed from all -paths during transformation. This escaping is reversible. Properly -escaped paths can be generated using the -L -command. - Optionally, units may be instantiated from a template file at runtime. This allows creation of multiple units from a single configuration file. If @@ -236,8 +217,9 @@ Configures requirement dependencies on other units. If this unit gets activated, the units listed here will be activated as well. If one of the other units fails to activate, and an ordering dependency -C on the failing unit is set, this -unit will not be started. This option may be specified more than once or multiple space-separated units may be +C on the failing unit is set, this unit will not be started. Besides, with or without +specifying C, this unit will be deactivated if one of the other units get deactivated. +This option may be specified more than once or multiple space-separated units may be specified in one option in which case requirement dependencies for all listed names will be created. Note that requirement dependencies do not influence the order in which services are started or stopped. This has to be configured independently with the C or C options. If a unit @@ -266,7 +248,13 @@ Similar to C. However, if the units listed here are not started already, they will not be started and the transaction will fail -immediately. I< Optional. Type list of uniline. > +immediately. + +When C is used on +a.service, this dependency will show as +C in property listing of +b.service. C +dependency cannot be specified directly. I< Optional. Type list of uniline. > =head2 Wants @@ -300,7 +288,13 @@ enters inactive state, but also one that is bound to another unit that gets skipped due to a failed condition check (such as C, C, … — see below) will be stopped, should it be running. Hence, in many cases it is best to combine -C with C. I< Optional. Type list of uniline. > +C with C. + +When C is used on +a.service, this dependency will show as +C in property listing of +b.service. C +dependency cannot be specified directly. I< Optional. Type list of uniline. > =head2 PartOf @@ -309,7 +303,13 @@ restarting of units. When systemd stops or restarts the units listed here, the action is propagated to this unit. Note that this is a one-way dependency — changes to this unit do not -affect the listed units. I< Optional. Type list of uniline. > +affect the listed units. + +When C is used on +a.service, this dependency will show as +C in property listing of +b.service. C +dependency cannot be specified directly. I< Optional. Type list of uniline. > =head2 Conflicts @@ -533,6 +533,20 @@ all implicit dependencies, just non-essential ones. I< Optional. Type boolean. > +=head2 CollectMode + +Tweaks the "garbage collection" algorithm for this unit. Takes one of C +or C. If set to C the unit will be unloaded if it is +in the C state and is not referenced by clients, jobs or other units — however it +is not unloaded if it is in the C state. In C mode, failed +units are not unloaded until the user invoked systemctl reset-failed on them to reset the +C state, or an equivalent command. This behaviour is altered if this option is set to +C: in this case the unit is unloaded even if the unit is in a +C state, and thus an explicitly resetting of the C state is +not necessary. Note that if this mode is used unit results (such as exit codes, exit signals, consumed +resources, …) are flushed out immediately after the unit completed, except for what is stored in the logging +subsystem. Defaults to C. I< Optional. Type enum. choice: 'inactive', 'inactive-or-failed'. > + =head2 JobTimeoutSec When a job for this unit is queued, a time-out C may be @@ -611,47 +625,55 @@ =head2 StartLimitIntervalSec -Configure unit start rate limiting. By default, units which are started more than 5 times -within 10 seconds are not permitted to start any more times until the 10 second interval ends. With these two -options, this rate limiting may be modified. Use C to configure the -checking interval (defaults to C in manager configuration file, -set to 0 to disable any kind of rate limiting). Use C to configure how many -starts per interval are allowed (defaults to C in manager -configuration file). These configuration options are particularly useful in conjunction with the service -setting C (see +Configure unit start rate limiting. Units which are started more than +burst times within an interval time interval are not +permitted to start any more. Use C to configure the checking interval +(defaults to C in manager configuration file, set it to 0 to +disable any kind of rate limiting). Use C to configure how many starts per +interval are allowed (defaults to C in manager configuration +file). These configuration options are particularly useful in conjunction with the service setting +C (see L); however, they apply to all kinds of starts (including manual), not just those triggered by the C logic. Note that units which are configured for C and which reach the start limit are not attempted to be restarted anymore; however, they may still be restarted -manually at a later point, from which point on, the restart logic is again activated. Note that -systemctl reset-failed will cause the restart rate counter for a service to be flushed, -which is useful if the administrator wants to manually start a unit and the start limit interferes with -that. Note that this rate-limiting is enforced after any unit condition checks are executed, and hence unit -activations with failing conditions are not counted by this rate limiting. Slice, target, device and scope -units do not enforce this setting, as they are unit types whose activation may either never fail, or may -succeed only a single time. I< Optional. Type uniline. > +manually at a later point, after the interval has passed. From this point on, the +restart logic is activated again. Note that systemctl reset-failed will cause the restart +rate counter for a service to be flushed, which is useful if the administrator wants to manually start a unit +and the start limit interferes with that. Note that this rate-limiting is enforced after any unit condition +checks are executed, and hence unit activations with failing conditions do not count towards this rate +limit. This setting does not apply to slice, target, device, and scope units, since they are unit types whose +activation may either never fail, or may succeed only a single time. + +When a unit is unloaded due to the garbage collection logic (see above) its rate limit counters are +flushed out too. This means that configuring start rate limiting for a unit that is not referenced continously +has no effect. I< Optional. Type uniline. > =head2 StartLimitBurst -Configure unit start rate limiting. By default, units which are started more than 5 times -within 10 seconds are not permitted to start any more times until the 10 second interval ends. With these two -options, this rate limiting may be modified. Use C to configure the -checking interval (defaults to C in manager configuration file, -set to 0 to disable any kind of rate limiting). Use C to configure how many -starts per interval are allowed (defaults to C in manager -configuration file). These configuration options are particularly useful in conjunction with the service -setting C (see +Configure unit start rate limiting. Units which are started more than +burst times within an interval time interval are not +permitted to start any more. Use C to configure the checking interval +(defaults to C in manager configuration file, set it to 0 to +disable any kind of rate limiting). Use C to configure how many starts per +interval are allowed (defaults to C in manager configuration +file). These configuration options are particularly useful in conjunction with the service setting +C (see L); however, they apply to all kinds of starts (including manual), not just those triggered by the C logic. Note that units which are configured for C and which reach the start limit are not attempted to be restarted anymore; however, they may still be restarted -manually at a later point, from which point on, the restart logic is again activated. Note that -systemctl reset-failed will cause the restart rate counter for a service to be flushed, -which is useful if the administrator wants to manually start a unit and the start limit interferes with -that. Note that this rate-limiting is enforced after any unit condition checks are executed, and hence unit -activations with failing conditions are not counted by this rate limiting. Slice, target, device and scope -units do not enforce this setting, as they are unit types whose activation may either never fail, or may -succeed only a single time. I< Optional. Type uniline. > +manually at a later point, after the interval has passed. From this point on, the +restart logic is activated again. Note that systemctl reset-failed will cause the restart +rate counter for a service to be flushed, which is useful if the administrator wants to manually start a unit +and the start limit interferes with that. Note that this rate-limiting is enforced after any unit condition +checks are executed, and hence unit activations with failing conditions do not count towards this rate +limit. This setting does not apply to slice, target, device, and scope units, since they are unit types whose +activation may either never fail, or may succeed only a single time. + +When a unit is unloaded due to the garbage collection logic (see above) its rate limit counters are +flushed out too. This means that configuring start rate limiting for a unit that is not referenced continously +has no effect. I< Optional. Type uniline. > =head2 StartLimitAction @@ -670,11 +692,27 @@ C have the effect of powering down the system with similar semantics. Defaults to C. I< Optional. Type enum. choice: 'none', 'reboot', 'reboot-force', 'reboot-immediate', 'poweroff', 'poweroff-force', 'poweroff-immediate'. > +=head2 FailureAction + +Configure the action to take when the unit stops and enters a failed state or inactive +state. Takes the same values as the setting C setting and executes the same +actions (see +L). Both options +default to C. I< Optional. Type uniline. > + +=head2 SuccessAction + +Configure the action to take when the unit stops and enters a failed state or inactive +state. Takes the same values as the setting C setting and executes the same +actions (see +L). Both options +default to C. I< Optional. Type uniline. > + =head2 RebootArgument Configure the optional argument for the L system call if -C or a service's C is a reboot action. This +C or C is a reboot action. This works just like the optional argument to systemctl reboot command. I< Optional. Type uniline. > =head2 ConditionArchitecture @@ -896,6 +934,7 @@ system. Currently, the recognized values are C, C, +C, C, C and C. The test may be negated by diff -Nru libconfig-model-systemd-perl-0.235.1/lib/Config/Model/models/Systemd/Service.pl libconfig-model-systemd-perl-0.236.1/lib/Config/Model/models/Systemd/Service.pl --- libconfig-model-systemd-perl-0.235.1/lib/Config/Model/models/Systemd/Service.pl 2017-10-14 19:05:04.000000000 +0000 +++ libconfig-model-systemd-perl-0.236.1/lib/Config/Model/models/Systemd/Service.pl 2018-01-03 14:01:19.000000000 +0000 @@ -1,7 +1,7 @@ # # This file is part of Config-Model-Systemd # -# This software is Copyright (c) 2015-2017 by Dominique Dumont. +# This software is Copyright (c) 2015-2018 by Dominique Dumont. # # This is free software, licensed under: # diff -Nru libconfig-model-systemd-perl-0.235.1/lib/Config/Model/models/Systemd/Socket.pl libconfig-model-systemd-perl-0.236.1/lib/Config/Model/models/Systemd/Socket.pl --- libconfig-model-systemd-perl-0.235.1/lib/Config/Model/models/Systemd/Socket.pl 2017-10-14 19:05:04.000000000 +0000 +++ libconfig-model-systemd-perl-0.236.1/lib/Config/Model/models/Systemd/Socket.pl 2018-01-03 14:01:19.000000000 +0000 @@ -1,7 +1,7 @@ # # This file is part of Config-Model-Systemd # -# This software is Copyright (c) 2015-2017 by Dominique Dumont. +# This software is Copyright (c) 2015-2018 by Dominique Dumont. # # This is free software, licensed under: # diff -Nru libconfig-model-systemd-perl-0.235.1/lib/Config/Model/models/Systemd/Timer.pl libconfig-model-systemd-perl-0.236.1/lib/Config/Model/models/Systemd/Timer.pl --- libconfig-model-systemd-perl-0.235.1/lib/Config/Model/models/Systemd/Timer.pl 2017-10-14 19:05:04.000000000 +0000 +++ libconfig-model-systemd-perl-0.236.1/lib/Config/Model/models/Systemd/Timer.pl 2018-01-03 14:01:19.000000000 +0000 @@ -1,7 +1,7 @@ # # This file is part of Config-Model-Systemd # -# This software is Copyright (c) 2015-2017 by Dominique Dumont. +# This software is Copyright (c) 2015-2018 by Dominique Dumont. # # This is free software, licensed under: # diff -Nru libconfig-model-systemd-perl-0.235.1/lib/Config/Model/models/Systemd.pl libconfig-model-systemd-perl-0.236.1/lib/Config/Model/models/Systemd.pl --- libconfig-model-systemd-perl-0.235.1/lib/Config/Model/models/Systemd.pl 2017-10-14 19:05:04.000000000 +0000 +++ libconfig-model-systemd-perl-0.236.1/lib/Config/Model/models/Systemd.pl 2018-01-03 14:01:19.000000000 +0000 @@ -1,7 +1,7 @@ # # This file is part of Config-Model-Systemd # -# This software is Copyright (c) 2015-2017 by Dominique Dumont. +# This software is Copyright (c) 2015-2018 by Dominique Dumont. # # This is free software, licensed under: # diff -Nru libconfig-model-systemd-perl-0.235.1/lib/Config/Model/Systemd.pm libconfig-model-systemd-perl-0.236.1/lib/Config/Model/Systemd.pm --- libconfig-model-systemd-perl-0.235.1/lib/Config/Model/Systemd.pm 2017-10-14 19:05:04.000000000 +0000 +++ libconfig-model-systemd-perl-0.236.1/lib/Config/Model/Systemd.pm 2018-01-03 14:01:19.000000000 +0000 @@ -1,14 +1,14 @@ # # This file is part of Config-Model-Systemd # -# This software is Copyright (c) 2015-2017 by Dominique Dumont. +# This software is Copyright (c) 2015-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::Systemd; -$Config::Model::Systemd::VERSION = '0.235.1'; +$Config::Model::Systemd::VERSION = '0.236.1'; use strict; use warnings; @@ -32,7 +32,7 @@ =head1 VERSION -version 0.235.1 +version 0.236.1 =head1 SYNOPSIS @@ -204,7 +204,7 @@ =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2015-2017 by Dominique Dumont. +This software is Copyright (c) 2015-2018 by Dominique Dumont. This is free software, licensed under: @@ -257,7 +257,7 @@ CPAN Testers -The CPAN Testers is a network of smokers who run automated tests on uploaded CPAN distributions. +The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions. L diff -Nru libconfig-model-systemd-perl-0.235.1/LICENSE libconfig-model-systemd-perl-0.236.1/LICENSE --- libconfig-model-systemd-perl-0.235.1/LICENSE 2017-10-14 19:05:04.000000000 +0000 +++ libconfig-model-systemd-perl-0.236.1/LICENSE 2018-01-03 14:01:19.000000000 +0000 @@ -1,4 +1,4 @@ -This software is Copyright (c) 2015-2017 by Dominique Dumont. +This software is Copyright (c) 2015-2018 by Dominique Dumont. This is free software, licensed under: diff -Nru libconfig-model-systemd-perl-0.235.1/META.json libconfig-model-systemd-perl-0.236.1/META.json --- libconfig-model-systemd-perl-0.235.1/META.json 2017-10-14 19:05:04.000000000 +0000 +++ libconfig-model-systemd-perl-0.236.1/META.json 2018-01-03 14:01:19.000000000 +0000 @@ -61,7 +61,7 @@ "web" : "http://github.com/dod38fr/config-model-systemd" } }, - "version" : "0.235.1", + "version" : "0.236.1", "x_serialization_backend" : "JSON::XS version 3.04" } diff -Nru libconfig-model-systemd-perl-0.235.1/META.yml libconfig-model-systemd-perl-0.236.1/META.yml --- libconfig-model-systemd-perl-0.235.1/META.yml 2017-10-14 19:05:04.000000000 +0000 +++ libconfig-model-systemd-perl-0.236.1/META.yml 2018-01-03 14:01:19.000000000 +0000 @@ -32,5 +32,5 @@ bugtracker: https://github.com/dod38fr/config-model-systemd/issues homepage: https://github.com/dod38fr/config-model/wiki repository: git://github.com/dod38fr/config-model-systemd.git -version: 0.235.1 +version: 0.236.1 x_serialization_backend: 'YAML::Tiny version 1.70' diff -Nru libconfig-model-systemd-perl-0.235.1/t/model_tests.d/systemd-service-test-conf.pl libconfig-model-systemd-perl-0.236.1/t/model_tests.d/systemd-service-test-conf.pl --- libconfig-model-systemd-perl-0.235.1/t/model_tests.d/systemd-service-test-conf.pl 2017-10-14 19:05:04.000000000 +0000 +++ libconfig-model-systemd-perl-0.236.1/t/model_tests.d/systemd-service-test-conf.pl 2018-01-03 14:01:19.000000000 +0000 @@ -1,7 +1,7 @@ # # This file is part of Config-Model-Systemd # -# This software is Copyright (c) 2015-2017 by Dominique Dumont. +# This software is Copyright (c) 2015-2018 by Dominique Dumont. # # This is free software, licensed under: # diff -Nru libconfig-model-systemd-perl-0.235.1/t/model_tests.d/systemd-socket-test-conf.pl libconfig-model-systemd-perl-0.236.1/t/model_tests.d/systemd-socket-test-conf.pl --- libconfig-model-systemd-perl-0.235.1/t/model_tests.d/systemd-socket-test-conf.pl 2017-10-14 19:05:04.000000000 +0000 +++ libconfig-model-systemd-perl-0.236.1/t/model_tests.d/systemd-socket-test-conf.pl 2018-01-03 14:01:19.000000000 +0000 @@ -1,7 +1,7 @@ # # This file is part of Config-Model-Systemd # -# This software is Copyright (c) 2015-2017 by Dominique Dumont. +# This software is Copyright (c) 2015-2018 by Dominique Dumont. # # This is free software, licensed under: # diff -Nru libconfig-model-systemd-perl-0.235.1/t/model_tests.d/systemd-test-conf.pl libconfig-model-systemd-perl-0.236.1/t/model_tests.d/systemd-test-conf.pl --- libconfig-model-systemd-perl-0.235.1/t/model_tests.d/systemd-test-conf.pl 2017-10-14 19:05:04.000000000 +0000 +++ libconfig-model-systemd-perl-0.236.1/t/model_tests.d/systemd-test-conf.pl 2018-01-03 14:01:19.000000000 +0000 @@ -1,7 +1,7 @@ # # This file is part of Config-Model-Systemd # -# This software is Copyright (c) 2015-2017 by Dominique Dumont. +# This software is Copyright (c) 2015-2018 by Dominique Dumont. # # This is free software, licensed under: # diff -Nru libconfig-model-systemd-perl-0.235.1/t/model_tests.d/systemd-user-test-conf.pl libconfig-model-systemd-perl-0.236.1/t/model_tests.d/systemd-user-test-conf.pl --- libconfig-model-systemd-perl-0.235.1/t/model_tests.d/systemd-user-test-conf.pl 2017-10-14 19:05:04.000000000 +0000 +++ libconfig-model-systemd-perl-0.236.1/t/model_tests.d/systemd-user-test-conf.pl 2018-01-03 14:01:19.000000000 +0000 @@ -1,7 +1,7 @@ # # This file is part of Config-Model-Systemd # -# This software is Copyright (c) 2015-2017 by Dominique Dumont. +# This software is Copyright (c) 2015-2018 by Dominique Dumont. # # This is free software, licensed under: #