%struct-type
%includes
%%
-Exec.Boot, config_parse_boot, 0, 0
-Exec.Ephemeral, config_parse_tristate, 0, offsetof(Settings, ephemeral)
-Exec.ProcessTwo, config_parse_pid2, 0, 0
-Exec.Parameters, config_parse_strv, 0, offsetof(Settings, parameters)
-Exec.Environment, config_parse_strv, 0, offsetof(Settings, environment)
-Exec.User, config_parse_string, CONFIG_PARSE_STRING_SAFE, offsetof(Settings, user)
-Exec.Capability, config_parse_capability, 0, offsetof(Settings, capability)
-Exec.AmbientCapability, config_parse_capability, 0, offsetof(Settings, ambient_capability)
-Exec.DropCapability, config_parse_capability, 0, offsetof(Settings, drop_capability)
-Exec.KillSignal, config_parse_signal, 0, offsetof(Settings, kill_signal)
-Exec.Personality, config_parse_personality, 0, offsetof(Settings, personality)
-Exec.MachineID, config_parse_id128, 0, offsetof(Settings, machine_id)
-Exec.WorkingDirectory, config_parse_path, 0, offsetof(Settings, working_directory)
-Exec.PivotRoot, config_parse_pivot_root, 0, 0
-Exec.PrivateUsers, config_parse_private_users, 0, 0
-Exec.PrivateUsersDelegate, config_parse_unsigned, 0, offsetof(Settings, delegate_container_ranges)
-Exec.NotifyReady, config_parse_tristate, 0, offsetof(Settings, notify_ready)
-Exec.SystemCallFilter, config_parse_syscall_filter, 0, 0
-Exec.LimitCPU, config_parse_rlimit, RLIMIT_CPU, offsetof(Settings, rlimit)
-Exec.LimitFSIZE, config_parse_rlimit, RLIMIT_FSIZE, offsetof(Settings, rlimit)
-Exec.LimitDATA, config_parse_rlimit, RLIMIT_DATA, offsetof(Settings, rlimit)
-Exec.LimitSTACK, config_parse_rlimit, RLIMIT_STACK, offsetof(Settings, rlimit)
-Exec.LimitCORE, config_parse_rlimit, RLIMIT_CORE, offsetof(Settings, rlimit)
-Exec.LimitRSS, config_parse_rlimit, RLIMIT_RSS, offsetof(Settings, rlimit)
-Exec.LimitNOFILE, config_parse_rlimit, RLIMIT_NOFILE, offsetof(Settings, rlimit)
-Exec.LimitAS, config_parse_rlimit, RLIMIT_AS, offsetof(Settings, rlimit)
-Exec.LimitNPROC, config_parse_rlimit, RLIMIT_NPROC, offsetof(Settings, rlimit)
-Exec.LimitMEMLOCK, config_parse_rlimit, RLIMIT_MEMLOCK, offsetof(Settings, rlimit)
-Exec.LimitLOCKS, config_parse_rlimit, RLIMIT_LOCKS, offsetof(Settings, rlimit)
-Exec.LimitSIGPENDING, config_parse_rlimit, RLIMIT_SIGPENDING, offsetof(Settings, rlimit)
-Exec.LimitMSGQUEUE, config_parse_rlimit, RLIMIT_MSGQUEUE, offsetof(Settings, rlimit)
-Exec.LimitNICE, config_parse_rlimit, RLIMIT_NICE, offsetof(Settings, rlimit)
-Exec.LimitRTPRIO, config_parse_rlimit, RLIMIT_RTPRIO, offsetof(Settings, rlimit)
-Exec.LimitRTTIME, config_parse_rlimit, RLIMIT_RTTIME, offsetof(Settings, rlimit)
-Exec.Hostname, config_parse_hostname, 0, offsetof(Settings, hostname)
-Exec.NoNewPrivileges, config_parse_tristate, 0, offsetof(Settings, no_new_privileges)
-Exec.OOMScoreAdjust, config_parse_oom_score_adjust, 0, 0
-Exec.CPUAffinity, config_parse_cpu_set, 0, offsetof(Settings, cpu_set)
-Exec.ResolvConf, config_parse_resolv_conf, 0, offsetof(Settings, resolv_conf)
-Exec.LinkJournal, config_parse_link_journal, 0, 0
-Exec.Timezone, config_parse_timezone_mode, 0, offsetof(Settings, timezone)
-Exec.SuppressSync, config_parse_tristate, 0, offsetof(Settings, suppress_sync)
-Files.ReadOnly, config_parse_tristate, 0, offsetof(Settings, read_only)
-Files.Volatile, config_parse_volatile_mode, 0, offsetof(Settings, volatile_mode)
-Files.Bind, config_parse_bind, 0, 0
-Files.BindReadOnly, config_parse_bind, 1, 0
-Files.TemporaryFileSystem, config_parse_tmpfs, 0, 0
-Files.Inaccessible, config_parse_inaccessible, 0, 0
-Files.Overlay, config_parse_overlay, 0, 0
-Files.OverlayReadOnly, config_parse_overlay, 1, 0
-Files.PrivateUsersChown, config_parse_userns_chown, 0, offsetof(Settings, userns_ownership)
-Files.PrivateUsersOwnership, config_parse_userns_ownership, 0, offsetof(Settings, userns_ownership)
-Files.BindUser, config_parse_bind_user, 0, offsetof(Settings, bind_user)
-Files.BindUserShell, config_parse_bind_user_shell, 0, 0
-Network.Private, config_parse_tristate, 0, offsetof(Settings, private_network)
-Network.NamespacePath, config_parse_path, 0, offsetof(Settings, network_namespace_path)
-Network.Interface, config_parse_network_iface_pair, 0, offsetof(Settings, network_interfaces)
-Network.MACVLAN, config_parse_macvlan_iface_pair, 0, offsetof(Settings, network_macvlan)
-Network.IPVLAN, config_parse_ipvlan_iface_pair, 0, offsetof(Settings, network_ipvlan)
-Network.VirtualEthernet, config_parse_tristate, 0, offsetof(Settings, network_veth)
-Network.VirtualEthernetExtra, config_parse_veth_extra, 0, 0
-Network.Bridge, config_parse_ifname, 0, offsetof(Settings, network_bridge)
-Network.Zone, config_parse_network_zone, 0, 0
-Network.Port, config_parse_expose_port, 0, 0
+Exec.Boot, config_parse_boot, 0, 0
+Exec.Ephemeral, config_parse_tristate, 0, offsetof(Settings, ephemeral)
+Exec.ProcessTwo, config_parse_pid2, 0, 0
+Exec.Parameters, config_parse_strv, 0, offsetof(Settings, parameters)
+Exec.Environment, config_parse_strv, 0, offsetof(Settings, environment)
+Exec.User, config_parse_string, CONFIG_PARSE_STRING_SAFE, offsetof(Settings, user)
+Exec.Capability, config_parse_capability, 0, offsetof(Settings, capability)
+Exec.AmbientCapability, config_parse_capability, 0, offsetof(Settings, ambient_capability)
+Exec.DropCapability, config_parse_capability, 0, offsetof(Settings, drop_capability)
+Exec.KillSignal, config_parse_signal, 0, offsetof(Settings, kill_signal)
+Exec.Personality, config_parse_personality, 0, offsetof(Settings, personality)
+Exec.MachineID, config_parse_id128, 0, offsetof(Settings, machine_id)
+Exec.WorkingDirectory, config_parse_path, 0, offsetof(Settings, working_directory)
+Exec.PivotRoot, config_parse_pivot_root, 0, 0
+Exec.PrivateUsers, config_parse_private_users, 0, 0
+Exec.PrivateUsersDelegate, config_parse_unsigned, 0, offsetof(Settings, delegate_container_ranges)
+Exec.NotifyReady, config_parse_tristate, 0, offsetof(Settings, notify_ready)
+Exec.SystemCallFilter, config_parse_syscall_filter, 0, 0
+Exec.LimitCPU, config_parse_rlimit, RLIMIT_CPU, offsetof(Settings, rlimit)
+Exec.LimitFSIZE, config_parse_rlimit, RLIMIT_FSIZE, offsetof(Settings, rlimit)
+Exec.LimitDATA, config_parse_rlimit, RLIMIT_DATA, offsetof(Settings, rlimit)
+Exec.LimitSTACK, config_parse_rlimit, RLIMIT_STACK, offsetof(Settings, rlimit)
+Exec.LimitCORE, config_parse_rlimit, RLIMIT_CORE, offsetof(Settings, rlimit)
+Exec.LimitRSS, config_parse_rlimit, RLIMIT_RSS, offsetof(Settings, rlimit)
+Exec.LimitNOFILE, config_parse_rlimit, RLIMIT_NOFILE, offsetof(Settings, rlimit)
+Exec.LimitAS, config_parse_rlimit, RLIMIT_AS, offsetof(Settings, rlimit)
+Exec.LimitNPROC, config_parse_rlimit, RLIMIT_NPROC, offsetof(Settings, rlimit)
+Exec.LimitMEMLOCK, config_parse_rlimit, RLIMIT_MEMLOCK, offsetof(Settings, rlimit)
+Exec.LimitLOCKS, config_parse_rlimit, RLIMIT_LOCKS, offsetof(Settings, rlimit)
+Exec.LimitSIGPENDING, config_parse_rlimit, RLIMIT_SIGPENDING, offsetof(Settings, rlimit)
+Exec.LimitMSGQUEUE, config_parse_rlimit, RLIMIT_MSGQUEUE, offsetof(Settings, rlimit)
+Exec.LimitNICE, config_parse_rlimit, RLIMIT_NICE, offsetof(Settings, rlimit)
+Exec.LimitRTPRIO, config_parse_rlimit, RLIMIT_RTPRIO, offsetof(Settings, rlimit)
+Exec.LimitRTTIME, config_parse_rlimit, RLIMIT_RTTIME, offsetof(Settings, rlimit)
+Exec.Hostname, config_parse_hostname, 0, offsetof(Settings, hostname)
+Exec.NoNewPrivileges, config_parse_tristate, 0, offsetof(Settings, no_new_privileges)
+Exec.OOMScoreAdjust, config_parse_oom_score_adjust, 0, 0
+Exec.CPUAffinity, config_parse_cpu_set, 0, offsetof(Settings, cpu_set)
+Exec.ResolvConf, config_parse_resolv_conf, 0, offsetof(Settings, resolv_conf)
+Exec.LinkJournal, config_parse_link_journal, 0, 0
+Exec.Timezone, config_parse_timezone_mode, 0, offsetof(Settings, timezone)
+Exec.SuppressSync, config_parse_tristate, 0, offsetof(Settings, suppress_sync)
+Exec.RestrictAddressFamilies, config_parse_restrict_address_families, 0, 0
+Files.ReadOnly, config_parse_tristate, 0, offsetof(Settings, read_only)
+Files.Volatile, config_parse_volatile_mode, 0, offsetof(Settings, volatile_mode)
+Files.Bind, config_parse_bind, 0, 0
+Files.BindReadOnly, config_parse_bind, 1, 0
+Files.TemporaryFileSystem, config_parse_tmpfs, 0, 0
+Files.Inaccessible, config_parse_inaccessible, 0, 0
+Files.Overlay, config_parse_overlay, 0, 0
+Files.OverlayReadOnly, config_parse_overlay, 1, 0
+Files.PrivateUsersChown, config_parse_userns_chown, 0, offsetof(Settings, userns_ownership)
+Files.PrivateUsersOwnership, config_parse_userns_ownership, 0, offsetof(Settings, userns_ownership)
+Files.BindUser, config_parse_bind_user, 0, offsetof(Settings, bind_user)
+Files.BindUserShell, config_parse_bind_user_shell, 0, 0
+Network.Private, config_parse_tristate, 0, offsetof(Settings, private_network)
+Network.NamespacePath, config_parse_path, 0, offsetof(Settings, network_namespace_path)
+Network.Interface, config_parse_network_iface_pair, 0, offsetof(Settings, network_interfaces)
+Network.MACVLAN, config_parse_macvlan_iface_pair, 0, offsetof(Settings, network_macvlan)
+Network.IPVLAN, config_parse_ipvlan_iface_pair, 0, offsetof(Settings, network_ipvlan)
+Network.VirtualEthernet, config_parse_tristate, 0, offsetof(Settings, network_veth)
+Network.VirtualEthernetExtra, config_parse_veth_extra, 0, 0
+Network.Bridge, config_parse_ifname, 0, offsetof(Settings, network_bridge)
+Network.Zone, config_parse_network_zone, 0, 0
+Network.Port, config_parse_expose_port, 0, 0
} ConsoleMode;
typedef enum SettingsMask {
- SETTING_START_MODE = UINT64_C(1) << 0,
- SETTING_ENVIRONMENT = UINT64_C(1) << 1,
- SETTING_USER = UINT64_C(1) << 2,
- SETTING_CAPABILITY = UINT64_C(1) << 3,
- SETTING_KILL_SIGNAL = UINT64_C(1) << 4,
- SETTING_PERSONALITY = UINT64_C(1) << 5,
- SETTING_MACHINE_ID = UINT64_C(1) << 6,
- SETTING_NETWORK = UINT64_C(1) << 7,
- SETTING_EXPOSE_PORTS = UINT64_C(1) << 8,
- SETTING_READ_ONLY = UINT64_C(1) << 9,
- SETTING_VOLATILE_MODE = UINT64_C(1) << 10,
- SETTING_CUSTOM_MOUNTS = UINT64_C(1) << 11,
- SETTING_WORKING_DIRECTORY = UINT64_C(1) << 12,
- SETTING_USERNS = UINT64_C(1) << 13,
- SETTING_NOTIFY_READY = UINT64_C(1) << 14,
- SETTING_PIVOT_ROOT = UINT64_C(1) << 15,
- SETTING_SYSCALL_FILTER = UINT64_C(1) << 16,
- SETTING_HOSTNAME = UINT64_C(1) << 17,
- SETTING_NO_NEW_PRIVILEGES = UINT64_C(1) << 18,
- SETTING_OOM_SCORE_ADJUST = UINT64_C(1) << 19,
- SETTING_CPU_AFFINITY = UINT64_C(1) << 20,
- SETTING_RESOLV_CONF = UINT64_C(1) << 21,
- SETTING_LINK_JOURNAL = UINT64_C(1) << 22,
- SETTING_TIMEZONE = UINT64_C(1) << 23,
- SETTING_EPHEMERAL = UINT64_C(1) << 24,
- SETTING_SLICE = UINT64_C(1) << 25,
- SETTING_DIRECTORY = UINT64_C(1) << 26,
- SETTING_USE_CGNS = UINT64_C(1) << 27,
- SETTING_CLONE_NS_FLAGS = UINT64_C(1) << 28,
- SETTING_CONSOLE_MODE = UINT64_C(1) << 29,
- SETTING_CREDENTIALS = UINT64_C(1) << 30,
- SETTING_BIND_USER = UINT64_C(1) << 31,
- SETTING_BIND_USER_SHELL = UINT64_C(1) << 32,
- SETTING_SUPPRESS_SYNC = UINT64_C(1) << 33,
- SETTING_RLIMIT_FIRST = UINT64_C(1) << 34, /* we define one bit per resource limit here */
- SETTING_RLIMIT_LAST = UINT64_C(1) << (34 + _RLIMIT_MAX - 1),
- _SETTINGS_MASK_ALL = (UINT64_C(1) << (34 + _RLIMIT_MAX)) -1,
+ SETTING_START_MODE = UINT64_C(1) << 0,
+ SETTING_ENVIRONMENT = UINT64_C(1) << 1,
+ SETTING_USER = UINT64_C(1) << 2,
+ SETTING_CAPABILITY = UINT64_C(1) << 3,
+ SETTING_KILL_SIGNAL = UINT64_C(1) << 4,
+ SETTING_PERSONALITY = UINT64_C(1) << 5,
+ SETTING_MACHINE_ID = UINT64_C(1) << 6,
+ SETTING_NETWORK = UINT64_C(1) << 7,
+ SETTING_EXPOSE_PORTS = UINT64_C(1) << 8,
+ SETTING_READ_ONLY = UINT64_C(1) << 9,
+ SETTING_VOLATILE_MODE = UINT64_C(1) << 10,
+ SETTING_CUSTOM_MOUNTS = UINT64_C(1) << 11,
+ SETTING_WORKING_DIRECTORY = UINT64_C(1) << 12,
+ SETTING_USERNS = UINT64_C(1) << 13,
+ SETTING_NOTIFY_READY = UINT64_C(1) << 14,
+ SETTING_PIVOT_ROOT = UINT64_C(1) << 15,
+ SETTING_SYSCALL_FILTER = UINT64_C(1) << 16,
+ SETTING_HOSTNAME = UINT64_C(1) << 17,
+ SETTING_NO_NEW_PRIVILEGES = UINT64_C(1) << 18,
+ SETTING_OOM_SCORE_ADJUST = UINT64_C(1) << 19,
+ SETTING_CPU_AFFINITY = UINT64_C(1) << 20,
+ SETTING_RESOLV_CONF = UINT64_C(1) << 21,
+ SETTING_LINK_JOURNAL = UINT64_C(1) << 22,
+ SETTING_TIMEZONE = UINT64_C(1) << 23,
+ SETTING_EPHEMERAL = UINT64_C(1) << 24,
+ SETTING_SLICE = UINT64_C(1) << 25,
+ SETTING_DIRECTORY = UINT64_C(1) << 26,
+ SETTING_USE_CGNS = UINT64_C(1) << 27,
+ SETTING_CLONE_NS_FLAGS = UINT64_C(1) << 28,
+ SETTING_CONSOLE_MODE = UINT64_C(1) << 29,
+ SETTING_CREDENTIALS = UINT64_C(1) << 30,
+ SETTING_BIND_USER = UINT64_C(1) << 31,
+ SETTING_BIND_USER_SHELL = UINT64_C(1) << 32,
+ SETTING_SUPPRESS_SYNC = UINT64_C(1) << 33,
+ SETTING_RESTRICT_ADDRESS_FAMILIES = UINT64_C(1) << 34,
+ SETTING_RLIMIT_FIRST = UINT64_C(1) << 35, /* we define one bit per resource limit here */
+ SETTING_RLIMIT_LAST = UINT64_C(1) << (35 + _RLIMIT_MAX - 1),
+ _SETTINGS_MASK_ALL = (UINT64_C(1) << (35 + _RLIMIT_MAX)) -1,
_SETTING_FORCE_ENUM_WIDTH = UINT64_MAX
} SettingsMask;
bool link_journal_try;
TimezoneMode timezone;
int suppress_sync;
+ Set *restrict_address_families;
+ bool restrict_address_families_is_allowlist;
/* [Files] */
int read_only;
CONFIG_PARSER_PROTOTYPE(config_parse_userns_ownership);
CONFIG_PARSER_PROTOTYPE(config_parse_bind_user);
CONFIG_PARSER_PROTOTYPE(config_parse_bind_user_shell);
+CONFIG_PARSER_PROTOTYPE(config_parse_restrict_address_families);
DECLARE_STRING_TABLE_LOOKUP(resolv_conf_mode, ResolvConfMode);