]> git.ipfire.org Git - thirdparty/systemd.git/blame_incremental - src/core/load-fragment.h
creds: Add ImportCredential=
[thirdparty/systemd.git] / src / core / load-fragment.h
... / ...
CommitLineData
1/* SPDX-License-Identifier: LGPL-2.1-or-later */
2#pragma once
3
4#include "conf-parser.h"
5#include "unit.h"
6
7/* These functions are declared in the header to make them accessible to unit tests. */
8bool contains_instance_specifier_superset(const char *s);
9int unit_is_likely_recursive_template_dependency(Unit *u, const char *name, const char *format);
10
11/* Config-parsing helpers relevant only for sources under src/core/ */
12int parse_crash_chvt(const char *value, int *data);
13int parse_confirm_spawn(const char *value, char **console);
14
15int hashmap_put_credential(Hashmap **h, const char *id, const char *path, bool encrypted);
16
17/* Read service data from .desktop file style configuration fragments */
18
19int unit_load_fragment(Unit *u);
20
21void unit_dump_config_items(FILE *f);
22
23CONFIG_PARSER_PROTOTYPE(config_parse_unit_deps);
24CONFIG_PARSER_PROTOTYPE(config_parse_obsolete_unit_deps);
25CONFIG_PARSER_PROTOTYPE(config_parse_unit_string_printf);
26CONFIG_PARSER_PROTOTYPE(config_parse_unit_strv_printf);
27CONFIG_PARSER_PROTOTYPE(config_parse_unit_path_printf);
28CONFIG_PARSER_PROTOTYPE(config_parse_colon_separated_paths);
29CONFIG_PARSER_PROTOTYPE(config_parse_unit_path_strv_printf);
30CONFIG_PARSER_PROTOTYPE(config_parse_documentation);
31CONFIG_PARSER_PROTOTYPE(config_parse_socket_listen);
32CONFIG_PARSER_PROTOTYPE(config_parse_socket_protocol);
33CONFIG_PARSER_PROTOTYPE(config_parse_socket_bind);
34CONFIG_PARSER_PROTOTYPE(config_parse_exec_nice);
35CONFIG_PARSER_PROTOTYPE(config_parse_exec_oom_score_adjust);
36CONFIG_PARSER_PROTOTYPE(config_parse_exec_coredump_filter);
37CONFIG_PARSER_PROTOTYPE(config_parse_exec);
38CONFIG_PARSER_PROTOTYPE(config_parse_service_timeout);
39CONFIG_PARSER_PROTOTYPE(config_parse_service_timeout_abort);
40CONFIG_PARSER_PROTOTYPE(config_parse_service_timeout_failure_mode);
41CONFIG_PARSER_PROTOTYPE(config_parse_service_type);
42CONFIG_PARSER_PROTOTYPE(config_parse_service_exit_type);
43CONFIG_PARSER_PROTOTYPE(config_parse_service_restart);
44CONFIG_PARSER_PROTOTYPE(config_parse_socket_bindtodevice);
45CONFIG_PARSER_PROTOTYPE(config_parse_exec_output);
46CONFIG_PARSER_PROTOTYPE(config_parse_exec_input);
47CONFIG_PARSER_PROTOTYPE(config_parse_exec_input_text);
48CONFIG_PARSER_PROTOTYPE(config_parse_exec_input_data);
49CONFIG_PARSER_PROTOTYPE(config_parse_exec_io_class);
50CONFIG_PARSER_PROTOTYPE(config_parse_exec_io_priority);
51CONFIG_PARSER_PROTOTYPE(config_parse_exec_cpu_sched_policy);
52CONFIG_PARSER_PROTOTYPE(config_parse_exec_cpu_sched_prio);
53CONFIG_PARSER_PROTOTYPE(config_parse_exec_cpu_affinity);
54CONFIG_PARSER_PROTOTYPE(config_parse_exec_mount_apivfs);
55CONFIG_PARSER_PROTOTYPE(config_parse_exec_secure_bits);
56CONFIG_PARSER_PROTOTYPE(config_parse_root_image_options);
57CONFIG_PARSER_PROTOTYPE(config_parse_exec_root_hash);
58CONFIG_PARSER_PROTOTYPE(config_parse_exec_root_hash_sig);
59CONFIG_PARSER_PROTOTYPE(config_parse_capability_set);
60CONFIG_PARSER_PROTOTYPE(config_parse_exec_mount_propagation_flag);
61CONFIG_PARSER_PROTOTYPE(config_parse_timer);
62CONFIG_PARSER_PROTOTYPE(config_parse_trigger_unit);
63CONFIG_PARSER_PROTOTYPE(config_parse_path_spec);
64CONFIG_PARSER_PROTOTYPE(config_parse_socket_service);
65CONFIG_PARSER_PROTOTYPE(config_parse_service_sockets);
66CONFIG_PARSER_PROTOTYPE(config_parse_unit_env_file);
67CONFIG_PARSER_PROTOTYPE(config_parse_ip_tos);
68CONFIG_PARSER_PROTOTYPE(config_parse_unit_condition_path);
69CONFIG_PARSER_PROTOTYPE(config_parse_unit_condition_string);
70CONFIG_PARSER_PROTOTYPE(config_parse_kill_mode);
71CONFIG_PARSER_PROTOTYPE(config_parse_notify_access);
72CONFIG_PARSER_PROTOTYPE(config_parse_emergency_action);
73CONFIG_PARSER_PROTOTYPE(config_parse_unit_requires_mounts_for);
74CONFIG_PARSER_PROTOTYPE(config_parse_syscall_filter);
75CONFIG_PARSER_PROTOTYPE(config_parse_syscall_archs);
76CONFIG_PARSER_PROTOTYPE(config_parse_syscall_errno);
77CONFIG_PARSER_PROTOTYPE(config_parse_syscall_log);
78CONFIG_PARSER_PROTOTYPE(config_parse_environ);
79CONFIG_PARSER_PROTOTYPE(config_parse_pass_environ);
80CONFIG_PARSER_PROTOTYPE(config_parse_unset_environ);
81CONFIG_PARSER_PROTOTYPE(config_parse_unit_slice);
82CONFIG_PARSER_PROTOTYPE(config_parse_cg_weight);
83CONFIG_PARSER_PROTOTYPE(config_parse_cg_cpu_weight);
84CONFIG_PARSER_PROTOTYPE(config_parse_cpu_shares);
85CONFIG_PARSER_PROTOTYPE(config_parse_memory_limit);
86CONFIG_PARSER_PROTOTYPE(config_parse_tasks_max);
87CONFIG_PARSER_PROTOTYPE(config_parse_delegate);
88CONFIG_PARSER_PROTOTYPE(config_parse_delegate_subgroup);
89CONFIG_PARSER_PROTOTYPE(config_parse_managed_oom_mode);
90CONFIG_PARSER_PROTOTYPE(config_parse_managed_oom_mem_pressure_limit);
91CONFIG_PARSER_PROTOTYPE(config_parse_managed_oom_preference);
92CONFIG_PARSER_PROTOTYPE(config_parse_device_policy);
93CONFIG_PARSER_PROTOTYPE(config_parse_device_allow);
94CONFIG_PARSER_PROTOTYPE(config_parse_io_device_latency);
95CONFIG_PARSER_PROTOTYPE(config_parse_io_device_weight);
96CONFIG_PARSER_PROTOTYPE(config_parse_io_limit);
97CONFIG_PARSER_PROTOTYPE(config_parse_blockio_weight);
98CONFIG_PARSER_PROTOTYPE(config_parse_blockio_device_weight);
99CONFIG_PARSER_PROTOTYPE(config_parse_blockio_bandwidth);
100CONFIG_PARSER_PROTOTYPE(config_parse_job_mode);
101CONFIG_PARSER_PROTOTYPE(config_parse_job_mode_isolate);
102CONFIG_PARSER_PROTOTYPE(config_parse_exec_selinux_context);
103CONFIG_PARSER_PROTOTYPE(config_parse_exec_apparmor_profile);
104CONFIG_PARSER_PROTOTYPE(config_parse_exec_smack_process_label);
105CONFIG_PARSER_PROTOTYPE(config_parse_address_families);
106CONFIG_PARSER_PROTOTYPE(config_parse_exec_preserve_mode);
107CONFIG_PARSER_PROTOTYPE(config_parse_exec_directories);
108CONFIG_PARSER_PROTOTYPE(config_parse_set_credential);
109CONFIG_PARSER_PROTOTYPE(config_parse_load_credential);
110CONFIG_PARSER_PROTOTYPE(config_parse_import_credential);
111CONFIG_PARSER_PROTOTYPE(config_parse_set_status);
112CONFIG_PARSER_PROTOTYPE(config_parse_namespace_path_strv);
113CONFIG_PARSER_PROTOTYPE(config_parse_temporary_filesystems);
114CONFIG_PARSER_PROTOTYPE(config_parse_cpu_quota);
115CONFIG_PARSER_PROTOTYPE(config_parse_allowed_cpuset);
116CONFIG_PARSER_PROTOTYPE(config_parse_protect_home);
117CONFIG_PARSER_PROTOTYPE(config_parse_protect_system);
118CONFIG_PARSER_PROTOTYPE(config_parse_bus_name);
119CONFIG_PARSER_PROTOTYPE(config_parse_exec_utmp_mode);
120CONFIG_PARSER_PROTOTYPE(config_parse_working_directory);
121CONFIG_PARSER_PROTOTYPE(config_parse_fdname);
122CONFIG_PARSER_PROTOTYPE(config_parse_user_group_compat);
123CONFIG_PARSER_PROTOTYPE(config_parse_user_group_strv_compat);
124CONFIG_PARSER_PROTOTYPE(config_parse_restrict_namespaces);
125CONFIG_PARSER_PROTOTYPE(config_parse_restrict_filesystems);
126CONFIG_PARSER_PROTOTYPE(config_parse_bind_paths);
127CONFIG_PARSER_PROTOTYPE(config_parse_exec_keyring_mode);
128CONFIG_PARSER_PROTOTYPE(config_parse_protect_proc);
129CONFIG_PARSER_PROTOTYPE(config_parse_proc_subset);
130CONFIG_PARSER_PROTOTYPE(config_parse_job_timeout_sec);
131CONFIG_PARSER_PROTOTYPE(config_parse_job_running_timeout_sec);
132CONFIG_PARSER_PROTOTYPE(config_parse_log_extra_fields);
133CONFIG_PARSER_PROTOTYPE(config_parse_log_namespace);
134CONFIG_PARSER_PROTOTYPE(config_parse_collect_mode);
135CONFIG_PARSER_PROTOTYPE(config_parse_pid_file);
136CONFIG_PARSER_PROTOTYPE(config_parse_exit_status);
137CONFIG_PARSER_PROTOTYPE(config_parse_disable_controllers);
138CONFIG_PARSER_PROTOTYPE(config_parse_oom_policy);
139CONFIG_PARSER_PROTOTYPE(config_parse_numa_policy);
140CONFIG_PARSER_PROTOTYPE(config_parse_numa_mask);
141CONFIG_PARSER_PROTOTYPE(config_parse_ip_filter_bpf_progs);
142CONFIG_PARSER_PROTOTYPE(config_parse_cpu_affinity2);
143CONFIG_PARSER_PROTOTYPE(config_parse_show_status);
144CONFIG_PARSER_PROTOTYPE(config_parse_status_unit_format);
145CONFIG_PARSER_PROTOTYPE(config_parse_output_restricted);
146CONFIG_PARSER_PROTOTYPE(config_parse_crash_chvt);
147CONFIG_PARSER_PROTOTYPE(config_parse_timeout_abort);
148CONFIG_PARSER_PROTOTYPE(config_parse_swap_priority);
149CONFIG_PARSER_PROTOTYPE(config_parse_mount_images);
150CONFIG_PARSER_PROTOTYPE(config_parse_socket_timestamping);
151CONFIG_PARSER_PROTOTYPE(config_parse_extension_images);
152CONFIG_PARSER_PROTOTYPE(config_parse_bpf_foreign_program);
153CONFIG_PARSER_PROTOTYPE(config_parse_cgroup_socket_bind);
154CONFIG_PARSER_PROTOTYPE(config_parse_restrict_network_interfaces);
155CONFIG_PARSER_PROTOTYPE(config_parse_watchdog_sec);
156CONFIG_PARSER_PROTOTYPE(config_parse_tty_size);
157CONFIG_PARSER_PROTOTYPE(config_parse_log_filter_patterns);
158CONFIG_PARSER_PROTOTYPE(config_parse_open_file);
159CONFIG_PARSER_PROTOTYPE(config_parse_memory_pressure_watch);
160
161/* gperf prototypes */
162const struct ConfigPerfItem* load_fragment_gperf_lookup(const char *key, GPERF_LEN_TYPE length);
163extern const char load_fragment_gperf_nulstr[];