]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: DelegateNamespaces= does not depend on seccomp (#36580)
authorSteve Ramage <gitcommits@sjrx.net>
Sun, 2 Mar 2025 19:23:36 +0000 (11:23 -0800)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 3 Mar 2025 05:34:31 +0000 (14:34 +0900)
src/core/load-fragment-gperf.gperf.in
src/core/load-fragment.c

index a0907e8a4b1ae56c8fa91a3ee08242fd3017d78a..7344e56c4a2287f89e1a7147a8140fef19b87ac2 100644 (file)
@@ -74,7 +74,6 @@
 {{type}}.SystemCallLog,                       config_parse_syscall_log,                           0,                                  offsetof({{type}}, exec_context)
 {{type}}.MemoryDenyWriteExecute,              config_parse_bool,                                  0,                                  offsetof({{type}}, exec_context.memory_deny_write_execute)
 {{type}}.RestrictNamespaces,                  config_parse_namespace_flags,                       0,                                  offsetof({{type}}, exec_context.restrict_namespaces)
-{{type}}.DelegateNamespaces,                  config_parse_namespace_flags,                       0,                                  offsetof({{type}}, exec_context.delegate_namespaces)
 {{type}}.RestrictRealtime,                    config_parse_bool,                                  0,                                  offsetof({{type}}, exec_context.restrict_realtime)
 {{type}}.RestrictSUIDSGID,                    config_parse_bool,                                  0,                                  offsetof({{type}}, exec_context.restrict_suid_sgid)
 {{type}}.RestrictAddressFamilies,             config_parse_address_families,                      0,                                  offsetof({{type}}, exec_context)
@@ -91,6 +90,7 @@
 {{type}}.RestrictAddressFamilies,             config_parse_warn_compat,                           DISABLED_CONFIGURATION,             0
 {{type}}.LockPersonality,                     config_parse_warn_compat,                           DISABLED_CONFIGURATION,             0
 {% endif %}
+{{type}}.DelegateNamespaces,                  config_parse_namespace_flags,                       0,                                  offsetof({{type}}, exec_context.delegate_namespaces)
 {{type}}.RestrictFileSystems,                 config_parse_restrict_filesystems,                  0,                                  offsetof({{type}}, exec_context)
 {{type}}.LimitCPU,                            config_parse_rlimit,                                RLIMIT_CPU,                         offsetof({{type}}, exec_context.rlimit)
 {{type}}.LimitFSIZE,                          config_parse_rlimit,                                RLIMIT_FSIZE,                       offsetof({{type}}, exec_context.rlimit)
index 4bd65c1aaea0494633b0a2439ad21ff7f77881eb..5cb5494b0b04710b5eb1a098f21758cbb21bc1a7 100644 (file)
@@ -3565,6 +3565,7 @@ int config_parse_address_families(
                         set_remove(c->address_families, INT_TO_PTR(af));
         }
 }
+#endif
 
 int config_parse_namespace_flags(
                 const char *unit,
@@ -3628,7 +3629,6 @@ int config_parse_namespace_flags(
 
         return 0;
 }
-#endif
 
 int config_parse_restrict_filesystems(
                 const char *unit,
@@ -6367,8 +6367,8 @@ void unit_dump_config_items(FILE *f) {
                 { config_parse_syscall_errno,         "ERRNO" },
                 { config_parse_syscall_log,           "SYSCALLS" },
                 { config_parse_address_families,      "FAMILIES" },
-                { config_parse_namespace_flags,       "NAMESPACES" },
 #endif
+                { config_parse_namespace_flags,       "NAMESPACES" },
                 { config_parse_restrict_filesystems,  "FILESYSTEMS"  },
                 { config_parse_cpu_shares,            "SHARES" },
                 { config_parse_cg_weight,             "WEIGHT" },