Debian Codegraph @

src/core/load-fragment-gperf.gperf.in

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