]>
Commit | Line | Data |
---|---|---|
997f52a5 ZJS |
1 | {# SPDX-License-Identifier: LGPL-2.1-or-later #} |
2 | ||
3 | {%- macro EXEC_CONTEXT_CONFIG_ITEMS(type) -%} | |
4 | {# Define the context options only once #} | |
5 | {{type}}.WorkingDirectory, config_parse_working_directory, 0, offsetof({{type}}, exec_context) | |
6 | {{type}}.RootDirectory, config_parse_unit_path_printf, true, offsetof({{type}}, exec_context.root_directory) | |
7 | {{type}}.RootImage, config_parse_unit_path_printf, true, offsetof({{type}}, exec_context.root_image) | |
8 | {{type}}.RootImageOptions, config_parse_root_image_options, 0, offsetof({{type}}, exec_context) | |
84be0c71 | 9 | {{type}}.RootImagePolicy, config_parse_image_policy, 0, offsetof({{type}}, exec_context.root_image_policy) |
997f52a5 ZJS |
10 | {{type}}.RootHash, config_parse_exec_root_hash, 0, offsetof({{type}}, exec_context) |
11 | {{type}}.RootHashSignature, config_parse_exec_root_hash_sig, 0, offsetof({{type}}, exec_context) | |
12 | {{type}}.RootVerity, config_parse_unit_path_printf, true, offsetof({{type}}, exec_context.root_verity) | |
9c0c6701 | 13 | {{type}}.RootEphemeral, config_parse_bool, 0, offsetof({{type}}, exec_context.root_ephemeral) |
a07b9926 | 14 | {{type}}.ExtensionDirectories, config_parse_namespace_path_strv, 0, offsetof({{type}}, exec_context.extension_directories) |
997f52a5 | 15 | {{type}}.ExtensionImages, config_parse_extension_images, 0, offsetof({{type}}, exec_context) |
84be0c71 | 16 | {{type}}.ExtensionImagePolicy, config_parse_image_policy, 0, offsetof({{type}}, exec_context.extension_image_policy) |
997f52a5 | 17 | {{type}}.MountImages, config_parse_mount_images, 0, offsetof({{type}}, exec_context) |
84be0c71 | 18 | {{type}}.MountImagePolicy, config_parse_image_policy, 0, offsetof({{type}}, exec_context.mount_image_policy) |
997f52a5 ZJS |
19 | {{type}}.User, config_parse_user_group_compat, 0, offsetof({{type}}, exec_context.user) |
20 | {{type}}.Group, config_parse_user_group_compat, 0, offsetof({{type}}, exec_context.group) | |
21 | {{type}}.SupplementaryGroups, config_parse_user_group_strv_compat, 0, offsetof({{type}}, exec_context.supplementary_groups) | |
22 | {{type}}.Nice, config_parse_exec_nice, 0, offsetof({{type}}, exec_context) | |
23 | {{type}}.OOMScoreAdjust, config_parse_exec_oom_score_adjust, 0, offsetof({{type}}, exec_context) | |
24 | {{type}}.CoredumpFilter, config_parse_exec_coredump_filter, 0, offsetof({{type}}, exec_context) | |
25 | {{type}}.IOSchedulingClass, config_parse_exec_io_class, 0, offsetof({{type}}, exec_context) | |
26 | {{type}}.IOSchedulingPriority, config_parse_exec_io_priority, 0, offsetof({{type}}, exec_context) | |
27 | {{type}}.CPUSchedulingPolicy, config_parse_exec_cpu_sched_policy, 0, offsetof({{type}}, exec_context) | |
28 | {{type}}.CPUSchedulingPriority, config_parse_exec_cpu_sched_prio, 0, offsetof({{type}}, exec_context) | |
29 | {{type}}.CPUSchedulingResetOnFork, config_parse_bool, 0, offsetof({{type}}, exec_context.cpu_sched_reset_on_fork) | |
30 | {{type}}.CPUAffinity, config_parse_exec_cpu_affinity, 0, offsetof({{type}}, exec_context) | |
31 | {{type}}.NUMAPolicy, config_parse_numa_policy, 0, offsetof({{type}}, exec_context.numa_policy.type) | |
32 | {{type}}.NUMAMask, config_parse_numa_mask, 0, offsetof({{type}}, exec_context.numa_policy) | |
33 | {{type}}.UMask, config_parse_mode, 0, offsetof({{type}}, exec_context.umask) | |
34 | {{type}}.Environment, config_parse_environ, 0, offsetof({{type}}, exec_context.environment) | |
35 | {{type}}.EnvironmentFile, config_parse_unit_env_file, 0, offsetof({{type}}, exec_context.environment_files) | |
36 | {{type}}.PassEnvironment, config_parse_pass_environ, 0, offsetof({{type}}, exec_context.pass_environment) | |
37 | {{type}}.UnsetEnvironment, config_parse_unset_environ, 0, offsetof({{type}}, exec_context.unset_environment) | |
38 | {{type}}.DynamicUser, config_parse_bool, true, offsetof({{type}}, exec_context.dynamic_user) | |
39 | {{type}}.RemoveIPC, config_parse_bool, 0, offsetof({{type}}, exec_context.remove_ipc) | |
40 | {{type}}.StandardInput, config_parse_exec_input, 0, offsetof({{type}}, exec_context) | |
41 | {{type}}.StandardOutput, config_parse_exec_output, 0, offsetof({{type}}, exec_context) | |
42 | {{type}}.StandardError, config_parse_exec_output, 0, offsetof({{type}}, exec_context) | |
43 | {{type}}.StandardInputText, config_parse_exec_input_text, 0, offsetof({{type}}, exec_context) | |
44 | {{type}}.StandardInputData, config_parse_exec_input_data, 0, offsetof({{type}}, exec_context) | |
45 | {{type}}.TTYPath, config_parse_unit_path_printf, 0, offsetof({{type}}, exec_context.tty_path) | |
46 | {{type}}.TTYReset, config_parse_bool, 0, offsetof({{type}}, exec_context.tty_reset) | |
47 | {{type}}.TTYVHangup, config_parse_bool, 0, offsetof({{type}}, exec_context.tty_vhangup) | |
48 | {{type}}.TTYVTDisallocate, config_parse_bool, 0, offsetof({{type}}, exec_context.tty_vt_disallocate) | |
51462135 DDM |
49 | {{type}}.TTYRows, config_parse_tty_size, 0, offsetof({{type}}, exec_context.tty_rows) |
50 | {{type}}.TTYColumns, config_parse_tty_size, 0, offsetof({{type}}, exec_context.tty_cols) | |
997f52a5 ZJS |
51 | {{type}}.SyslogIdentifier, config_parse_unit_string_printf, 0, offsetof({{type}}, exec_context.syslog_identifier) |
52 | {{type}}.SyslogFacility, config_parse_log_facility, 0, offsetof({{type}}, exec_context.syslog_priority) | |
53 | {{type}}.SyslogLevel, config_parse_log_level, 0, offsetof({{type}}, exec_context.syslog_priority) | |
54 | {{type}}.SyslogLevelPrefix, config_parse_bool, 0, offsetof({{type}}, exec_context.syslog_level_prefix) | |
55 | {{type}}.LogLevelMax, config_parse_log_level, 0, offsetof({{type}}, exec_context.log_level_max) | |
56 | {{type}}.LogRateLimitIntervalSec, config_parse_sec, 0, offsetof({{type}}, exec_context.log_ratelimit_interval_usec) | |
57 | {{type}}.LogRateLimitBurst, config_parse_unsigned, 0, offsetof({{type}}, exec_context.log_ratelimit_burst) | |
58 | {{type}}.LogExtraFields, config_parse_log_extra_fields, 0, offsetof({{type}}, exec_context) | |
523ea123 | 59 | {{type}}.LogFilterPatterns, config_parse_log_filter_patterns, 0, offsetof({{type}}, exec_context) |
997f52a5 ZJS |
60 | {{type}}.Capabilities, config_parse_warn_compat, DISABLED_LEGACY, offsetof({{type}}, exec_context) |
61 | {{type}}.SecureBits, config_parse_exec_secure_bits, 0, offsetof({{type}}, exec_context.secure_bits) | |
62 | {{type}}.CapabilityBoundingSet, config_parse_capability_set, 0, offsetof({{type}}, exec_context.capability_bounding_set) | |
63 | {{type}}.AmbientCapabilities, config_parse_capability_set, 0, offsetof({{type}}, exec_context.capability_ambient_set) | |
64 | {{type}}.TimerSlackNSec, config_parse_nsec, 0, offsetof({{type}}, exec_context.timer_slack_nsec) | |
65 | {{type}}.NoNewPrivileges, config_parse_bool, 0, offsetof({{type}}, exec_context.no_new_privileges) | |
66 | {{type}}.KeyringMode, config_parse_exec_keyring_mode, 0, offsetof({{type}}, exec_context.keyring_mode) | |
67 | {{type}}.ProtectProc, config_parse_protect_proc, 0, offsetof({{type}}, exec_context.protect_proc) | |
68 | {{type}}.ProcSubset, config_parse_proc_subset, 0, offsetof({{type}}, exec_context.proc_subset) | |
69 | {% if HAVE_SECCOMP %} | |
70 | {{type}}.SystemCallFilter, config_parse_syscall_filter, 0, offsetof({{type}}, exec_context) | |
71 | {{type}}.SystemCallArchitectures, config_parse_syscall_archs, 0, offsetof({{type}}, exec_context.syscall_archs) | |
72 | {{type}}.SystemCallErrorNumber, config_parse_syscall_errno, 0, offsetof({{type}}, exec_context) | |
73 | {{type}}.SystemCallLog, config_parse_syscall_log, 0, offsetof({{type}}, exec_context) | |
74 | {{type}}.MemoryDenyWriteExecute, config_parse_bool, 0, offsetof({{type}}, exec_context.memory_deny_write_execute) | |
75 | {{type}}.RestrictNamespaces, config_parse_restrict_namespaces, 0, offsetof({{type}}, exec_context) | |
76 | {{type}}.RestrictRealtime, config_parse_bool, 0, offsetof({{type}}, exec_context.restrict_realtime) | |
77 | {{type}}.RestrictSUIDSGID, config_parse_bool, 0, offsetof({{type}}, exec_context.restrict_suid_sgid) | |
78 | {{type}}.RestrictAddressFamilies, config_parse_address_families, 0, offsetof({{type}}, exec_context) | |
79 | {{type}}.LockPersonality, config_parse_bool, 0, offsetof({{type}}, exec_context.lock_personality) | |
80 | {% else %} | |
81 | {{type}}.SystemCallFilter, config_parse_warn_compat, DISABLED_CONFIGURATION, 0 | |
82 | {{type}}.SystemCallArchitectures, config_parse_warn_compat, DISABLED_CONFIGURATION, 0 | |
83 | {{type}}.SystemCallErrorNumber, config_parse_warn_compat, DISABLED_CONFIGURATION, 0 | |
84 | {{type}}.SystemCallLog, config_parse_warn_compat, DISABLED_CONFIGURATION, 0 | |
85 | {{type}}.MemoryDenyWriteExecute, config_parse_warn_compat, DISABLED_CONFIGURATION, 0 | |
86 | {{type}}.RestrictNamespaces, config_parse_warn_compat, DISABLED_CONFIGURATION, 0 | |
87 | {{type}}.RestrictRealtime, config_parse_warn_compat, DISABLED_CONFIGURATION, 0 | |
88 | {{type}}.RestrictSUIDSGID, config_parse_warn_compat, DISABLED_CONFIGURATION, 0 | |
89 | {{type}}.RestrictAddressFamilies, config_parse_warn_compat, DISABLED_CONFIGURATION, 0 | |
90 | {{type}}.LockPersonality, config_parse_warn_compat, DISABLED_CONFIGURATION, 0 | |
91 | {% endif %} | |
e59ccd03 | 92 | {{type}}.RestrictFileSystems, config_parse_restrict_filesystems, 0, offsetof({{type}}, exec_context) |
997f52a5 ZJS |
93 | {{type}}.LimitCPU, config_parse_rlimit, RLIMIT_CPU, offsetof({{type}}, exec_context.rlimit) |
94 | {{type}}.LimitFSIZE, config_parse_rlimit, RLIMIT_FSIZE, offsetof({{type}}, exec_context.rlimit) | |
95 | {{type}}.LimitDATA, config_parse_rlimit, RLIMIT_DATA, offsetof({{type}}, exec_context.rlimit) | |
96 | {{type}}.LimitSTACK, config_parse_rlimit, RLIMIT_STACK, offsetof({{type}}, exec_context.rlimit) | |
97 | {{type}}.LimitCORE, config_parse_rlimit, RLIMIT_CORE, offsetof({{type}}, exec_context.rlimit) | |
98 | {{type}}.LimitRSS, config_parse_rlimit, RLIMIT_RSS, offsetof({{type}}, exec_context.rlimit) | |
99 | {{type}}.LimitNOFILE, config_parse_rlimit, RLIMIT_NOFILE, offsetof({{type}}, exec_context.rlimit) | |
100 | {{type}}.LimitAS, config_parse_rlimit, RLIMIT_AS, offsetof({{type}}, exec_context.rlimit) | |
101 | {{type}}.LimitNPROC, config_parse_rlimit, RLIMIT_NPROC, offsetof({{type}}, exec_context.rlimit) | |
102 | {{type}}.LimitMEMLOCK, config_parse_rlimit, RLIMIT_MEMLOCK, offsetof({{type}}, exec_context.rlimit) | |
103 | {{type}}.LimitLOCKS, config_parse_rlimit, RLIMIT_LOCKS, offsetof({{type}}, exec_context.rlimit) | |
104 | {{type}}.LimitSIGPENDING, config_parse_rlimit, RLIMIT_SIGPENDING, offsetof({{type}}, exec_context.rlimit) | |
105 | {{type}}.LimitMSGQUEUE, config_parse_rlimit, RLIMIT_MSGQUEUE, offsetof({{type}}, exec_context.rlimit) | |
106 | {{type}}.LimitNICE, config_parse_rlimit, RLIMIT_NICE, offsetof({{type}}, exec_context.rlimit) | |
107 | {{type}}.LimitRTPRIO, config_parse_rlimit, RLIMIT_RTPRIO, offsetof({{type}}, exec_context.rlimit) | |
108 | {{type}}.LimitRTTIME, config_parse_rlimit, RLIMIT_RTTIME, offsetof({{type}}, exec_context.rlimit) | |
109 | {{type}}.ReadWriteDirectories, config_parse_namespace_path_strv, 0, offsetof({{type}}, exec_context.read_write_paths) | |
110 | {{type}}.ReadOnlyDirectories, config_parse_namespace_path_strv, 0, offsetof({{type}}, exec_context.read_only_paths) | |
111 | {{type}}.InaccessibleDirectories, config_parse_namespace_path_strv, 0, offsetof({{type}}, exec_context.inaccessible_paths) | |
112 | {{type}}.ReadWritePaths, config_parse_namespace_path_strv, 0, offsetof({{type}}, exec_context.read_write_paths) | |
113 | {{type}}.ReadOnlyPaths, config_parse_namespace_path_strv, 0, offsetof({{type}}, exec_context.read_only_paths) | |
114 | {{type}}.InaccessiblePaths, config_parse_namespace_path_strv, 0, offsetof({{type}}, exec_context.inaccessible_paths) | |
115 | {{type}}.ExecPaths, config_parse_namespace_path_strv, 0, offsetof({{type}}, exec_context.exec_paths) | |
116 | {{type}}.NoExecPaths, config_parse_namespace_path_strv, 0, offsetof({{type}}, exec_context.no_exec_paths) | |
8c35c10d | 117 | {{type}}.ExecSearchPath, config_parse_colon_separated_paths, 0, offsetof({{type}}, exec_context.exec_search_path) |
997f52a5 ZJS |
118 | {{type}}.BindPaths, config_parse_bind_paths, 0, offsetof({{type}}, exec_context) |
119 | {{type}}.BindReadOnlyPaths, config_parse_bind_paths, 0, offsetof({{type}}, exec_context) | |
120 | {{type}}.TemporaryFileSystem, config_parse_temporary_filesystems, 0, offsetof({{type}}, exec_context) | |
121 | {{type}}.PrivateTmp, config_parse_bool, 0, offsetof({{type}}, exec_context.private_tmp) | |
122 | {{type}}.PrivateDevices, config_parse_bool, 0, offsetof({{type}}, exec_context.private_devices) | |
123 | {{type}}.ProtectKernelTunables, config_parse_bool, 0, offsetof({{type}}, exec_context.protect_kernel_tunables) | |
124 | {{type}}.ProtectKernelModules, config_parse_bool, 0, offsetof({{type}}, exec_context.protect_kernel_modules) | |
125 | {{type}}.ProtectKernelLogs, config_parse_bool, 0, offsetof({{type}}, exec_context.protect_kernel_logs) | |
126 | {{type}}.ProtectClock, config_parse_bool, 0, offsetof({{type}}, exec_context.protect_clock) | |
127 | {{type}}.ProtectControlGroups, config_parse_bool, 0, offsetof({{type}}, exec_context.protect_control_groups) | |
128 | {{type}}.NetworkNamespacePath, config_parse_unit_path_printf, 0, offsetof({{type}}, exec_context.network_namespace_path) | |
129 | {{type}}.IPCNamespacePath, config_parse_unit_path_printf, 0, offsetof({{type}}, exec_context.ipc_namespace_path) | |
130 | {{type}}.LogNamespace, config_parse_log_namespace, 0, offsetof({{type}}, exec_context) | |
131 | {{type}}.PrivateNetwork, config_parse_bool, 0, offsetof({{type}}, exec_context.private_network) | |
132 | {{type}}.PrivateUsers, config_parse_bool, 0, offsetof({{type}}, exec_context.private_users) | |
24002121 | 133 | {{type}}.PrivateMounts, config_parse_tristate, 0, offsetof({{type}}, exec_context.private_mounts) |
997f52a5 ZJS |
134 | {{type}}.PrivateIPC, config_parse_bool, 0, offsetof({{type}}, exec_context.private_ipc) |
135 | {{type}}.ProtectSystem, config_parse_protect_system, 0, offsetof({{type}}, exec_context.protect_system) | |
136 | {{type}}.ProtectHome, config_parse_protect_home, 0, offsetof({{type}}, exec_context.protect_home) | |
874cdcbc | 137 | {{type}}.MountFlags, config_parse_exec_mount_propagation_flag, 0, offsetof({{type}}, exec_context.mount_propagation_flag) |
997f52a5 ZJS |
138 | {{type}}.MountAPIVFS, config_parse_exec_mount_apivfs, 0, offsetof({{type}}, exec_context) |
139 | {{type}}.Personality, config_parse_personality, 0, offsetof({{type}}, exec_context.personality) | |
b9c1883a | 140 | {{type}}.RuntimeDirectoryPreserve, config_parse_exec_preserve_mode, 0, offsetof({{type}}, exec_context.runtime_directory_preserve_mode) |
997f52a5 | 141 | {{type}}.RuntimeDirectoryMode, config_parse_mode, 0, offsetof({{type}}, exec_context.directories[EXEC_DIRECTORY_RUNTIME].mode) |
211a3d87 | 142 | {{type}}.RuntimeDirectory, config_parse_exec_directories, 0, offsetof({{type}}, exec_context.directories[EXEC_DIRECTORY_RUNTIME]) |
997f52a5 | 143 | {{type}}.StateDirectoryMode, config_parse_mode, 0, offsetof({{type}}, exec_context.directories[EXEC_DIRECTORY_STATE].mode) |
211a3d87 | 144 | {{type}}.StateDirectory, config_parse_exec_directories, 0, offsetof({{type}}, exec_context.directories[EXEC_DIRECTORY_STATE]) |
997f52a5 | 145 | {{type}}.CacheDirectoryMode, config_parse_mode, 0, offsetof({{type}}, exec_context.directories[EXEC_DIRECTORY_CACHE].mode) |
211a3d87 | 146 | {{type}}.CacheDirectory, config_parse_exec_directories, 0, offsetof({{type}}, exec_context.directories[EXEC_DIRECTORY_CACHE]) |
997f52a5 | 147 | {{type}}.LogsDirectoryMode, config_parse_mode, 0, offsetof({{type}}, exec_context.directories[EXEC_DIRECTORY_LOGS].mode) |
211a3d87 | 148 | {{type}}.LogsDirectory, config_parse_exec_directories, 0, offsetof({{type}}, exec_context.directories[EXEC_DIRECTORY_LOGS]) |
997f52a5 | 149 | {{type}}.ConfigurationDirectoryMode, config_parse_mode, 0, offsetof({{type}}, exec_context.directories[EXEC_DIRECTORY_CONFIGURATION].mode) |
211a3d87 | 150 | {{type}}.ConfigurationDirectory, config_parse_exec_directories, 0, offsetof({{type}}, exec_context.directories[EXEC_DIRECTORY_CONFIGURATION]) |
997f52a5 | 151 | {{type}}.SetCredential, config_parse_set_credential, 0, offsetof({{type}}, exec_context) |
43144be4 | 152 | {{type}}.SetCredentialEncrypted, config_parse_set_credential, 1, offsetof({{type}}, exec_context) |
997f52a5 | 153 | {{type}}.LoadCredential, config_parse_load_credential, 0, offsetof({{type}}, exec_context) |
43144be4 | 154 | {{type}}.LoadCredentialEncrypted, config_parse_load_credential, 1, offsetof({{type}}, exec_context) |
bbfb25f4 | 155 | {{type}}.ImportCredential, config_parse_import_credential, 0, offsetof({{type}}, exec_context.import_credentials) |
997f52a5 ZJS |
156 | {{type}}.TimeoutCleanSec, config_parse_sec, 0, offsetof({{type}}, exec_context.timeout_clean_usec) |
157 | {% if HAVE_PAM %} | |
158 | {{type}}.PAMName, config_parse_unit_string_printf, 0, offsetof({{type}}, exec_context.pam_name) | |
159 | {% else %} | |
160 | {{type}}.PAMName, config_parse_warn_compat, DISABLED_CONFIGURATION, 0 | |
161 | {% endif %} | |
162 | {{type}}.IgnoreSIGPIPE, config_parse_bool, 0, offsetof({{type}}, exec_context.ignore_sigpipe) | |
163 | {{type}}.UtmpIdentifier, config_parse_unit_string_printf, 0, offsetof({{type}}, exec_context.utmp_id) | |
164 | {{type}}.UtmpMode, config_parse_exec_utmp_mode, 0, offsetof({{type}}, exec_context.utmp_mode) | |
165 | {% if HAVE_SELINUX %} | |
166 | {{type}}.SELinuxContext, config_parse_exec_selinux_context, 0, offsetof({{type}}, exec_context) | |
167 | {% else %} | |
168 | {{type}}.SELinuxContext, config_parse_warn_compat, DISABLED_CONFIGURATION, 0 | |
169 | {% endif %} | |
170 | {% if HAVE_APPARMOR %} | |
171 | {{type}}.AppArmorProfile, config_parse_exec_apparmor_profile, 0, offsetof({{type}}, exec_context) | |
172 | {% else %} | |
173 | {{type}}.AppArmorProfile, config_parse_warn_compat, DISABLED_CONFIGURATION, 0 | |
174 | {% endif %} | |
175 | {% if ENABLE_SMACK %} | |
176 | {{type}}.SmackProcessLabel, config_parse_exec_smack_process_label, 0, offsetof({{type}}, exec_context) | |
177 | {% else %} | |
178 | {{type}}.SmackProcessLabel, config_parse_warn_compat, DISABLED_CONFIGURATION, 0 | |
179 | {% endif %} | |
180 | {{type}}.ProtectHostname, config_parse_bool, 0, offsetof({{type}}, exec_context.protect_hostname) | |
85614c6e | 181 | {{type}}.MemoryKSM, config_parse_tristate, 0, offsetof({{type}}, exec_context.memory_ksm) |
997f52a5 ZJS |
182 | {%- endmacro -%} |
183 | ||
184 | {%- macro KILL_CONTEXT_CONFIG_ITEMS(type) -%} | |
185 | {{type}}.SendSIGKILL, config_parse_bool, 0, offsetof({{type}}, kill_context.send_sigkill) | |
186 | {{type}}.SendSIGHUP, config_parse_bool, 0, offsetof({{type}}, kill_context.send_sighup) | |
187 | {{type}}.KillMode, config_parse_kill_mode, 0, offsetof({{type}}, kill_context.kill_mode) | |
188 | {{type}}.KillSignal, config_parse_signal, 0, offsetof({{type}}, kill_context.kill_signal) | |
189 | {{type}}.RestartKillSignal, config_parse_signal, 0, offsetof({{type}}, kill_context.restart_kill_signal) | |
190 | {{type}}.FinalKillSignal, config_parse_signal, 0, offsetof({{type}}, kill_context.final_kill_signal) | |
191 | {{type}}.WatchdogSignal, config_parse_signal, 0, offsetof({{type}}, kill_context.watchdog_signal) | |
192 | {%- endmacro -%} | |
193 | ||
194 | {%- macro CGROUP_CONTEXT_CONFIG_ITEMS(type) -%} | |
195 | {{type}}.Slice, config_parse_unit_slice, 0, 0 | |
31d3a520 PM |
196 | {{type}}.AllowedCPUs, config_parse_allowed_cpuset, 0, offsetof({{type}}, cgroup_context.cpuset_cpus) |
197 | {{type}}.StartupAllowedCPUs, config_parse_allowed_cpuset, 0, offsetof({{type}}, cgroup_context.startup_cpuset_cpus) | |
198 | {{type}}.AllowedMemoryNodes, config_parse_allowed_cpuset, 0, offsetof({{type}}, cgroup_context.cpuset_mems) | |
199 | {{type}}.StartupAllowedMemoryNodes, config_parse_allowed_cpuset, 0, offsetof({{type}}, cgroup_context.startup_cpuset_mems) | |
997f52a5 | 200 | {{type}}.CPUAccounting, config_parse_bool, 0, offsetof({{type}}, cgroup_context.cpu_accounting) |
c8340822 | 201 | {{type}}.CPUWeight, config_parse_cg_cpu_weight, 0, offsetof({{type}}, cgroup_context.cpu_weight) |
202 | {{type}}.StartupCPUWeight, config_parse_cg_cpu_weight, 0, offsetof({{type}}, cgroup_context.startup_cpu_weight) | |
997f52a5 ZJS |
203 | {{type}}.CPUShares, config_parse_cpu_shares, 0, offsetof({{type}}, cgroup_context.cpu_shares) |
204 | {{type}}.StartupCPUShares, config_parse_cpu_shares, 0, offsetof({{type}}, cgroup_context.startup_cpu_shares) | |
205 | {{type}}.CPUQuota, config_parse_cpu_quota, 0, offsetof({{type}}, cgroup_context) | |
206 | {{type}}.CPUQuotaPeriodSec, config_parse_sec_def_infinity, 0, offsetof({{type}}, cgroup_context.cpu_quota_period_usec) | |
207 | {{type}}.MemoryAccounting, config_parse_bool, 0, offsetof({{type}}, cgroup_context.memory_accounting) | |
208 | {{type}}.MemoryMin, config_parse_memory_limit, 0, offsetof({{type}}, cgroup_context) | |
209 | {{type}}.DefaultMemoryMin, config_parse_memory_limit, 0, offsetof({{type}}, cgroup_context) | |
210 | {{type}}.DefaultMemoryLow, config_parse_memory_limit, 0, offsetof({{type}}, cgroup_context) | |
53fda560 | 211 | {{type}}.DefaultStartupMemoryLow, config_parse_memory_limit, 0, offsetof({{type}}, cgroup_context) |
997f52a5 | 212 | {{type}}.MemoryLow, config_parse_memory_limit, 0, offsetof({{type}}, cgroup_context) |
53fda560 | 213 | {{type}}.StartupMemoryLow, config_parse_memory_limit, 0, offsetof({{type}}, cgroup_context) |
997f52a5 | 214 | {{type}}.MemoryHigh, config_parse_memory_limit, 0, offsetof({{type}}, cgroup_context) |
53fda560 | 215 | {{type}}.StartupMemoryHigh, config_parse_memory_limit, 0, offsetof({{type}}, cgroup_context) |
997f52a5 | 216 | {{type}}.MemoryMax, config_parse_memory_limit, 0, offsetof({{type}}, cgroup_context) |
53fda560 | 217 | {{type}}.StartupMemoryMax, config_parse_memory_limit, 0, offsetof({{type}}, cgroup_context) |
997f52a5 | 218 | {{type}}.MemorySwapMax, config_parse_memory_limit, 0, offsetof({{type}}, cgroup_context) |
53fda560 | 219 | {{type}}.StartupMemorySwapMax, config_parse_memory_limit, 0, offsetof({{type}}, cgroup_context) |
d7fe0a67 | 220 | {{type}}.MemoryZSwapMax, config_parse_memory_limit, 0, offsetof({{type}}, cgroup_context) |
53fda560 | 221 | {{type}}.StartupMemoryZSwapMax, config_parse_memory_limit, 0, offsetof({{type}}, cgroup_context) |
997f52a5 ZJS |
222 | {{type}}.MemoryLimit, config_parse_memory_limit, 0, offsetof({{type}}, cgroup_context) |
223 | {{type}}.DeviceAllow, config_parse_device_allow, 0, offsetof({{type}}, cgroup_context) | |
224 | {{type}}.DevicePolicy, config_parse_device_policy, 0, offsetof({{type}}, cgroup_context.device_policy) | |
225 | {{type}}.IOAccounting, config_parse_bool, 0, offsetof({{type}}, cgroup_context.io_accounting) | |
226 | {{type}}.IOWeight, config_parse_cg_weight, 0, offsetof({{type}}, cgroup_context.io_weight) | |
227 | {{type}}.StartupIOWeight, config_parse_cg_weight, 0, offsetof({{type}}, cgroup_context.startup_io_weight) | |
228 | {{type}}.IODeviceWeight, config_parse_io_device_weight, 0, offsetof({{type}}, cgroup_context) | |
229 | {{type}}.IOReadBandwidthMax, config_parse_io_limit, 0, offsetof({{type}}, cgroup_context) | |
230 | {{type}}.IOWriteBandwidthMax, config_parse_io_limit, 0, offsetof({{type}}, cgroup_context) | |
231 | {{type}}.IOReadIOPSMax, config_parse_io_limit, 0, offsetof({{type}}, cgroup_context) | |
232 | {{type}}.IOWriteIOPSMax, config_parse_io_limit, 0, offsetof({{type}}, cgroup_context) | |
233 | {{type}}.IODeviceLatencyTargetSec, config_parse_io_device_latency, 0, offsetof({{type}}, cgroup_context) | |
234 | {{type}}.BlockIOAccounting, config_parse_bool, 0, offsetof({{type}}, cgroup_context.blockio_accounting) | |
235 | {{type}}.BlockIOWeight, config_parse_blockio_weight, 0, offsetof({{type}}, cgroup_context.blockio_weight) | |
236 | {{type}}.StartupBlockIOWeight, config_parse_blockio_weight, 0, offsetof({{type}}, cgroup_context.startup_blockio_weight) | |
237 | {{type}}.BlockIODeviceWeight, config_parse_blockio_device_weight, 0, offsetof({{type}}, cgroup_context) | |
238 | {{type}}.BlockIOReadBandwidth, config_parse_blockio_bandwidth, 0, offsetof({{type}}, cgroup_context) | |
239 | {{type}}.BlockIOWriteBandwidth, config_parse_blockio_bandwidth, 0, offsetof({{type}}, cgroup_context) | |
240 | {{type}}.TasksAccounting, config_parse_bool, 0, offsetof({{type}}, cgroup_context.tasks_accounting) | |
241 | {{type}}.TasksMax, config_parse_tasks_max, 0, offsetof({{type}}, cgroup_context.tasks_max) | |
242 | {{type}}.Delegate, config_parse_delegate, 0, offsetof({{type}}, cgroup_context) | |
a8b993dc | 243 | {{type}}.DelegateSubgroup, config_parse_delegate_subgroup , 0, offsetof({{type}}, cgroup_context) |
997f52a5 ZJS |
244 | {{type}}.DisableControllers, config_parse_disable_controllers, 0, offsetof({{type}}, cgroup_context) |
245 | {{type}}.IPAccounting, config_parse_bool, 0, offsetof({{type}}, cgroup_context.ip_accounting) | |
84ebe6f0 YW |
246 | {{type}}.IPAddressAllow, config_parse_in_addr_prefixes, AF_UNSPEC, offsetof({{type}}, cgroup_context.ip_address_allow) |
247 | {{type}}.IPAddressDeny, config_parse_in_addr_prefixes, AF_UNSPEC, offsetof({{type}}, cgroup_context.ip_address_deny) | |
997f52a5 ZJS |
248 | {{type}}.IPIngressFilterPath, config_parse_ip_filter_bpf_progs, 0, offsetof({{type}}, cgroup_context.ip_filters_ingress) |
249 | {{type}}.IPEgressFilterPath, config_parse_ip_filter_bpf_progs, 0, offsetof({{type}}, cgroup_context.ip_filters_egress) | |
250 | {{type}}.ManagedOOMSwap, config_parse_managed_oom_mode, 0, offsetof({{type}}, cgroup_context.moom_swap) | |
251 | {{type}}.ManagedOOMMemoryPressure, config_parse_managed_oom_mode, 0, offsetof({{type}}, cgroup_context.moom_mem_pressure) | |
252 | {{type}}.ManagedOOMMemoryPressureLimit, config_parse_managed_oom_mem_pressure_limit, 0, offsetof({{type}}, cgroup_context.moom_mem_pressure_limit) | |
253 | {{type}}.ManagedOOMPreference, config_parse_managed_oom_preference, 0, offsetof({{type}}, cgroup_context.moom_preference) | |
254 | {{type}}.NetClass, config_parse_warn_compat, DISABLED_LEGACY, 0 | |
255 | {{type}}.BPFProgram, config_parse_bpf_foreign_program, 0, offsetof({{type}}, cgroup_context) | |
256 | {{type}}.SocketBindAllow, config_parse_cgroup_socket_bind, 0, offsetof({{type}}, cgroup_context.socket_bind_allow) | |
257 | {{type}}.SocketBindDeny, config_parse_cgroup_socket_bind, 0, offsetof({{type}}, cgroup_context.socket_bind_deny) | |
4f0c25c7 | 258 | {{type}}.RestrictNetworkInterfaces, config_parse_restrict_network_interfaces, 0, offsetof({{type}}, cgroup_context) |
054749e4 YW |
259 | {{type}}.MemoryPressureThresholdSec, config_parse_sec, 0, offsetof({{type}}, cgroup_context.memory_pressure_threshold_usec) |
260 | {{type}}.MemoryPressureWatch, config_parse_memory_pressure_watch, 0, offsetof({{type}}, cgroup_context.memory_pressure_watch) | |
dc7d69b3 | 261 | {{type}}.NFTSet, config_parse_cgroup_nft_set, NFT_SET_PARSE_CGROUP, offsetof({{type}}, cgroup_context) |
997f52a5 ZJS |
262 | {%- endmacro -%} |
263 | ||
f975e971 | 264 | %{ |
4831981d SL |
265 | #if __GNUC__ >= 7 |
266 | _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"") | |
267 | #endif | |
f975e971 | 268 | #include <stddef.h> |
f5947a5e | 269 | #include "all-units.h" |
f975e971 | 270 | #include "conf-parser.h" |
06e78680 | 271 | #include "image-policy.h" |
84ebe6f0 | 272 | #include "in-addr-prefix-util.h" |
f975e971 LP |
273 | #include "load-fragment.h" |
274 | %} | |
275 | struct ConfigPerfItem; | |
276 | %null_strings | |
277 | %language=ANSI-C | |
278 | %define slot-name section_and_lvalue | |
279 | %define hash-function-name load_fragment_gperf_hash | |
280 | %define lookup-function-name load_fragment_gperf_lookup | |
281 | %readonly-tables | |
282 | %omit-struct-type | |
283 | %struct-type | |
284 | %includes | |
285 | %% | |
620ed14e AZ |
286 | Unit.Description, config_parse_unit_string_printf, 0, offsetof(Unit, description) |
287 | Unit.Documentation, config_parse_documentation, 0, offsetof(Unit, documentation) | |
288 | Unit.SourcePath, config_parse_unit_path_printf, 0, offsetof(Unit, source_path) | |
289 | Unit.Requires, config_parse_unit_deps, UNIT_REQUIRES, 0 | |
290 | Unit.Requisite, config_parse_unit_deps, UNIT_REQUISITE, 0 | |
291 | Unit.Wants, config_parse_unit_deps, UNIT_WANTS, 0 | |
292 | Unit.BindsTo, config_parse_unit_deps, UNIT_BINDS_TO, 0 | |
293 | Unit.BindTo, config_parse_unit_deps, UNIT_BINDS_TO, 0 | |
0bc488c9 | 294 | Unit.Upholds, config_parse_unit_deps, UNIT_UPHOLDS, 0 |
620ed14e AZ |
295 | Unit.Conflicts, config_parse_unit_deps, UNIT_CONFLICTS, 0 |
296 | Unit.Before, config_parse_unit_deps, UNIT_BEFORE, 0 | |
297 | Unit.After, config_parse_unit_deps, UNIT_AFTER, 0 | |
294446dc | 298 | Unit.OnSuccess, config_parse_unit_deps, UNIT_ON_SUCCESS, 0 |
620ed14e AZ |
299 | Unit.OnFailure, config_parse_unit_deps, UNIT_ON_FAILURE, 0 |
300 | Unit.PropagatesReloadTo, config_parse_unit_deps, UNIT_PROPAGATES_RELOAD_TO, 0 | |
301 | Unit.PropagateReloadTo, config_parse_unit_deps, UNIT_PROPAGATES_RELOAD_TO, 0 | |
302 | Unit.ReloadPropagatedFrom, config_parse_unit_deps, UNIT_RELOAD_PROPAGATED_FROM, 0 | |
303 | Unit.PropagateReloadFrom, config_parse_unit_deps, UNIT_RELOAD_PROPAGATED_FROM, 0 | |
ffec78c0 LP |
304 | Unit.PropagatesStopTo, config_parse_unit_deps, UNIT_PROPAGATES_STOP_TO, 0 |
305 | Unit.StopPropagatedFrom, config_parse_unit_deps, UNIT_STOP_PROPAGATED_FROM, 0 | |
620ed14e AZ |
306 | Unit.PartOf, config_parse_unit_deps, UNIT_PART_OF, 0 |
307 | Unit.JoinsNamespaceOf, config_parse_unit_deps, UNIT_JOINS_NAMESPACE_OF, 0 | |
308 | Unit.RequiresOverridable, config_parse_obsolete_unit_deps, UNIT_REQUIRES, 0 | |
309 | Unit.RequisiteOverridable, config_parse_obsolete_unit_deps, UNIT_REQUISITE, 0 | |
310 | Unit.RequiresMountsFor, config_parse_unit_requires_mounts_for, 0, 0 | |
311 | Unit.StopWhenUnneeded, config_parse_bool, 0, offsetof(Unit, stop_when_unneeded) | |
312 | Unit.RefuseManualStart, config_parse_bool, 0, offsetof(Unit, refuse_manual_start) | |
313 | Unit.RefuseManualStop, config_parse_bool, 0, offsetof(Unit, refuse_manual_stop) | |
314 | Unit.AllowIsolate, config_parse_bool, 0, offsetof(Unit, allow_isolate) | |
315 | Unit.DefaultDependencies, config_parse_bool, 0, offsetof(Unit, default_dependencies) | |
559214cb | 316 | Unit.SurviveFinalKillSignal, config_parse_bool, 0, offsetof(Unit, survive_final_kill_signal) |
294446dc | 317 | Unit.OnSuccessJobMode, config_parse_job_mode, 0, offsetof(Unit, on_success_job_mode) |
620ed14e | 318 | Unit.OnFailureJobMode, config_parse_job_mode, 0, offsetof(Unit, on_failure_job_mode) |
997f52a5 | 319 | {# The following is a legacy alias name for compatibility #} |
620ed14e AZ |
320 | Unit.OnFailureIsolate, config_parse_job_mode_isolate, 0, offsetof(Unit, on_failure_job_mode) |
321 | Unit.IgnoreOnIsolate, config_parse_bool, 0, offsetof(Unit, ignore_on_isolate) | |
322 | Unit.IgnoreOnSnapshot, config_parse_warn_compat, DISABLED_LEGACY, 0 | |
323 | Unit.JobTimeoutSec, config_parse_job_timeout_sec, 0, 0 | |
324 | Unit.JobRunningTimeoutSec, config_parse_job_running_timeout_sec, 0, 0 | |
325 | Unit.JobTimeoutAction, config_parse_emergency_action, 0, offsetof(Unit, job_timeout_action) | |
326 | Unit.JobTimeoutRebootArgument, config_parse_unit_string_printf, 0, offsetof(Unit, job_timeout_reboot_arg) | |
327 | Unit.StartLimitIntervalSec, config_parse_sec, 0, offsetof(Unit, start_ratelimit.interval) | |
997f52a5 | 328 | {# The following is a legacy alias name for compatibility #} |
620ed14e AZ |
329 | Unit.StartLimitInterval, config_parse_sec, 0, offsetof(Unit, start_ratelimit.interval) |
330 | Unit.StartLimitBurst, config_parse_unsigned, 0, offsetof(Unit, start_ratelimit.burst) | |
331 | Unit.StartLimitAction, config_parse_emergency_action, 0, offsetof(Unit, start_limit_action) | |
332 | Unit.FailureAction, config_parse_emergency_action, 0, offsetof(Unit, failure_action) | |
333 | Unit.SuccessAction, config_parse_emergency_action, 0, offsetof(Unit, success_action) | |
334 | Unit.FailureActionExitStatus, config_parse_exit_status, 0, offsetof(Unit, failure_action_exit_status) | |
335 | Unit.SuccessActionExitStatus, config_parse_exit_status, 0, offsetof(Unit, success_action_exit_status) | |
336 | Unit.RebootArgument, config_parse_unit_string_printf, 0, offsetof(Unit, reboot_arg) | |
337 | Unit.ConditionPathExists, config_parse_unit_condition_path, CONDITION_PATH_EXISTS, offsetof(Unit, conditions) | |
338 | Unit.ConditionPathExistsGlob, config_parse_unit_condition_path, CONDITION_PATH_EXISTS_GLOB, offsetof(Unit, conditions) | |
339 | Unit.ConditionPathIsDirectory, config_parse_unit_condition_path, CONDITION_PATH_IS_DIRECTORY, offsetof(Unit, conditions) | |
340 | Unit.ConditionPathIsSymbolicLink, config_parse_unit_condition_path, CONDITION_PATH_IS_SYMBOLIC_LINK, offsetof(Unit, conditions) | |
341 | Unit.ConditionPathIsMountPoint, config_parse_unit_condition_path, CONDITION_PATH_IS_MOUNT_POINT, offsetof(Unit, conditions) | |
342 | Unit.ConditionPathIsReadWrite, config_parse_unit_condition_path, CONDITION_PATH_IS_READ_WRITE, offsetof(Unit, conditions) | |
343 | Unit.ConditionPathIsEncrypted, config_parse_unit_condition_path, CONDITION_PATH_IS_ENCRYPTED, offsetof(Unit, conditions) | |
344 | Unit.ConditionDirectoryNotEmpty, config_parse_unit_condition_path, CONDITION_DIRECTORY_NOT_EMPTY, offsetof(Unit, conditions) | |
345 | Unit.ConditionFileNotEmpty, config_parse_unit_condition_path, CONDITION_FILE_NOT_EMPTY, offsetof(Unit, conditions) | |
346 | Unit.ConditionFileIsExecutable, config_parse_unit_condition_path, CONDITION_FILE_IS_EXECUTABLE, offsetof(Unit, conditions) | |
347 | Unit.ConditionNeedsUpdate, config_parse_unit_condition_path, CONDITION_NEEDS_UPDATE, offsetof(Unit, conditions) | |
348 | Unit.ConditionFirstBoot, config_parse_unit_condition_string, CONDITION_FIRST_BOOT, offsetof(Unit, conditions) | |
349 | Unit.ConditionArchitecture, config_parse_unit_condition_string, CONDITION_ARCHITECTURE, offsetof(Unit, conditions) | |
cbcdcaaa | 350 | Unit.ConditionFirmware, config_parse_unit_condition_string, CONDITION_FIRMWARE, offsetof(Unit, conditions) |
620ed14e AZ |
351 | Unit.ConditionVirtualization, config_parse_unit_condition_string, CONDITION_VIRTUALIZATION, offsetof(Unit, conditions) |
352 | Unit.ConditionHost, config_parse_unit_condition_string, CONDITION_HOST, offsetof(Unit, conditions) | |
353 | Unit.ConditionKernelCommandLine, config_parse_unit_condition_string, CONDITION_KERNEL_COMMAND_LINE, offsetof(Unit, conditions) | |
354 | Unit.ConditionKernelVersion, config_parse_unit_condition_string, CONDITION_KERNEL_VERSION, offsetof(Unit, conditions) | |
4f80cfca | 355 | Unit.ConditionCredential, config_parse_unit_condition_string, CONDITION_CREDENTIAL, offsetof(Unit, conditions) |
620ed14e AZ |
356 | Unit.ConditionSecurity, config_parse_unit_condition_string, CONDITION_SECURITY, offsetof(Unit, conditions) |
357 | Unit.ConditionCapability, config_parse_unit_condition_string, CONDITION_CAPABILITY, offsetof(Unit, conditions) | |
358 | Unit.ConditionACPower, config_parse_unit_condition_string, CONDITION_AC_POWER, offsetof(Unit, conditions) | |
359 | Unit.ConditionMemory, config_parse_unit_condition_string, CONDITION_MEMORY, offsetof(Unit, conditions) | |
bb5824c9 | 360 | Unit.ConditionCPUFeature, config_parse_unit_condition_string, CONDITION_CPU_FEATURE, offsetof(Unit, conditions) |
620ed14e AZ |
361 | Unit.ConditionCPUs, config_parse_unit_condition_string, CONDITION_CPUS, offsetof(Unit, conditions) |
362 | Unit.ConditionEnvironment, config_parse_unit_condition_string, CONDITION_ENVIRONMENT, offsetof(Unit, conditions) | |
363 | Unit.ConditionUser, config_parse_unit_condition_string, CONDITION_USER, offsetof(Unit, conditions) | |
364 | Unit.ConditionGroup, config_parse_unit_condition_string, CONDITION_GROUP, offsetof(Unit, conditions) | |
365 | Unit.ConditionControlGroupController, config_parse_unit_condition_string, CONDITION_CONTROL_GROUP_CONTROLLER, offsetof(Unit, conditions) | |
1e26f8a6 | 366 | Unit.ConditionOSRelease, config_parse_unit_condition_string, CONDITION_OS_RELEASE, offsetof(Unit, conditions) |
81513b38 LB |
367 | Unit.ConditionMemoryPressure, config_parse_unit_condition_string, CONDITION_MEMORY_PRESSURE, offsetof(Unit, conditions) |
368 | Unit.ConditionCPUPressure, config_parse_unit_condition_string, CONDITION_CPU_PRESSURE, offsetof(Unit, conditions) | |
369 | Unit.ConditionIOPressure, config_parse_unit_condition_string, CONDITION_IO_PRESSURE, offsetof(Unit, conditions) | |
620ed14e AZ |
370 | Unit.AssertPathExists, config_parse_unit_condition_path, CONDITION_PATH_EXISTS, offsetof(Unit, asserts) |
371 | Unit.AssertPathExistsGlob, config_parse_unit_condition_path, CONDITION_PATH_EXISTS_GLOB, offsetof(Unit, asserts) | |
372 | Unit.AssertPathIsDirectory, config_parse_unit_condition_path, CONDITION_PATH_IS_DIRECTORY, offsetof(Unit, asserts) | |
373 | Unit.AssertPathIsSymbolicLink, config_parse_unit_condition_path, CONDITION_PATH_IS_SYMBOLIC_LINK, offsetof(Unit, asserts) | |
374 | Unit.AssertPathIsMountPoint, config_parse_unit_condition_path, CONDITION_PATH_IS_MOUNT_POINT, offsetof(Unit, asserts) | |
375 | Unit.AssertPathIsReadWrite, config_parse_unit_condition_path, CONDITION_PATH_IS_READ_WRITE, offsetof(Unit, asserts) | |
376 | Unit.AssertPathIsEncrypted, config_parse_unit_condition_path, CONDITION_PATH_IS_ENCRYPTED, offsetof(Unit, asserts) | |
377 | Unit.AssertDirectoryNotEmpty, config_parse_unit_condition_path, CONDITION_DIRECTORY_NOT_EMPTY, offsetof(Unit, asserts) | |
378 | Unit.AssertFileNotEmpty, config_parse_unit_condition_path, CONDITION_FILE_NOT_EMPTY, offsetof(Unit, asserts) | |
379 | Unit.AssertFileIsExecutable, config_parse_unit_condition_path, CONDITION_FILE_IS_EXECUTABLE, offsetof(Unit, asserts) | |
380 | Unit.AssertNeedsUpdate, config_parse_unit_condition_path, CONDITION_NEEDS_UPDATE, offsetof(Unit, asserts) | |
381 | Unit.AssertFirstBoot, config_parse_unit_condition_string, CONDITION_FIRST_BOOT, offsetof(Unit, asserts) | |
382 | Unit.AssertArchitecture, config_parse_unit_condition_string, CONDITION_ARCHITECTURE, offsetof(Unit, asserts) | |
383 | Unit.AssertVirtualization, config_parse_unit_condition_string, CONDITION_VIRTUALIZATION, offsetof(Unit, asserts) | |
384 | Unit.AssertHost, config_parse_unit_condition_string, CONDITION_HOST, offsetof(Unit, asserts) | |
385 | Unit.AssertKernelCommandLine, config_parse_unit_condition_string, CONDITION_KERNEL_COMMAND_LINE, offsetof(Unit, asserts) | |
386 | Unit.AssertKernelVersion, config_parse_unit_condition_string, CONDITION_KERNEL_VERSION, offsetof(Unit, asserts) | |
4f80cfca | 387 | Unit.AssertCredential, config_parse_unit_condition_string, CONDITION_CREDENTIAL, offsetof(Unit, asserts) |
620ed14e AZ |
388 | Unit.AssertSecurity, config_parse_unit_condition_string, CONDITION_SECURITY, offsetof(Unit, asserts) |
389 | Unit.AssertCapability, config_parse_unit_condition_string, CONDITION_CAPABILITY, offsetof(Unit, asserts) | |
390 | Unit.AssertACPower, config_parse_unit_condition_string, CONDITION_AC_POWER, offsetof(Unit, asserts) | |
391 | Unit.AssertMemory, config_parse_unit_condition_string, CONDITION_MEMORY, offsetof(Unit, asserts) | |
bb5824c9 | 392 | Unit.AssertCPUFeature, config_parse_unit_condition_string, CONDITION_CPU_FEATURE, offsetof(Unit, asserts) |
620ed14e AZ |
393 | Unit.AssertCPUs, config_parse_unit_condition_string, CONDITION_CPUS, offsetof(Unit, asserts) |
394 | Unit.AssertEnvironment, config_parse_unit_condition_string, CONDITION_ENVIRONMENT, offsetof(Unit, asserts) | |
395 | Unit.AssertUser, config_parse_unit_condition_string, CONDITION_USER, offsetof(Unit, asserts) | |
396 | Unit.AssertGroup, config_parse_unit_condition_string, CONDITION_GROUP, offsetof(Unit, asserts) | |
397 | Unit.AssertControlGroupController, config_parse_unit_condition_string, CONDITION_CONTROL_GROUP_CONTROLLER, offsetof(Unit, asserts) | |
1e26f8a6 | 398 | Unit.AssertOSRelease, config_parse_unit_condition_string, CONDITION_OS_RELEASE, offsetof(Unit, asserts) |
81513b38 LB |
399 | Unit.AssertMemoryPressure, config_parse_unit_condition_string, CONDITION_MEMORY_PRESSURE, offsetof(Unit, asserts) |
400 | Unit.AssertCPUPressure, config_parse_unit_condition_string, CONDITION_CPU_PRESSURE, offsetof(Unit, asserts) | |
401 | Unit.AssertIOPressure, config_parse_unit_condition_string, CONDITION_IO_PRESSURE, offsetof(Unit, asserts) | |
620ed14e | 402 | Unit.CollectMode, config_parse_collect_mode, 0, offsetof(Unit, collect_mode) |
620ed14e AZ |
403 | Service.PIDFile, config_parse_pid_file, 0, offsetof(Service, pid_file) |
404 | Service.ExecCondition, config_parse_exec, SERVICE_EXEC_CONDITION, offsetof(Service, exec_command) | |
405 | Service.ExecStartPre, config_parse_exec, SERVICE_EXEC_START_PRE, offsetof(Service, exec_command) | |
406 | Service.ExecStart, config_parse_exec, SERVICE_EXEC_START, offsetof(Service, exec_command) | |
407 | Service.ExecStartPost, config_parse_exec, SERVICE_EXEC_START_POST, offsetof(Service, exec_command) | |
408 | Service.ExecReload, config_parse_exec, SERVICE_EXEC_RELOAD, offsetof(Service, exec_command) | |
409 | Service.ExecStop, config_parse_exec, SERVICE_EXEC_STOP, offsetof(Service, exec_command) | |
410 | Service.ExecStopPost, config_parse_exec, SERVICE_EXEC_STOP_POST, offsetof(Service, exec_command) | |
411 | Service.RestartSec, config_parse_sec, 0, offsetof(Service, restart_usec) | |
be1adc27 | 412 | Service.RestartSteps, config_parse_unsigned, 0, offsetof(Service, restart_steps) |
e9f17fa8 | 413 | Service.RestartMaxDelaySec, config_parse_sec, 0, offsetof(Service, restart_max_delay_usec) |
620ed14e AZ |
414 | Service.TimeoutSec, config_parse_service_timeout, 0, 0 |
415 | Service.TimeoutStartSec, config_parse_service_timeout, 0, 0 | |
416 | Service.TimeoutStopSec, config_parse_sec_fix_0, 0, offsetof(Service, timeout_stop_usec) | |
417 | Service.TimeoutAbortSec, config_parse_service_timeout_abort, 0, 0 | |
418 | Service.TimeoutStartFailureMode, config_parse_service_timeout_failure_mode, 0, offsetof(Service, timeout_start_failure_mode) | |
419 | Service.TimeoutStopFailureMode, config_parse_service_timeout_failure_mode, 0, offsetof(Service, timeout_stop_failure_mode) | |
420 | Service.RuntimeMaxSec, config_parse_sec, 0, offsetof(Service, runtime_max_usec) | |
5918a933 | 421 | Service.RuntimeRandomizedExtraSec, config_parse_sec, 0, offsetof(Service, runtime_rand_extra_usec) |
620ed14e | 422 | Service.WatchdogSec, config_parse_sec, 0, offsetof(Service, watchdog_usec) |
997f52a5 | 423 | {# The following five only exist for compatibility, they moved into Unit, see above #} |
620ed14e AZ |
424 | Service.StartLimitInterval, config_parse_sec, 0, offsetof(Unit, start_ratelimit.interval) |
425 | Service.StartLimitBurst, config_parse_unsigned, 0, offsetof(Unit, start_ratelimit.burst) | |
426 | Service.StartLimitAction, config_parse_emergency_action, 0, offsetof(Unit, start_limit_action) | |
427 | Service.FailureAction, config_parse_emergency_action, 0, offsetof(Unit, failure_action) | |
428 | Service.RebootArgument, config_parse_unit_string_printf, 0, offsetof(Unit, reboot_arg) | |
429 | Service.Type, config_parse_service_type, 0, offsetof(Service, type) | |
596e4470 | 430 | Service.ExitType, config_parse_service_exit_type, 0, offsetof(Service, exit_type) |
620ed14e | 431 | Service.Restart, config_parse_service_restart, 0, offsetof(Service, restart) |
e568fea9 | 432 | Service.RestartMode, config_parse_service_restart_mode, 0, offsetof(Service, restart_mode) |
620ed14e AZ |
433 | Service.PermissionsStartOnly, config_parse_bool, 0, offsetof(Service, permissions_start_only) |
434 | Service.RootDirectoryStartOnly, config_parse_bool, 0, offsetof(Service, root_directory_start_only) | |
435 | Service.RemainAfterExit, config_parse_bool, 0, offsetof(Service, remain_after_exit) | |
436 | Service.GuessMainPID, config_parse_bool, 0, offsetof(Service, guess_main_pid) | |
437 | Service.RestartPreventExitStatus, config_parse_set_status, 0, offsetof(Service, restart_prevent_status) | |
438 | Service.RestartForceExitStatus, config_parse_set_status, 0, offsetof(Service, restart_force_status) | |
439 | Service.SuccessExitStatus, config_parse_set_status, 0, offsetof(Service, success_status) | |
440 | Service.SysVStartPriority, config_parse_warn_compat, DISABLED_LEGACY, 0 | |
441 | Service.NonBlocking, config_parse_bool, 0, offsetof(Service, exec_context.non_blocking) | |
442 | Service.BusName, config_parse_bus_name, 0, offsetof(Service, bus_name) | |
443 | Service.FileDescriptorStoreMax, config_parse_unsigned, 0, offsetof(Service, n_fd_store_max) | |
b9c1883a | 444 | Service.FileDescriptorStorePreserve, config_parse_exec_preserve_mode, 0, offsetof(Service, fd_store_preserve_mode) |
620ed14e AZ |
445 | Service.NotifyAccess, config_parse_notify_access, 0, offsetof(Service, notify_access) |
446 | Service.Sockets, config_parse_service_sockets, 0, 0 | |
447 | Service.BusPolicy, config_parse_warn_compat, DISABLED_LEGACY, 0 | |
448 | Service.USBFunctionDescriptors, config_parse_unit_path_printf, 0, offsetof(Service, usb_function_descriptors) | |
449 | Service.USBFunctionStrings, config_parse_unit_path_printf, 0, offsetof(Service, usb_function_strings) | |
450 | Service.OOMPolicy, config_parse_oom_policy, 0, offsetof(Service, oom_policy) | |
cd48e23f | 451 | Service.OpenFile, config_parse_open_file, 0, offsetof(Service, open_files) |
3bd28bf7 | 452 | Service.ReloadSignal, config_parse_signal, 0, offsetof(Service, reload_signal) |
997f52a5 ZJS |
453 | {{ EXEC_CONTEXT_CONFIG_ITEMS('Service') }} |
454 | {{ CGROUP_CONTEXT_CONFIG_ITEMS('Service') }} | |
455 | {{ KILL_CONTEXT_CONFIG_ITEMS('Service') }} | |
620ed14e AZ |
456 | Socket.ListenStream, config_parse_socket_listen, SOCKET_SOCKET, 0 |
457 | Socket.ListenDatagram, config_parse_socket_listen, SOCKET_SOCKET, 0 | |
458 | Socket.ListenSequentialPacket, config_parse_socket_listen, SOCKET_SOCKET, 0 | |
459 | Socket.ListenFIFO, config_parse_socket_listen, SOCKET_FIFO, 0 | |
460 | Socket.ListenNetlink, config_parse_socket_listen, SOCKET_SOCKET, 0 | |
461 | Socket.ListenSpecial, config_parse_socket_listen, SOCKET_SPECIAL, 0 | |
462 | Socket.ListenMessageQueue, config_parse_socket_listen, SOCKET_MQUEUE, 0 | |
463 | Socket.ListenUSBFunction, config_parse_socket_listen, SOCKET_USB_FUNCTION, 0 | |
464 | Socket.SocketProtocol, config_parse_socket_protocol, 0, offsetof(Socket, socket_protocol) | |
465 | Socket.BindIPv6Only, config_parse_socket_bind, 0, offsetof(Socket, bind_ipv6_only) | |
466 | Socket.Backlog, config_parse_unsigned, 0, offsetof(Socket, backlog) | |
467 | Socket.BindToDevice, config_parse_socket_bindtodevice, 0, 0 | |
468 | Socket.ExecStartPre, config_parse_exec, SOCKET_EXEC_START_PRE, offsetof(Socket, exec_command) | |
469 | Socket.ExecStartPost, config_parse_exec, SOCKET_EXEC_START_POST, offsetof(Socket, exec_command) | |
470 | Socket.ExecStopPre, config_parse_exec, SOCKET_EXEC_STOP_PRE, offsetof(Socket, exec_command) | |
471 | Socket.ExecStopPost, config_parse_exec, SOCKET_EXEC_STOP_POST, offsetof(Socket, exec_command) | |
472 | Socket.TimeoutSec, config_parse_sec_fix_0, 0, offsetof(Socket, timeout_usec) | |
473 | Socket.SocketUser, config_parse_user_group_compat, 0, offsetof(Socket, user) | |
474 | Socket.SocketGroup, config_parse_user_group_compat, 0, offsetof(Socket, group) | |
475 | Socket.SocketMode, config_parse_mode, 0, offsetof(Socket, socket_mode) | |
476 | Socket.DirectoryMode, config_parse_mode, 0, offsetof(Socket, directory_mode) | |
477 | Socket.Accept, config_parse_bool, 0, offsetof(Socket, accept) | |
478 | Socket.FlushPending, config_parse_bool, 0, offsetof(Socket, flush_pending) | |
479 | Socket.Writable, config_parse_bool, 0, offsetof(Socket, writable) | |
480 | Socket.MaxConnections, config_parse_unsigned, 0, offsetof(Socket, max_connections) | |
481 | Socket.MaxConnectionsPerSource, config_parse_unsigned, 0, offsetof(Socket, max_connections_per_source) | |
482 | Socket.KeepAlive, config_parse_bool, 0, offsetof(Socket, keep_alive) | |
483 | Socket.KeepAliveTimeSec, config_parse_sec, 0, offsetof(Socket, keep_alive_time) | |
484 | Socket.KeepAliveIntervalSec, config_parse_sec, 0, offsetof(Socket, keep_alive_interval) | |
485 | Socket.KeepAliveProbes, config_parse_unsigned, 0, offsetof(Socket, keep_alive_cnt) | |
486 | Socket.DeferAcceptSec, config_parse_sec, 0, offsetof(Socket, defer_accept) | |
487 | Socket.NoDelay, config_parse_bool, 0, offsetof(Socket, no_delay) | |
488 | Socket.Priority, config_parse_int, 0, offsetof(Socket, priority) | |
489 | Socket.ReceiveBuffer, config_parse_iec_size, 0, offsetof(Socket, receive_buffer) | |
490 | Socket.SendBuffer, config_parse_iec_size, 0, offsetof(Socket, send_buffer) | |
491 | Socket.IPTOS, config_parse_ip_tos, 0, offsetof(Socket, ip_tos) | |
492 | Socket.IPTTL, config_parse_int, 0, offsetof(Socket, ip_ttl) | |
493 | Socket.Mark, config_parse_int, 0, offsetof(Socket, mark) | |
494 | Socket.PipeSize, config_parse_iec_size, 0, offsetof(Socket, pipe_size) | |
495 | Socket.FreeBind, config_parse_bool, 0, offsetof(Socket, free_bind) | |
496 | Socket.Transparent, config_parse_bool, 0, offsetof(Socket, transparent) | |
497 | Socket.Broadcast, config_parse_bool, 0, offsetof(Socket, broadcast) | |
498 | Socket.PassCredentials, config_parse_bool, 0, offsetof(Socket, pass_cred) | |
499 | Socket.PassSecurity, config_parse_bool, 0, offsetof(Socket, pass_sec) | |
500 | Socket.PassPacketInfo, config_parse_bool, 0, offsetof(Socket, pass_pktinfo) | |
9b191525 | 501 | Socket.Timestamping, config_parse_socket_timestamping, 0, offsetof(Socket, timestamping) |
620ed14e AZ |
502 | Socket.TCPCongestion, config_parse_string, 0, offsetof(Socket, tcp_congestion) |
503 | Socket.ReusePort, config_parse_bool, 0, offsetof(Socket, reuse_port) | |
504 | Socket.MessageQueueMaxMessages, config_parse_long, 0, offsetof(Socket, mq_maxmsg) | |
505 | Socket.MessageQueueMessageSize, config_parse_long, 0, offsetof(Socket, mq_msgsize) | |
506 | Socket.RemoveOnStop, config_parse_bool, 0, offsetof(Socket, remove_on_stop) | |
507 | Socket.Symlinks, config_parse_unit_path_strv_printf, 0, offsetof(Socket, symlinks) | |
508 | Socket.FileDescriptorName, config_parse_fdname, 0, 0 | |
509 | Socket.Service, config_parse_socket_service, 0, 0 | |
510 | Socket.TriggerLimitIntervalSec, config_parse_sec, 0, offsetof(Socket, trigger_limit.interval) | |
511 | Socket.TriggerLimitBurst, config_parse_unsigned, 0, offsetof(Socket, trigger_limit.burst) | |
2bec84e7 LP |
512 | Socket.PollLimitIntervalSec, config_parse_sec, 0, offsetof(Socket, poll_limit_interval) |
513 | Socket.PollLimitBurst, config_parse_unsigned, 0, offsetof(Socket, poll_limit_burst) | |
997f52a5 ZJS |
514 | {% if ENABLE_SMACK %} |
515 | Socket.SmackLabel, config_parse_unit_string_printf, 0, offsetof(Socket, smack) | |
620ed14e | 516 | Socket.SmackLabelIPIn, config_parse_unit_string_printf, 0, offsetof(Socket, smack_ip_in) |
997f52a5 ZJS |
517 | Socket.SmackLabelIPOut, config_parse_unit_string_printf, 0, offsetof(Socket, smack_ip_out) |
518 | {% else %} | |
519 | Socket.SmackLabel, config_parse_warn_compat, DISABLED_CONFIGURATION, 0 | |
620ed14e | 520 | Socket.SmackLabelIPIn, config_parse_warn_compat, DISABLED_CONFIGURATION, 0 |
997f52a5 ZJS |
521 | Socket.SmackLabelIPOut, config_parse_warn_compat, DISABLED_CONFIGURATION, 0 |
522 | {% endif %} | |
523 | {% if HAVE_SELINUX %} | |
524 | Socket.SELinuxContextFromNet, config_parse_bool, 0, offsetof(Socket, selinux_context_from_net) | |
525 | {% else %} | |
526 | Socket.SELinuxContextFromNet, config_parse_warn_compat, DISABLED_CONFIGURATION, 0 | |
527 | {% endif %} | |
528 | {{ EXEC_CONTEXT_CONFIG_ITEMS('Socket') }} | |
529 | {{ CGROUP_CONTEXT_CONFIG_ITEMS('Socket') }} | |
530 | {{ KILL_CONTEXT_CONFIG_ITEMS('Socket') }} | |
620ed14e AZ |
531 | Mount.What, config_parse_unit_string_printf, 0, offsetof(Mount, parameters_fragment.what) |
532 | Mount.Where, config_parse_unit_path_printf, 0, offsetof(Mount, where) | |
533 | Mount.Options, config_parse_unit_string_printf, 0, offsetof(Mount, parameters_fragment.options) | |
534 | Mount.Type, config_parse_unit_string_printf, 0, offsetof(Mount, parameters_fragment.fstype) | |
535 | Mount.TimeoutSec, config_parse_sec_fix_0, 0, offsetof(Mount, timeout_usec) | |
536 | Mount.DirectoryMode, config_parse_mode, 0, offsetof(Mount, directory_mode) | |
537 | Mount.SloppyOptions, config_parse_bool, 0, offsetof(Mount, sloppy_options) | |
538 | Mount.LazyUnmount, config_parse_bool, 0, offsetof(Mount, lazy_unmount) | |
539 | Mount.ForceUnmount, config_parse_bool, 0, offsetof(Mount, force_unmount) | |
540 | Mount.ReadWriteOnly, config_parse_bool, 0, offsetof(Mount, read_write_only) | |
997f52a5 ZJS |
541 | {{ EXEC_CONTEXT_CONFIG_ITEMS('Mount') }} |
542 | {{ CGROUP_CONTEXT_CONFIG_ITEMS('Mount') }} | |
543 | {{ KILL_CONTEXT_CONFIG_ITEMS('Mount') }} | |
620ed14e | 544 | Automount.Where, config_parse_unit_path_printf, 0, offsetof(Automount, where) |
7c5cef22 | 545 | Automount.ExtraOptions, config_parse_unit_string_printf, 0, offsetof(Automount, extra_options) |
620ed14e AZ |
546 | Automount.DirectoryMode, config_parse_mode, 0, offsetof(Automount, directory_mode) |
547 | Automount.TimeoutIdleSec, config_parse_sec_fix_0, 0, offsetof(Automount, timeout_idle_usec) | |
620ed14e AZ |
548 | Swap.What, config_parse_unit_path_printf, 0, offsetof(Swap, parameters_fragment.what) |
549 | Swap.Priority, config_parse_swap_priority, 0, 0 | |
550 | Swap.Options, config_parse_unit_string_printf, 0, offsetof(Swap, parameters_fragment.options) | |
551 | Swap.TimeoutSec, config_parse_sec_fix_0, 0, offsetof(Swap, timeout_usec) | |
997f52a5 ZJS |
552 | {{ EXEC_CONTEXT_CONFIG_ITEMS('Swap') }} |
553 | {{ CGROUP_CONTEXT_CONFIG_ITEMS('Swap') }} | |
554 | {{ KILL_CONTEXT_CONFIG_ITEMS('Swap') }} | |
620ed14e AZ |
555 | Timer.OnCalendar, config_parse_timer, TIMER_CALENDAR, 0 |
556 | Timer.OnActiveSec, config_parse_timer, TIMER_ACTIVE, 0 | |
557 | Timer.OnBootSec, config_parse_timer, TIMER_BOOT, 0 | |
558 | Timer.OnStartupSec, config_parse_timer, TIMER_STARTUP, 0 | |
559 | Timer.OnUnitActiveSec, config_parse_timer, TIMER_UNIT_ACTIVE, 0 | |
560 | Timer.OnUnitInactiveSec, config_parse_timer, TIMER_UNIT_INACTIVE, 0 | |
561 | Timer.OnClockChange, config_parse_bool, 0, offsetof(Timer, on_clock_change) | |
562 | Timer.OnTimezoneChange, config_parse_bool, 0, offsetof(Timer, on_timezone_change) | |
563 | Timer.Persistent, config_parse_bool, 0, offsetof(Timer, persistent) | |
564 | Timer.WakeSystem, config_parse_bool, 0, offsetof(Timer, wake_system) | |
565 | Timer.RemainAfterElapse, config_parse_bool, 0, offsetof(Timer, remain_after_elapse) | |
acf24a1a | 566 | Timer.FixedRandomDelay, config_parse_bool, 0, offsetof(Timer, fixed_random_delay) |
620ed14e AZ |
567 | Timer.AccuracySec, config_parse_sec, 0, offsetof(Timer, accuracy_usec) |
568 | Timer.RandomizedDelaySec, config_parse_sec, 0, offsetof(Timer, random_usec) | |
569 | Timer.Unit, config_parse_trigger_unit, 0, 0 | |
620ed14e AZ |
570 | Path.PathExists, config_parse_path_spec, 0, 0 |
571 | Path.PathExistsGlob, config_parse_path_spec, 0, 0 | |
572 | Path.PathChanged, config_parse_path_spec, 0, 0 | |
573 | Path.PathModified, config_parse_path_spec, 0, 0 | |
574 | Path.DirectoryNotEmpty, config_parse_path_spec, 0, 0 | |
575 | Path.Unit, config_parse_trigger_unit, 0, 0 | |
576 | Path.MakeDirectory, config_parse_bool, 0, offsetof(Path, make_directory) | |
577 | Path.DirectoryMode, config_parse_mode, 0, offsetof(Path, directory_mode) | |
47dba9fb LB |
578 | Path.TriggerLimitIntervalSec, config_parse_sec, 0, offsetof(Path, trigger_limit.interval) |
579 | Path.TriggerLimitBurst, config_parse_unsigned, 0, offsetof(Path, trigger_limit.burst) | |
997f52a5 ZJS |
580 | {{ CGROUP_CONTEXT_CONFIG_ITEMS('Slice') }} |
581 | {{ CGROUP_CONTEXT_CONFIG_ITEMS('Scope') }} | |
582 | {{ KILL_CONTEXT_CONFIG_ITEMS('Scope') }} | |
620ed14e | 583 | Scope.RuntimeMaxSec, config_parse_sec, 0, offsetof(Scope, runtime_max_usec) |
5918a933 | 584 | Scope.RuntimeRandomizedExtraSec, config_parse_sec, 0, offsetof(Scope, runtime_rand_extra_usec) |
620ed14e | 585 | Scope.TimeoutStopSec, config_parse_sec, 0, offsetof(Scope, timeout_stop_usec) |
d5a1657d | 586 | Scope.OOMPolicy, config_parse_oom_policy, 0, offsetof(Scope, oom_policy) |
997f52a5 | 587 | {# The [Install] section is ignored here #} |
620ed14e AZ |
588 | Install.Alias, NULL, 0, 0 |
589 | Install.WantedBy, NULL, 0, 0 | |
590 | Install.RequiredBy, NULL, 0, 0 | |
38f90179 | 591 | Install.UpheldBy, NULL, 0, 0 |
620ed14e AZ |
592 | Install.Also, NULL, 0, 0 |
593 | Install.DefaultInstance, NULL, 0, 0 |